Archive for January, 2009

By the time you start to notice

Saturday, January 31st, 2009

In a short lightning interview that Ward Cunningham did with with Ron Jeffries and Chet Hendrickson, Chet has this to say about Technical Debt (emphasis mine):

“Our experience has been that by the time you start to notice that the code needs to be cleaned up, you’ve already lost a lot of time because of it, and it’s almost impossible to ever get back to where you were. We actually believe that you can never be as clean by going back a month or a week later and cleaning up than you could if you just cleaned up as you went.”

“By the time you start to notice” is a challenge. You either have to be so clean in your coding practices that you never present yourself with the need to notice problems, or you have to develop your ability to notice problems so that you can spot them sooner. I’ve never seen a team—even one doing TDD and refactoring in earnest—manage to stay completely clean, so it would seem that developing noticing skills, and helping teams develop willpower, is the way to go.

Configuration needs testing, too

Saturday, January 31st, 2009

This morning Google pushed a bad configuration file used by search, and for 55 minutes all search results came back with a “this site may harm your computer” warning.

Oops.

A timely reminder that configuration needs testing, too.

The question that you need answered before you push is “will the application configured in this new way behave the way I expect it to?” The details of how you’ll test to answer that question will depend on the nature of your application and its configuration data, but will probably include some tests against possible misconfigurations. In Google’s case, where the configuration error was essentially an accidental wildcard in a blacklist, a simple “verify that there isn’t a wildcard here” test would have saved them some embarrassment.

Are there simple tests that could save you from embarrassment?