Good and Bad Technical Debt

Henrik Kniberg had a good post about a month ago about technical debt and the difference between good and bad technical debt.  He compared it to meal preparation in the kitchen which I think was a good analogy.  When you are cooking a meal, your kitchen gets fairly messy.  You have lots of ingredients, dishes, and utensils out.  When you are done with the meal, you clean it all up.  If you don’t clean it all up, the next time you go to make a meal you would have to work around the mess making the process much slower (not to mention dealing with the smell).  Likewise, he makes the case that good technical debt is the mess we create in the code while actively working on it.  We keep things around commented out, try out various solutions, etc.  This is good, it speeds up the process of the current task helping to keep lots of useful information and/or pieces of code in our mind and at our fingertips.  He then makes the case that bad technical debt is often just good technical debt that didn’t get cleaned up.  It’s the dishes sitting on the counter from the night before we didn’t clean up.

He then also talks about how TDD can help avoid technical debt because it has a clean-up cycle (refactor) built in.  I really liked this post and analogy and I think it really helps explain better both what technical debt is and also some of the values of TDD.

Read more here

Comments on this entry are closed.

%d bloggers like this: