Skip to content
Careersintermediate

What is technical debt?

Updated Nov 30, 20263 min readBased on official documentation
What is technical debt?

In short

Technical debt is the extra work a team faces later because of shortcuts or messy code written earlier. It is a metaphor borrowed from money: the poor design is the debt, and the slower work it causes is the interest. Teams can pay it down gradually, especially in code they change often.

The core idea

Software tends to collect messy parts over time. Developers often call this cruft. Cruft includes confusing module structure, unclear names, duplicated logic and weak tests. None of it stops the program from running, but it makes every later change slower and riskier.

Ward Cunningham coined the term technical debt to describe this situation. He compared it to a loan. When you take a shortcut, you borrow time now and pay for it later. The extra effort each new feature costs because of the mess is the interest. The work needed to clean up the mess is the principal.

A simple example helps. Imagine a feature that would take four days in a clean codebase but takes six days in a confusing one. The two extra days are the interest. Cleaning up the structure might take five days. If you only add one feature, the cleanup does not pay off, because you would spend nine days in total instead of six. If two or three similar features are coming, the cleanup saves time overall.

Why estimates are hard

In theory, a manager could compare the numbers and decide. In practice, developer productivity is hard to measure. Estimates of how long a feature takes, how long it would take after cleanup, and how long the cleanup costs are all rough. Because of this uncertainty, a common approach is to pay down the principal gradually. For example, while building a feature, you can spend a little extra time improving the code you touch. Each small improvement lowers the interest on future changes.

This gradual approach has a helpful side effect. You naturally clean up the code you change most often. That is usually the code where cruft hurts the most.

Which cruft to fix first

The debt metaphor helps you decide what matters. Some parts of a system are messy but rarely change. If nobody needs to touch them, you pay no interest on them. Leaving stable code alone can be a sensible choice.

Parts of the system that change often are different. Every change there triggers the interest payment, so mess in those areas costs a lot. Teams usually want a low tolerance for cruft in busy code. The more often code changes without care for internal quality, the more cruft builds up.

The metaphor has a limit here. Real financial interest grows with time, while technical interest grows mainly when you work on the code. Keep this difference in mind when you explain the idea to others.

Deliberate and reckless debt

Some debt is taken on on purpose. A team may ship a rough version to meet a deadline and plan to fix it later. This can be a reasonable business choice. Other debt comes from not knowing better, or from ignoring quality under pressure. That kind is harder to manage.

A useful question is whether the debt was taken deliberately and whether it was prudent. Asking both questions helps teams talk clearly about the trade-off instead of arguing about whether something counts as debt at all.

Common mistakes

A common mistake is using debt as an excuse to skip quality work forever. Teams that take on debt to move faster often find that cruft slows down the very features they need most. In the end they can deliver later than if they had kept the code clean.

Another mistake is treating all debt as equal. Old debt in stable code may matter less than new debt in code that changes every week. Focus on the parts you touch often.

Finally, avoid vague complaints like the code is bad. Describe the specific cost, such as a feature that took two extra days because of a tangled module. Concrete examples make it easier to justify cleanup work to the people who plan the schedule.

Technical debt often comes up when teams plan work in short cycles. You can read more about one common approach in our guide to Scrum and about the wider mindset in Agile software development. The original article by Martin Fowler is a good next step: Technical Debt on martinfowler.com.

FAQ

Is technical debt always bad?

Not always. Taking on debt on purpose can help a team meet an important deadline. The problem starts when the debt is ignored and keeps growing without a plan to repay it.

Who coined the term technical debt?

Ward Cunningham introduced the metaphor. He used it to explain to non-technical people why messy code slows down future work.

Should we fix all the messy code in our project?

Usually no. Focus first on the areas you change often, because that is where the cruft costs you the most. Stable code that nobody touches can often wait.

How can I explain technical debt to a manager?

Use a concrete example. Say how many extra days a recent feature took because of messy code, and estimate how much time a cleanup would save on similar work.

Sources

This page is based on the official documentation below. Read it for full detail.

Technical debt — official documentation ↗
blozhikDeveloper news from across the web, explained. Every story links to its original sources.