30 June 2005

Programming

Via MKB, I've discovered Pragmatic Programmers. He linked a little essay on programming by coincidence.

Suppose Fred is given a programming assignment. Fred types in some code, tries it, and it seems to work. Fred types in some more code, tries it, and it still seems to work. After several weeks of coding this way, the program suddenly stops working, and after hours of trying to fix it, he still doesn't know why. Fred may well spend a significant amount of time chasing this piece of code around without ever being able to fix it. No matter what he does, it just doesn't ever seem to work right.

Fred doesn't know why the code is failing because he didn't know why it worked in the first place. It seemed to work, given the limited “testing” that Fred did, but that was just a coincidence.

I haven't cut code in fifteen years, and I wasn't much of a programmer when I did. But I have been working with programmers ever since then and these guys obviously know what they're talking about — and have a knack for putting their finger right on the issue. Though I do wish that where they say “user,” they would instead say “interaction designer.” But then, that's easy for me to day, since I am an interaction designer.

1 comment:

TheWayOfTheGun said...

I have their book and you are welcome to borrow it if you like. I assume they have a newer edition, but it's not the sort of material that suffers from bitrot the way other tech books do.