What is technical debt?
The future cost of a shortcut taken now — the extra work created when code is written to be delivered rather than to be maintained. The metaphor is deliberate: like financial debt, it can be a sensible instrument, and like financial debt, it accrues interest.
Where the term came from. Ward Cunningham coined it to explain to non-technical stakeholders why a working product still needed further investment. His original meaning was narrower than current usage: shipping code reflecting your current understanding, then refactoring as understanding improves. Failing to do that second part is where the debt sits.
The useful distinction between kinds:
Deliberate and prudent — "we ship now and fix the architecture next quarter, and here is why". Legitimate, and frequently correct.
Deliberate and reckless — "we don't have time for design".
Inadvertent and prudent — "now we've built it, we can see how it should have been done". This is Cunningham's original case and is unavoidable.
Inadvertent and reckless — not knowing what good practice looks like.
What the interest actually looks like. Not a one-off cost, but a permanent tax on every future change: slower feature delivery, more bugs, changes that require touching many places, risky deployments, difficulty onboarding, and engineers avoiding parts of the system. The symptom leadership notices is that everything takes longer than it used to, with no single cause identifiable.
Where it accumulates: outdated dependencies; missing tests, which is the compounding kind because it makes every other repayment riskier; duplicated logic; undocumented decisions; dead code and unused feature flags; workarounds for problems since fixed; and infrastructure nobody dares touch.
How it is actually repaid: continuous small refactoring alongside feature work, which is far more effective than a rewrite; the "boy scout rule" of leaving code better than you found it; paying it down where you are about to work, since debt in stable untouched code costs nothing; tests first, to make change safe.
Rewrites usually fail, because they discard accumulated knowledge of edge cases while the old system continues to change.