I’m Sorry Dave, I’m Afraid I Can’t Do That

In 2010, the sequel to the sublime 2001: A Space Odyssey, the motive behind the HAL 9000 computer’s killing spree in the first movie is revealed. The computer, it seems, was given conflicting orders and was just doing its best to reconcile them. HAL’s programmer, Dr. Chandra, explains: “Computers don’t know how to lie.”

Lucky for us, most computers won’t try to kill us if they experience an “unhandled exception.” They either pop up an error message or they crash.

People don’t generally realize this, but there’s no law that computer error messages have to have anything to do with the error that’s currently happening. In IT work, knowing this often leads you down unexpected paths toward solutions.

A computer doesn’t inherently know why something crapped out, or what the cause of a program’s glitch was. Programmers need to “trap” errors (i.e. anticipate them) and write the proper error message for handling them. If they don’t, the operating system tries its best to compensate, or it just “crashes” if it can’t reconcile the “conflicting orders.”

Error trapping takes time, and is usually the lowest priority in a development project. Let’s face it, programmers (like users) want to focus on things that work.

The other day, a developer working on a project I’m involved with documented how he troubleshot a strange error message. He had written a program to create a bunch of log on accounts. After the 9,999th account was created, the system reported: “A device attached to the system is not functioning.” Even by usual error message standards, that’s pretty vague. He dutifully checked all devices and found them to be fine. He created a single new account via another means, and that worked. His co-workers also were able to create accounts. He was mystified.

On a hunch related to the fact that the problem always occurred after the program created its 9,999th account, he tried creating account names of various length. When he tried to create an account with 20 characters in it, the system said “A device attached to the system is not functioning.” It turns out, the accounts he was creating all had the same 15-character root name with a unique number appended to it. Once the program tried to create an account with a 5-digit number appended to it (10,000) it exceeded an undocumented 19-character limit and crapped out.

Obviously, the programmers of the operating system didn’t anticipate this problem (or maybe weren’t aware of it) so the operating system tried its best to come up with some explantion. Somewhere in the depth of Microsoft Windows, something interpreted the problem as a involving device that had been removed from the system, and promptly reported it as such. This lazy programming cost the developer and his colleagues a couple hours of time trying to figure out that the real problem had nothing to do with a “device.”

But I guess he should be thankful the computer didn’t shut off his life support system and jettison him out into space.

Comments

What do it mean?????

That's all very interesting... well, actually my eyes glazed over at the technical stuff.

But it's an interesting example of a sequel falling far short of the original. The idea of a computer acquiring a human desire for control made 2001 fascinating; in 2010, they explain it away as a straightforward programming glitch.