DEV Community

Discussion on: Dealing with Technical Debt

Collapse
 
eljayadobe profile image
Eljay-Adobe

There's two kinds of technical debt. Internal and external.

Internal technical debt is created by the team. For all the excuses we're all familiar with: deadlines, expediency, pressure, rushed, mistakes. The book Clean Code by Robert Martin discusses in depth on how to avoid and correct that kind of technical debt. And paints a clear picture of exactly who to blame: us, the developers.

One of my former bosses had a quote that I love, “If you don’t have the time to do it right, when will you find the time to do it over?” The quote is associated with various people (even though the quote existed before they were born), I'm not sure who deserves attribution.

External technical debt is inflicted upon the application by forces outside of the team's control. Browsers change. C++98 evolves into C++17. Windows 7 evolves into Windows 10. Mac OS 9 becomes Mac OS X. Objective-C gives way to Swift. Best practices in UI of 1995 is clunky by best practices in UI of 2017.

All the points that Adam made apply to both kinds of technical debt. Clean Code can help reduce internal technical debt, and help prevent future debt.

Some may be tempted to say "Hey, I have a great idea! Let's start over! Then we won't have all this terrible technical debt baggage!" I'm vastly more in favor of the "work with what you have; renew, renovate, and refactor from within incrementally" approach. The kind that Adam outlined.

The "big do over" is appealing and tempting, but it is super-risky and expensive. It can work out successfully (I have seen it happen), but it is more likely to go sour (I have seen that happen, too).