Friday, March 21, 2008

The First Rule of Programming : It's Always Your Fault -- A Corollary

Jeff Atwood, on the CodingHorror blog, recently posted about taking ownership of your code by way of always assuming a problem is your fault:

No matter what the problem is with your software-- maybe it's not even your code in the first place-- always assume the problem is in your code and act accordingly. If you're going to subject the world to your software, take full responsibility for its failures. Even if, technically speaking, you don't have to.

I'll add just one more bit of advice:

Assume that it's the last thing you changed that caused the problem.

(Source control systems make it relatively easy to find the breaking change by allowing you to progressively fetch earlier versions of the source code.  I usually employ a binary search technique that lets me close in on the breaking change pretty quickly.)