Technical debt is a common concern among software engineers. But we don't often think about it in the right terms.
After you take out a loan, you (usually) have to make interest payments.
If you cannot make interest payments in full, in the short term, your debt grows. If you continue to be unable to repay interest, you may have to declare bankruptcy. This means that you may lose your assets to pay down the debt.
If circumstances are good, you will be able to both make interest payments and pay down the debt. After enough of these payments, you will be debt-free.
Introducing technical debt to a codebase is equivalent to taking out a loan.
You must now make continuous interest payments on the loan. Interest can come in various forms. One is engineering time spent on fixing bugs or regressions. Another is an increase in operational load from running the system in production.
Technical debt will grow if you do not have enough income (engineering time) to meet its costs. Lacking the time to make proper bug fixes, engineers will introduce yet more debt to the codebase.
If this situation remains unchecked, you may have to declare technical bankruptcy. This is a terrible situation: you must now drop all other work to fix the technical debt. In the worst case, you may have to drop all support for the system while you rewrite it completely from scratch.
There are often good reasons for taking out a loan. For example, it might enable us to make an investment that has a large payoff in the future.
As with loans, so too with technical debt. We must make tradeoffs between technical debt and investment in new features. Those features may pay off in the form of more profits, enabling us to hire more engineers. Thus paying down technical debt becomes much easier.
Just as with real debt, technical debt requires careful management.
We should not be afraid of technical debt for its own sake. What should concern us is poor planning.
If you were going to use a loan to make an investment, it would be prudent to make a plan. This plan would model both the loan's value and the investment's value over time.
Technical debt is harder to model. But we should carefully consider both its cost and the opportunity cost of not taking it on. We should also keep track of our current debt, what it is costing us, and what headroom is available to take on more.