Definition
What it is
Ward Cunningham coined the metaphor in 1992 to explain to business stakeholders why refactoring mattered. Shipping a quick hack is like borrowing money: you get velocity now, but you pay interest (slower future changes) and eventually principal (a rewrite). Interest compounds. Small hacks become architectural constraints.
Not all debt is bad. Reckless debt (no tests, no docs) is bad. Prudent debt (ship without polish, refactor next week) is strategic. The distinction is intent and tracking.
Why it matters
McKinsey and Stripe have measured the cost: developers spend 20-40% of their time on debt-related work in mature codebases. A codebase with 5% debt is tolerable; 30% is a death spiral. Debt is measurable, manageable and reversible with discipline.
Types of debt
Type | Example | Interest |
|---|---|---|
Reckless deliberate | "Ship now, no tests" | High |
Reckless inadvertent | "We didn't know" | High |
Prudent deliberate | "Ship without polish, refactor next week" | Low, tracked |
Prudent inadvertent | "Now we know better" | Low, untracked |
The debt lifecycle
graph LR S[Shortcut] --> D[Debt recorded] D --> I[Interest: slower changes] I -->|refactor| P[Principal paid] I -->|ignore| C[Crisis: rewrite] style D fill:#E8F5E9 style C fill:#FFEBEE
How to manage it
Debt discipline
Track every deliberate shortcut
// TODO: refactor - see issue #123. Debt without a ticket is forgotten debt.Allocate 20% of each sprint
Dedicate capacity to paying down the worst debt.
Refactor with tests
Never refactor without tests. Debt + no tests = rewrite.
Boy scout rule
Leave every file better than you found it. Small continuous improvements.
Measure code churn
Files modified every sprint are debt hotspots. Prioritize them.
Common failures
Origin
Ward Cunningham (inventor of the wiki) introduced the metaphor in a 1992 OOPSLA experience report, explaining to management why refactoring mattered. The metaphor is now standard in software engineering education. Martin Fowler (2003) popularized the four-quadrant model (reckless/prudent × deliberate/inadvertent).
Shipping first-time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite. The danger occurs when the debt is not repaid.
— Ward Cunningham, 1992 (paraphrase)
Evidence
FAQ
- How do I measure technical debt?
SonarQube, Code Climate, or simple metrics (cyclomatic complexity, lines per file, test coverage). None is perfect.
- When to rewrite?
Almost never. Rewrite only if the code cannot be changed incrementally and the cost of staying is higher than the cost of rewriting.
- Is debt always bad?
No. Deliberate, tracked, small debt is a strategic tool.
- How much time to allocate?
10–20% per sprint. Less if debt is low; more if it's high.
Connections
- refactor
- code-smell
- legacy-code
- continuous-improvement
Cunningham, W. (1992). The WyCash Portfolio Management System. http://c2.com/doc/oopsla92.html
Stripe (2018). Developer Coefficient. https://stripe.com/reports/developer-coefficient-2018
Fowler, M. (2003). TechnicalDebt. https://martinfowler.com/bliki/TechnicalDebt.html
Etymology
Origin: metaphor
technical(adjective): from Greek technē, "art, craft"debt(noun): from Latin debitum, "thing owed"
Semantic network
● broader ● narrower ● related
Broader
software-quality
Related
refactorcode-smelllegacy-codecontinuous-improvement
Used in the garden
- Architecting API Dominance: Design a REST API That Scales From Day One (3×)
- Unmasking the Silent Killer: How Slow Websites Steal 30% of Your SaaS Revenue (1×)
- Mastering Headless: Directus & Next.js for Hyper-Efficient SaaS Devs (1×)
- Mastering Database Schema Version Control: The DevOps Secret Weapon (1×)
- Technical SEO Audit: Uncover & Fix Hidden Ranking Leaks for Dominance (1×)
- Unleash Hyper-Relevance: Build Your Niche Search Engine with Meilisearch (1×)
- The Overlooked Blueprint: How Micro-SaaS Acquisitions Create Generational Wealth (1×)
- LatAm Startup's Lifeline: Core Web Vitals Audit Doubles Conversions in 48 Hours (1×)
Sources
Cunningham, W. (1992). http://c2.com/doc/oopsla92.html
Stripe (2018). https://stripe.com/reports/developer-coefficient-2018