Design debt is a concept invented by Ward Cunningham. It uses a financial metaphor to illustrate what happens when you don't refactor your code.

The idea is that if you design and write your code at a measured pace you avoid having to take out a "loan" and incur little or no design debt. If you write the code too quickly and/or without a proper design you risk ending up with something that works but can't be easily understood or extended. The immediate goal may be reached more quickly but the trade-off is that you have to spend time refactoring the code later on.

Like a monetary debt you have to pay interest on a design debt. What this means is that it always takes longer overall to get the code out of the door and refactor afterwards than it does to write it properly from the start.

The book Refactoring To Patterns suggests that the design debt metaphor is a useful and familiar one to use when trying to convince a manager of the worth of refactoring.


For more on this see Refactoring To Patterns, Joshua Kerievsky, Addison Wesley 2005, ISBN 0-321-21335-1 and http://c2.com/cgi/wiki?DesignDebt