In short: technical debt is the extra effort that earlier shortcuts and lessons add to every later change. Complexity, copies, old dependencies and missing tests show in code. Look at where they meet the code you change often.
Where the term comes from
Ward Cunningham used the metaphor in a 1992 experience report on a portfolio management system. He wrote that shipping first-time code is like going into debt. A little debt speeds up development, as long as it is paid back soon with a rewrite.
The interest is the time engineers lose working around code that is not quite right. The danger is debt that is never repaid. Cunningham warned that it can bring an entire engineering organisation to a standstill.
Martin Fowler describes it as a metaphor for cruft, the flaws in internal quality that make a system harder to change. The interest is the extra effort a new feature needs, and it is paid only when you work in that code.
Fowler also separates debt taken on purpose from debt that arises because the team did not know better yet. For strong teams, he argues, the second kind is inevitable: the moment you see what the design should have been, you have a debt.
What can be seen in code
Some traces of debt can be measured without asking anyone.
- Complexity. Functions with many branches, or very long functions, are hard to read and test.
- Copies. The same piece of code in several places must be changed in several places.
- Outdated dependencies. Packages far behind their latest version, deprecated or no longer maintained, and runtimes that no longer get security updates.
- Missing tests. Parts of the code without tests near them, so a change goes unguarded.
- Unused code. Functions and files that nothing uses, which still have to be read.
These are signs, not proof. A complex function that nobody ever changes costs little.
What cannot be seen in code
Other debt leaves no trace in the files.
- A shortcut taken on purpose and never written down.
- A design that no longer fits what the team has learned.
- Knowledge that lives only in someone's head.
- The reason behind a choice, which matters when you want to change it.
- shows in the code
- does not show in the code
Why one number misleads
Fowler writes that none of these costs is objectively measurable. Teams can estimate them, but not accurately.
Tools that give a single figure do not agree. A study of several tools on ten projects found very different results even for size, complexity and cycles. After adjusting for size, the files each tool called most problematic barely overlapped. Another study of eleven tools found that they define debt in very different ways, and that most are opaque about how they compute it.
The first study also looked at links with change and failure. Apart from size and complexity, code measures showed at best a weak link with how often files change or fail. Measures of files that change together worked better. These are single studies; read them as pointers.
A figure also invites a wrong conclusion: that debt can be paid off in a fixed number of days. The interest is only paid where you work.
What to look at instead
A study of production codebases found that low-quality code had far more defects, took longer to change and was less predictable. It used one commercial analysis tool, so read it as a pointer. It supports one practical idea: look where trouble and change meet.
- Hot spots. Files that are both hard to read and changed often. Debt in code nobody touches costs little.
- Tests near those files. Without them, every change is a risk.
- Dependencies near the end of support. These have a security cost as well as a maintenance cost.
- The trend. One snapshot says little; a rising line says more.
- A list with places, not a total. A list can be acted on.
The related pages cover how we measure debt and how we read code quality.
What we check of this
With fixed tools and without AI, we measure where the traces are. We count very complex and long functions. We find hot spots from the code and the history of the last twelve months. We count copied and unused code, each with file and line.
We check whether your runtimes still get security updates, and we read which tests exist near the code.
We give no amount and no score for debt, and we do not convert it into days of work. We clean nothing up. You decide what to tackle first.
Join the pilotSources, opened on 11 November 2026
- Ward Cunningham: The WyCash Portfolio Management System (OOPSLA 1992)
- Martin Fowler: Technical Debt
- Martin Fowler: Technical Debt Quadrant
- Lefever and others: On the lack of consensus among technical debt detection tools
- Pfeiffer and Lungu: Technical debt and maintainability. How do tools measure it?
- Tornhill and Borg: Code Red. The business impact of code quality
Written by the BlueLandscape team with the help of AI. Every statement was checked against the source above.