NEXT ENTRY »
“Gription”

The algorithm of dish-washing

Danny O’Brien, the publisher of the way-kewl NTK newsletter, has been writing this hilarious algorithm of how to wash dishes:

Washing

The Current Item and the Queued Item are both washed. This involves completing a series of acts. The item has not been cleaned unless all of these acts have been completed. Some acts may be performed on a Queued Item, some acts may be performed on the Current Item, some may be performed on both. Acts vary according to the item. Acts should follow the order in which they are listed.

Cutlery

1. Dipped and shaken under basin water - Queued, Current
2. Areas of uncleanliness observed - Queued, Current
3. Unclean areas scrubbed clean - Current
4. Re-dipped - Current
5. Rinsed under cold tap - Current

Pots, Pans, Cups, Mugs

1. Dipped and shaken under basin water - Queued, Current
2. Areas of uncleanliness observed - Queued, Current
3. Handle (if any) of item scoured - Current
4. Outside bottom of item scoured - Current
5. Outside sides of item scoured - Current
6. Inside bottom and sides of item scoured - Current
7. Remaining unclean areas scrubbed clean - Current
8. Re-dipped - Current
9. Rinsed under cold tap - Current

Main Program

1. Clean basin.
2. Fill basin with hot water. When almost full, add detergent.
3. Now drop five to ten pieces of cutlery from the Pile into the basin (depending on size and dirtiness). This will form your initial Soaking Stack
4. Apply General Rules continuously until all items are on the Draining Board

I love this stuff. This is exactly the kind thing I use when I explain to people why programming can be so hard, and why so many bugs exist. Because when you’re trying to describe how to do a task with total precision — which is what programmers have to do to computers — it’s almost impossible to think of everything. Eventually you forget to account for something, your program runs into something unexpected, and bang … it crashes. Bugs exist because the programmer assumes the computer, or the user, will “know” a piece of supposedly “commonsense” knowledge. But computers don’t know anything, and frequently, neither do users.

This is one reason that programmers sometimes have a weird contempt for users. Because to produce a bug-free program, they have to think about every single possible dumb-ass thing a user might do — including some very dumb things. Will the user try to hit a bunch of keys during a download? Will the user click the mouse on a few random buttons while the machine is trying to execute something? Essentially, the programmer trains himself to think of the user as a complete and total imbecile, who will screw everything up given half a chance. This isn’t because they’re mean. They have to think like this; it’s the only way to do their jobs well.

Sound cynical? Well, go back to that list of dish-washing commands. They all seem so blatantly, hilariously, almost annoyingly clear, right? As if they were written for an incredibly dumb child? Well, that’s how programmers have to think about the potent combination of a user and a computer: An incredibly volatile system that needs to be treated like a toddler.

Granted, not all programmers transfer this social formula to everyday life; they’re not always (or even very frequently) the inept nerds pop culture paints them to be.

But on the other thand, ever wondered how Bill Gates became such a strangely domineering, socially damaged freak? Wonder no more.


blog comments powered by Disqus

Search This Site


Bio:

I'm Clive Thompson, the author of Smarter Than You Think: How Technology is Changing Our Minds for the Better (Penguin Press). You can order the book now at Amazon, Barnes and Noble, Powells, Indiebound, or through your local bookstore! I'm also a contributing writer for the New York Times Magazine and a columnist for Wired magazine. Email is here or ping me via the antiquated form of AOL IM (pomeranian99).

More of Me

Twitter
Tumblr

Recent Comments

Collision Detection: A Blog by Clive Thompson