A Fable About Programming and Piano Tuning

[For some reason I spaced on posting something on this day. Just to maintain the "post something every day fiction", a belated addition to the blog.]

Years ago, I read an anecdote in a programming book; unfortunately, I don't remember the book, and scanning through the programming books on my shelf didn't turn up anything. Googling did not help, either. So I may not be remembering the story correctly. But if someone out there knows the source, please let me know, I'll credit it properly, and fix if necessary.

Anyway: in addition to being a programmer, the author also had a hobby: building a fine piano from a kit. This is an arduous and mistake-prone task. Errors can be difficult and expensive to fix.

And if you're a programmer, you added the phrase "… just like programming!" to the last sentence above.

The author quoted a piano-making guru: "I've come to the conclusion that most of the problems in this game are due to thinking.

"Because whenever someone's made a total botch of a project, the first words out of their mouth when they explain things to me are 'I thought that…'"

And that's the moral: don't think. Otherwise, you find yourself saying things like "I thought that call to strcpy() would never overflow the destination buffer."

We should probably expand that: when people say "I thought that…", what they're really saying is "I mistakenly thought that…".

So the real moral is, or, more accurately, the real morals are pretty standard: Examine your assumptions; Explore worst-case scenarios; Don't underestimate your own ignorance; Know your own biases and weaknesses; Don't be too proud to ask for help.