Sunday, December 23, 2007

Ken Thompson has an automobile which he helped design.

When I first started using unix when I got to college, when you would log out, it would print out a 'fortune'. This is the output of the famous unix program called, well, 'fortune'. They weren't really fortunes, although some of them sounded like snide fortune cookie fortunes.

Then, one day, I got this one, which I did not understand:

Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the numerous idiot lights which plague the modern driver. Rather, if the driver makes any mistake, a giant "?" lights up in the center of the dashboard. "The experienced driver", he says, "will usually know what's wrong.
I didn't understand it, but I found it so compelling that I never forgot it. Who was this Ken Thompson? Surely this story wasn't literally true; but what had he done that someone was compelled to tease him in this way? Did Ken Thompson feel bad about being teased like this?

I now know that Ken Thompson was one of the creators of unix. In this fortune, the car is unix, and the giant '?' is the dreaded 'segmentation fault' error that plagues beginning unix/C programmers and which provides no useful information.

I have always felt a little bit bad for him, being teased in this way (and why does Dennis Ritchie get off so easy?). Apparently, though, Mr. Thompson and I work at the same company now, so maybe I will have a chance to comfort him.

11 comments:

James said...

Only tangentially related to your post, my favorite fortune cookie of all time remains "Your lucky number is 1."

Gregory Michael Travis said...

That's brilliant!

Wait, I don't get it.

Oh, wait, that's brilliant!

ravelgrane said...

My lucky number is i. Which means I will never be lucky. :-(

ravelgrane said...

I got that in a cookie from a Chinese Mathemeticians' Restaurant.

ravelgrane said...

Hey, what would the Scheme Car look like? I bet it would be an omnibus with little nested buses like a russian doll. And to driver is a mysterious person dressed in a yellow jumpsuit with the Y-Combinator as a logo. And everybody is rockin' out to a disco beat with the lyrics pumping out in Isaac Hayes voice: "CAR CAR CDR CAR CDR CDR CAR CAR CONS CAR..."

Gregory Michael Travis said...

After each thing it did, a Scheme car would have to tell itself to continue being a car.

That might be annoying, but the nice thing is that you don't have to drive home after going somewhere; you just save a continuation before you leave, and invoke it to go instantly home.

ravelgrane said...

Oh fuck yeah! You press a "continuation" button on the side of the bus and it collapses into a briefcase. After work, you put the briefcase on the ground and it expands back into a bus. The only problem is, all the context comes with it. So if it was raining before, and it's sunny now, when the continuation continues, it will be raining again. Freak!

Gregory Michael Travis said...

And if you're riding on the bus, and other riders are invoking continuations, then, since you don't perceive the time you are frozen, you look out the window and you're just warping from place to place. There are signs inside the bus saying, "Please be considerate and do not invoke continuations gratuitously."

Anonymous said...

It is a nice comparison because most of the actual system they have a error for everything. You could figure it out and they have tools to identify the problem. but in some unix bases system, users usually know how it works so they can find very easy the problem. If you want to avoid any problem Generic Viagra . This fix everything.

jejones3141 said...

Actually, the "?" referred to is the one and only error message that the ed editor would emit; it has nothing to do with segmentation faults.

Gregory Michael Travis said...

The "?" reminds me of ed ("the standard text editor"), but the way it's used in the fortune, it reminds me so much of the vagueness of the segmentation fault.