Khaos

Archive for October 2nd, 2003

Technical Debt

Thursday, October 2nd, 2003

You have a piece of functionality that you need to add to your system. You see two ways to do it, one is quick to do but is messy – you are sure that it will make further changes harder in the future. The other results in a cleaner design, but will take longer to put in place.

Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice.

- Martin Fowler, Technical Debt

I really like this metaphor. I’ve spent hours debating over whether we should take the quick and nasty hack or write the code properly.

The Sound of Programmers

Thursday, October 2nd, 2003

I have heard it said that bad code has a smell. Today I’m learning that some code also has a sound. Not a sound that I hear by looking at the code but a sound that is made by the programmers trying to use it. From across the desk I can tell that the CPAN module they are trying to use is badly written. Actually from the sounds drifting across the desk I would say it’s the worst piece of code they’ve had to deal with in weeks. It’s never good when the programmers say things like “What?”, “Yuck!” and “Eugh!” and then start to shudder at the horrors of what they are looking at. I don’t need to see this module to agree that we should spend the time refactoring it before using it. Based on their reaction I think I’ll hide on my side of the room until they’re finished.