TDD and Dual Entry Bookkeeping
test driven development, software development
In a talk at SD West 2006 Bob Martin mentioned about the similarity between dual entry bookkeeping for accountants and test driven development for developers. Just like dual entry bookkeeping your production code checks the unit tests and the unit tests check the production code. At the end of the day everything should sum up to a simple green bar.
As for having to drop unit tests because you’re in a hurry:
One common issue I have found is that developers drop the discipline of TDD in the face of schedule pressure. “We don’t have time to write tests” I hear them say. Before I comment on the absurdity of this attitude, let me draw the parallel. Can you imagine an accounting department dropping dual entry bookkeeping because they’ve got to close the books on time? Even before SARBOX such a decision would be such a huge violation of professional ethics as to be unconscionable. No accountant who respected his profession, or himself, would drop the controls in order to make a date.
– Bob Martin
Ed Gibbs @ April 2, 2006


[…] If you’re about to drop some testing on account of schedule pressure, read this. Then follow the link through to the original Bob Martin post. The final lines are the ones we should etch in our minds: “Under schedule pressure, we do not drop our disciplines. Under schedule pressure we increase our disciplines and reduce scope. No matter how tight the schedule is, we will know what we are shipping, and we will know, to the best of our ability, that it works.” […]