How to Treat Technical Debt

Published March 23, 2022

Let’s start with a quick refresher on technical debt. The Wikipedia article about technical debt sums it up nicely

In software development, technical debt (also known as design debt or code debt) is the implied cost of additional rework caused by choosing an easy (limited) solution now instead of using a better approach that would take longer.

So essentially you can think of technical debt as the code you write that is a bit “smelly” or “hacky”. It’s the code you wish you had time to do a better way, but you need to make sacrifices in order to get something shipped.

Before diving into technical debt, let’s talk about another kind of debt most people are familiar with, financial debt. There are plenty of different opinions in the world about how to treat financial debt. Some say that it should be avoided at all costs, while others don’t pay close attention to their debt until it becomes overwhelming.

But there’s another approach to debt. Treating it like a tool. Like any tool, it’s not inherently bad, it just depends on how you use it. For example, taking a small business loan would help someone kickstart their business. They could save for years on their own, but taking the loan will help them achieve their goals faster.

I like to think of technical debt the same way. Write some code in a “hackier” but faster way so that you can ship faster, then eventually go back and pay off some of that debt by adding better abstractions or a better architecture. It’s also likely that you’ll end up with a better design the second time around as you’ll have additional experience/context around the problem than you originally did.

You do have to be careful though. Like any tool, technical debt can be misused. Too much and it becomes unmanageable, too little and you could be leaving some efficiency/speed on the table. Like almost everything in software development, it’s a tradeoff and one that you need to be especially conscientious of. Finding the right balance for the project/team you’re on, while certainly challenging, will be extremely helpful for long term growth