Every shortcut taken in the code ends up being paid for. A change takes longer, one fix breaks something else, a new developer needs weeks to find their way around. That is technical debt. Here is where it comes from, what it costs, how to measure it, and how to pay it down without rewriting everything.
Ward Cunningham introduced the image in 1992: shipping imperfect code is like taking out a loan. The loan saves time right away. But as long as it is not paid back, every change costs a little more: that is the interest.
Martin Fowler gives a simple reading of it. Suppose a change that would take four days in clean code takes six in the current code. The two extra days are the interest. Cleaning up that code would cost five days: that is the principal. The whole question is when it is better to keep paying the interest, and when to pay back the principal.
Not all debt is a mistake. Martin Fowler classifies it with two questions: did the team know? Was it reasonable?
| Reckless | Prudent | |
|---|---|---|
| Deliberate | "We don't have time to do it right." | "We ship now, and fix it right after." |
| Inadvertent | "We didn't know it was bad practice." | "Now we know how we should have done it." |
In practice, it builds up for well-known reasons:
| Where | Examples |
|---|---|
| In the code | Excessive complexity, duplication, coding rule violations, ignored compiler warnings, dead code. |
| In the design | Tightly coupled modules, circular dependencies, poorly split responsibilities. |
| In the tests | Insufficient coverage, fragile or missing tests on risky code. |
| In the dependencies | Outdated libraries, vulnerable versions. |
| In the documentation | Undocumented design choices, knowledge held by a single person. |
Tools measure code debt well, part of design and test debt, and vulnerable dependencies. The rest needs a human review.
CISQ estimates the cost of poor software quality in 2022 at no less than $2.41 trillion, and accumulated technical debt at about $1.52 trillion. According to its report, technical debt has become the biggest obstacle to making any change to existing code.
According to this study of about 1,000 developers, a developer spends on average 17.3 hours a week on maintenance, out of 41.1 working hours; 20.9 hours in France. Respondents attribute 13.5 hours a week to technical debt.
In practice, debt shows up as:
In embedded software maintained for decades, every change must also be verified again: the interest there is especially high.
Two approaches coexist.
The SQALE method, born in France, converts each detected defect into fixing time, then adds them up. The result speaks to decision-makers. It remains an estimate, which depends on the unit costs chosen.
Defects are mapped to a quality model, and the code gets a grade.
Either way, three principles matter more than the absolute value:
Management does not read rule violations. It understands three things.
And its trend, from one release to the next.
With projects of the same kind.
Delays, incidents, time lost.
The same measurement makes it possible to require a level from subcontractors. Enexis, for example, requires a TQI of at least 75% for the software of its smart meters. It also makes it possible to have a third party attest to a software's maintainability.
TiCS makes debt visible and measures how it evolves:
For a one-off, independent snapshot, the TQI quality audit is carried out by TIOBE. To have maintainability attested, the maintainability certification is issued by TÜViT.
TQI quality audit →
Maintainability certification →
Guide: static code analysis →
No. Debt taken on knowingly to meet a deadline, written down and paid back afterwards, can be a sound decision. The danger is the debt you don't see.
It can be estimated, by converting defects into fixing time. The figure gives an order of magnitude and a trend, not an accounting amount.
Rarely. A full rewrite is long, risky, and often creates its own debt. A gradual, targeted paydown gives safer results.
There is no universal figure. The key is to stop debt from growing in new code, then to pay it down first where the interest is highest.
It can create debt quickly, for example as duplication, complexity or rules not followed. The same measurements and the same quality gates apply to it.
A free TiCS proof of concept, installed and configured by a Precilog consultant, on a few applications of your choice. Or an independent snapshot with the TQI quality audit.
Static code analysis · MISRA C and MISRA C++ · TiCS · TQI quality audit · Maintainability certification · Learn
Sources: Martin Fowler, Technical Debt ↗ and Technical Debt Quadrant ↗; CISQ, The Cost of Poor Software Quality in the US: A 2022 Report ↗; Stripe, The Developer Coefficient (2018) ↗; CISQ, ISO/IEC 5055 ↗.