Before any trap, here is the central idea and every symbol/jargon word this page uses — each in plain words, plus a plain-English fallback for anyone who cannot render the math.
The whole page hinges on one inequality, so here is where it comes from — with a picture that builds it up one change at a time.
Walk the figure change-by-change (this is the new intuition, not just the formula): the yellow bars are stacked one per future change — each new change adds another block of height C0i to the interest tower, so you literally see interest grow step by step. The flat blue line is the principal P: you pay it once, so it never grows. For the first few changes the yellow tower is below the blue line — carrying the debt is cheaper. The moment the tower's top crosses the blue line (the red marker) is the break-even change; from there on, every extra block is pure waste you could have avoided by paying P.
Several traps below hinge on classifying debt. Here is the two-axis map, and — crucially — a worked classification so each corner is shown in action, not left for you to infer.
Read the figure: the horizontal axis is did we choose it on purpose? (Inadvertent ← → Deliberate); the vertical axis is did we do it with care/a plan? (Reckless ← → Prudent). The four corners are each labelled with a real quote, and the healthy corner is boxed in green.
False. Some debt is optimal — deliberate-prudent debt lets you ship value now; for code you'll rarely touch again, the fix cost P exceeds the interest you'd ever pay, so cleaning it loses money.
Technical debt and a bug are the same kind of problem.
False. A bug is wrong behaviour; debt is working code that is costly to change. You can have zero bugs today and still carry huge debt (a clever rushed feature with no tests).
If code has no bugs, it has no technical debt.
False. Correctness and changeability are independent axes. Untested, tightly-coupled, undocumented code can be perfectly correct today yet be painful and risky to extend tomorrow — that pain is the debt.
Interest on technical debt is a one-time cost.
False. Principal is one-time (the fix); interest is recurring — you pay the slowdown fraction i on every future change that touches the messy code, which is why it accumulates as nC0i across n changes.
Refactoring is always worth doing when you see messy code.
False. Worth it only when future interest beats the fix cost: P<nC0i. Concretely, with C0=2, i=0.5, fix cost P=6: if n=3 then interest =3×2×0.5=3<6, so leave it; if n=10 then interest =10<... wait — interest =10×2×0.5=10>6, so fix it. Same mess, opposite verdict, decided purely by n — see the break-even figure above.
Deliberate debt is always reckless.
False. "Deliberate" only means chosen on purpose; it can still be prudent if you know the consequences and track them (e.g. a logged ticket). It sits in the top-right corner of the quadrant figure, not the bottom-right.
Inadvertent debt means the team was careless.
False. Inadvertent means you didn't know better at the time — it can be prudent ("now we've learned how we should have layered this"), the top-left corner of the quadrant. Carelessness is the reckless axis, which is separate.
Adding more developers will pay down debt faster.
False (usually). Debt lowers changeability, so more people editing tangled, tightly-coupled code often create more merge conflicts and inconsistency. Repayment needs targeted refactoring, not raw headcount.
Skipping tests to hit a demo, with a ticket to add them next sprint, is reckless debt.
False. It's deliberate–prudent (the green ✓ corner): chosen consciously and tracked with a plan. The logged ticket is exactly what flips it from reckless to prudent.
A codebase with 100% test coverage has no test debt.
False. Coverage is a number, not a guarantee — flaky or assertion-free tests (which run code but never check its result) still create test debt because they don't give you confidence to change code.
"We can't measure debt because it's not money, so the P<nC0i rule is useless."
The error is thinking the units must be currency. P and C0 are in effort (days/points) and i is a fraction — the rule works fine in developer-time; you never need real money.
"This module has interest i=0.5, so we should fix it immediately."
The error is ignoring n. Interest rate alone decides nothing — total interest is nC0i. If n≈0 (dead-ish code), even a high i never gets paid, so don't fix.
"We eliminated all technical debt this quarter — great engineering!"
The error is treating zero debt as the goal. Over-cleaning cold code where P>nC0i wastes effort and delays features; the target is the optimal debt level, i.e. control, not elimination.
"The metaphor is about money, so debt is a finance problem, not an engineering one."
The error inverts the point. The money framing exists to let engineers explain an engineering problem to business people; the underlying issue is changeability, owned by the team.
"We'll refactor later when we have free time."
The error is that debt makes every future change slower and new debt piles onto old, so 'free time' shrinks over time — a debt spiral. Fix: make repayment scheduled (Boy-Scout rule / reserved sprint %), never conditional on spare time.
"Dependency debt isn't real debt — the code still runs."
The error is equating "runs today" with "no cost." Outdated libraries accrue interest as security patches, breaking API changes, and rising upgrade difficulty ("software rot") — the longer you wait, the bigger the eventual P.
"A // TODO comment means the debt is being managed."
The error is confusing labelling with managing. A TODO makes debt slightly visible but with no owner, priority, or schedule it's ignored. Real management needs a tracked register + prioritisation + a pay-down plan.
Why express debt as interest and principal instead of just "bad code"?
Because the financial framing captures the key insight the phrase "bad code" misses: the cost is recurring and grows with use, and there's a one-time price to stop it — this turns a vague complaint into a decidable trade-off (P vs nC0i).
Why does high-traffic code almost always justify repaying its debt?
Because n (number of future changes) is large, so accumulated interest nC0i easily exceeds any fixed principal P — you pay the slowdown over and over on exactly the code you touch most. Picture the yellow tower in the break-even figure growing tall fast.
Why is the Boy-Scout Rule an effective repayment strategy?
It repays debt continuously and locally — you clean the small area you're already editing, so cost is amortised into normal work and debt never balloons into a scary, deferrable "big refactor." See the staircase figure below for the shape of this path.
Read the staircase figure: the red curve is "pay it all later" — debt climbs untouched, then drops in one terrifying vertical cliff (a risky big-bang refactor). The green staircase is the Boy-Scout Rule — many tiny down-steps as you tidy each area you touch, so debt hovers low and never requires a cliff. Same total work, far less risk.
Why can debt make a team's velocity fall over time even with no new features skipped?
Because interest is paid per change: as debt grows, each story costs a bigger fraction more, so the same effort yields less output — velocity silently decays.
Why does missing test coverage cause fear of changing code, and why is fear itself a cost?
Without tests you can't tell if a change broke something, so developers avoid or slow down changes — that hesitation and manual re-checking is the interest, even before any bug appears.
Why is "refactor-before-feature" often smarter than a separate refactoring project?
Because you clean exactly the area with proven upcoming n (you're about to extend it), targeting repayment where interest is guaranteed to be paid — a standalone project risks cleaning code no one will touch.
Why does slow/manual CI count as technical debt?
Because a slow build charges interest on every commit (waiting, context-switching, batching risky changes), and there's a one-time principal to automate it — same P vs nC0i logic, just in infrastructure.
What is the "debt" decision when n=0 (code you'll never touch again)?
Future interest nC0i=0, so any positive P makes repaying a pure loss — leave it. On the break-even figure the yellow tower never rises off the floor.
At exactly P=nC0i (the break-even), should you pay or leave the debt?
In pure effort it's a tie, so the strict rule doesn't force a fix; but since repaying also cuts risk and fear (benefits the formula ignores), the practical guidance is lean toward paying at equality.
What if P is genuinely unknown or unbounded (a rewrite whose cost you can't estimate)?
You can't apply P<nC0i directly, so don't commit to a full rewrite blind — de-risk by making small incremental repayments (the green staircase, not the red cliff) that give real data on P before deciding.
Can debt exist with i=0 (a shortcut that never slows future changes)?
No — then nC0i=0 and there's nothing to pay interest on. Debt requires the mess to make future work harder; a shortcut with zero recurring cost is just a design choice, not debt.
Is it possible for adding tests to create debt rather than remove it?
Yes — brittle tests coupled to implementation details become test debt themselves: they break on every refactor, so their maintenance interest can exceed the safety they provide.
What happens to a debt item's classification once you notice it?
Inadvertent debt you've now spotted doesn't automatically become "good" — it becomes a known item you must consciously decide to keep (prudent) or fix. Awareness moves it out of the inadvertent (left) half of the quadrant into a deliberate choice.
If two debts have equal total interest nC0i, which do you repay first?
Prefer the one with higher iand frequent near-term n, because the slowdown hurts sooner — but also weigh coupling: fixing debt that blocks other changes unlocks more value than the raw number suggests.
Is zero technical debt ever the right target?
Only for a tiny, safety-critical, rarely-changing system where any interest is unacceptable. For normal evolving software, chasing zero wastes principal on cold code — the optimum is a small, controlled amount.
Recall One-line self-test before you leave
Cover this: "When is keeping debt the correct, professional choice?"
When ::: the future interest you'd avoid is smaller than the fix cost — formally P≥nC0i, typically low-n (cold or soon-deleted) code. Keeping it is prudent, not lazy.