Error Conditions and Little Typos
Posted in Development
A friendly reminder from Head First Labs:
“Error conditions are usually the last thing most developers think about, but it’s the first thing most customers notice.”
and
“Customers don’t usually make huge mistakes—they make little typos, and those are the things you’re testing for here.”
Michael Nygard echoes it in Release It!:
“In the lab, all the tests are contrived by people who know what answer they expect to get. In the real world, the tests aren’t designed to have answers. […]
Enterprise software must be cynical. Cynical software expects bad things to happen and is never surprised when they do. Cynical software doesn’t even trust itself.”
Can I get an “Amen”? It’s so comforting to test intended scenarios that we overlook the unintended ones.

Josh Stodola
on May 27, 2008
Amen! When testing, I replace my "programmer's hat" with a dunce cap and expect the worse.