Technical debt is the future cost of choosing, in the present, a quick solution instead of a better one. Just like financial debt, it accrues “interest”: the longer it goes, the harder and more expensive it becomes to work on the code.

How it works

Technical debt appears when the team takes a shortcut: skipping tests, copying and pasting code, postponing an update or leaving a workaround “for now”. Sometimes the shortcut is a good decision, for example to launch a MVP quickly. The problem is forgetting to pay it back later.

The most common signs:

  • Any small change takes a long time.
  • Fixing one bug creates two more.
  • Nobody wants to touch a certain part of the code.
  • New people take weeks to understand the system.

Paying off the debt means improving the code without changing what it does, with refactoring, tests and dependency updates.

Practical example

You build an online store in two weeks and, to save time, copy the same discount rule in five places. It works.

Six months later, the rule changes. You update four places and forget the fifth. Some customers receive the wrong discount. Each new adjustment costs more, because you need to remember all the points.

Paying off the debt would be to centralize the rule in a single function and create a test for it.

What it's for

The concept is used to talk clearly about maintenance cost. It helps explain to people who do not program why sometimes it is necessary to stop creating features and fix the foundation.

With AI, the care is double. Agents generate code very fast, and that also accelerates debt accumulation if nobody reviews it. Good practices: ask for tests, run linter and do code review. On the other hand, AI also helps pay off debt, suggesting refactorings and writing tests.

Difference between technical debt and bug

A bug is wrong behavior. Technical debt is a bad structure that still works, but makes everything slower and riskier. The debt does not break today, but increases the chance of bugs tomorrow.