Wednesday, January 11, 2006

Software Horror Stories To Keep Programmers Humble

When I was young, I thought sofware was easy, my programs would contain no bug, and I would finish them quickly.

I was an arrogant fool.

Now that I'm no longer young and very slightly less foolish, I expect the worst when I write any piece of code. Now, I try to always program defensively, trying to eliminate the chance that a bug will occur. I think about preconditions, postconditions, and invariants. Alway ask myself how I know the code is correct. Test a lot. Think things through before coding. Remember that shortcuts rarely are short but almost always cut.

I consider myself fortunate that when my software failed, nobody died.

Others were not so fortunate.

This Software Horror Stories page shows us what disasters did happen when software failed. People who made these softwares were probably quite smart and experienced. They knew how well their software must perform. They knew what the stakes were. Yet they failed. Spectacularly.

Younglings, it's better to learn from others' mistakes. There are some good free tips. There are a lot of great books. I can recommend three: Code Complete, The Mythical Man-Month, and Facts and Fallacies in Software Engineering.

The most important thing is to start with the will to make good software, work at it a lot, work at it constantly until it's a habit.

Kind of like dieting.

No comments: