Atomic I/O letters column #67Originally published 2006 in Atomic: Maximum Power Computing
Reprinted here March 2007
Last modified 03-Dec-2011.
If I stare directly at the laser of an optical mouse, can that cause blindness or any loss of sight?
In theory, yes. In practice, no.
The lasers that fancy optical mice use are the same little diode units as you get in cheap laser pointers. They don't have much light output at all - one or two milliwatts, tops. You can still damage your eyes if you stare at the beam from a cheap laser pointer, though, because a laser diode's light comes from a very tiny point. If you focus on it, your eye will obligingly focus that light down into another very tiny point on your retina, and that can damage the cells back there.
The brain does a lot of processing of data from your retina, so it can be hard to tell when you've damaged it. This can lead people to keep on damaging their retinas until they're legally blind, without even noticing until it's too late.
Most, if not all, laser-illuminated mice reduce the risk of this sort of thing by turning off the laser whenever they don't think they're sitting on a surface. So, as with LED-illuminated optical mice (which generally just dim their light when they're not on a surface), you can only actually shine the beam somewhere other than your mousemat for a brief moment at a time.
You probably could still manage to stare at the beam if you really tried, by pressing the mouse onto your face, or something - though the beam would be shooting into your eye at an angle then, not straight on at the retina.
In any case, just, you know, don't do that. There are more pleasant ways to become a statistic.
Brief exposure to these low-powered lasers, however, is harmless. High powered pointers can pose a significant risk with very brief exposure, but glancing at a 1mW laser beam will do your eyes a lot less harm than glancing at the four hundred million billion billion watt sun.
(Which, yes, is much further away, but the point remains.)
You know those stupid error messages where some program says something like "You have 92785Mb of hard disk space free, I need 2.1Mb to install, please free -273162837Mb so that there will be enough space for all my big, big files, please press Cancel to exit or Retry to see this stupid error again"?
Why do they happen?
I've seen, like, 20 different ones in screenshots on different forums, and I've seen it myself several times. Is this a Windows problem?
There are three ways in which these problems can arise.
One of them comes from old software that dates back to some time when there was a hard limit for some system resource, and no PC could possibly have more than that limit. The FAT16 file system, for instance, only supported 2Gb disk partitions, at most. Lazy and/or dumb programmers could therefore make a disk-space checker routine that freaked out in a silly way when it sees that you're trying to install the program on a partition with 200 times as much space free as the program believes is possible.
The second way to create a problem like this is with a particular kind of sloppy programming. It's a very elementary error, and quite easy for even non-programmers to understand - but as with buffer overflows, crummy coders keep on making this basic mistake.
When a program compares numbers, it should compare them as numbers. Duh. But if the program is instead written so that it compares them as strings, weird stuff can happen.
String comparison can be thought of as an ordinary alphabetic sort - the kind of sorting that gives the dude who owns Aaaaaaardvark Smash Repairs the first listing in the phone book.
A numerical sort of the numbers 33, 276, 4 and 8 will, of course, give you 4, 8, 33, 276. A string sort, though, just treats digits as if they're letters of the alphabet, all of which (usually) come before A. It'll thus sort those numbers by their first digit, as if they were words. So the result will now be 276, 33, 4, 8.
If a free-disk-space detector works this way, and the installer needs 7Mb but there's 2405Mb free, it will confidently report that there is not enough space. Because 2405 comes, alphabetwise, before 7, just as "fish" comes before "o".
After I put this page up, a reader pointed out that the third way in which this can happen is if the installer only has a 32-bit integer for the disk space, giving a maximum of four gigabytes it can see without going strange. Often, it's only two gigabytes, because one bit's used to indicate positive or negative - which means going off the top can wrap around to negative numbers, giving rise to fine examples of these goofy error messages.
Once you know about these problems, you can see them in most of the funny screenshots of these kinds of errors. Either it's obviously directly delivering a string-sort or 32-bit sort of number, or - as with the ancient WinBench error I include above - it's trying to get clever by calculating exactly how much more space it thinks you need, and thus looking even stupider.
String comparisons work just fine when all of the numbers are similar in magnitude - when everybody's CPU has a three-digit clock speed, for instance. But as soon as someone comes along with (say) a 1300MHz CPU, the stupid program (which shouldn't be checking dumbly for clock speed anyway, but that doesn't stop people from making installers that do...) will decide that 1300 is smaller than 233. So the CPU's not fast enough.
(That same program will also, of course, be quite sure that a 25MHz CPU is faster than a 233, or indeed a 2400.)
The example you gave - which I understand you just created by doing a Ratbert-dance on your number keys - wouldn't actually trigger the string-sort problem. 92785 comes after 2.1 in both string and numeric sorts.
In extremis, it is possible to get some of these dumb programs to install by, for instance, duplicating giant files on your hard drive until you've used up enough space that the initial digit of the free space number becomes suitable. You can, similarly, underclock your CPU to get a dumb clock-speed check to pass.
Any program that won't even install if it thinks your CPU's too slow is, of course, usually not something you want to be running anyway. But sometimes one must do things of which one is not proud.
For the past couple of days I've been arguing with my mate about "Powernet", the newest lot who have been pushing broadband over power lines.
I'm of the inclination that they're crackpots and will never pull it off, but he's pretty sure it's legit. Would you be able to shed some light on it?
Well, broadband over power lines is perfectly technologically possible, but so are lots of things that don't work in the real world.
I don't know whether the power grid here in Australia is any more suited to broadband distribution than is our phone system. After all, if power line broadband only covers one person in a zillion who can't already get DSL or cable, there's not much point to it.
I do know that power line broadband is the most vaporous of all the broadband schemes. People have been talking about it forever, but most of the time, in most markets, that talk comes to nothing. The Powernet site is a better example of the breed than most - it makes perfectly clear that this is very early days (and, so far as I can see, it hasn't been updated at for something like a year). It's not making promises about zillion-home rollouts in the next six months, like some of these companies.
Local networking systems that use power cabling have been working for years. That's not a tremendously compelling technology, but it was attractive - in those countries where the electricity authorities allowed it - back when wireless networking was expensive and flaky.
High frequencies don't make it through low-frequency transformers, though, and the mains grid is full of transformers tuned to the 50-60Hz mains frequency.
This is a problem, because powerline networking operates by transmitting one or another kind of high frequency signal, way up in the megahertz, through the power wiring. There's no other way to do it - bandwidth and frequency are inextricably linked.
So if you want power line data to make it around a neighbourhood rather than just around a building, you have to start messing around with every single pole pig transformer out there, not just the substations.
I've got four gigabytes of RAM, and I'm running WinXP, which is meant to have no stupid "system resource" limits, but I can't run several big programs at the same time.
If I've got lots of things running, and then try to run, say, Photoshop, it just goes "bong" and quits to the desktop with no error at all.
I'm really grateful to Mr Gates for making sure that all that memory of mine doesn't wear out, but obviously there's some kind of Windows resource that IS running out, even though XP isn't meant to have them.
What is it?
Yes, WinXP has some semi-secret resource limits which can cause this kind of impolite behaviour. This also explains why opening lots and lots of windows can leave you with the last ones all deformed, missing most of the stuff that should be in them.
The limits people usually encounter are handles, and the desktop heap.
Microsoft helpfully point out, in their support document 327699 (Google hit #1 when you search for that number!), that "There is a hard-coded limit of 10,000 NT User handles. This is designed to prevent "bad" (incorrectly behaving) programs from allocating too many NT User handles."
This is kind of like preventing kids from eating too many lollies by flushing most of the lollies down the toilet, but fortunately that document also tells you what to do in Regedit to increase the limit to 18,000. That's as far as Microsoft, in their wisdom, make it possible to go - but it solves many of these problems all by itself.
Microsoft have a page about embiggening the desktop heap, too. That fixes the mangled-window problems.
Note that you can tell Task Manager to display handle and object counts. Go to the Processes tab, then View -> Select Columns..., and pick the ones you want. This lets you see whether anything's using an inordinate number of one resource or other.
Free Download Manager, for instance, is a generally excellent piece of software. But it uses a handle for every file in its various lists, until you delete them (by which I mean delete their name from the list, not the actual file from your hard drive). FDM's got its own Recycle Bin, too, which you also need to empty.
FDM was using six thousand and something handles on my system when I last let its lists clog up. That dropped to 247 after I cleaned it up.