All in the <head> – Ponderings and code by Drew McLellan –

Defensive Design for the Web

I’m usually the first person to quote the mantra that no software is bug-free, especially as I’m usually the one who’s written the code, but the inescapable fact holds true that if something can go wrong it will, and that bugs will be found by the end user no matter how much testing you do. In real-life systems (like shops and restaurants) if something unexpected happens, the people involved just adjust to cope. We’re human beings capable of intelligent thought and able to adjust our actions based on whatever comes our way. The show must go on.

Defensive Design for the Web In contrast to human beings, the software we use on a daily basis is completely deterministic. The flow of the program can be logically followed, including any choices made based on the users input. That’s essentially how software works and how it’s written. For software to cope with different situations the developer has to preempt what those situations might be and to code responses to them. Considering all the things that can possibly go wrong with anything (usually the biggest number you can conceive plus one), this is a very difficult task indeed.

Add to the magnitude of the task the fact that developers are already using every cycle to hold the normal process in their heads and to code for that, and designing for every possible circumstance seems either vastly expensive or just damn impossible.

Well, it’s not. Here’s a book that tells you how to do it. It’s easy for busy people to dip in and out of, and it’s full of great tips. I bought a copy of 37signals’ new book Defensive Design for the Web and I’m jolly glad I did.