Lesson 6 of 14 · 18m
Technical Debt Is a Loan With Interest
Debt is code that makes every future change cost more — take it deliberately, write it down, and pay it in small installments.
Ward Cunningham coined the metaphor at OOPSLA 1992 while shipping the WyCash financial system: shipping an immature understanding of the domain is like borrowing money — you get speed now, and you pay interest in every slower change until you pay the principal back. The interest isn't shame. It's the extra day every feature takes because the code it's bolted onto fights back.
Two wrong mental models do the damage. First: "debt is sloppy code written by careless people." Most real debt was the right call at the time — the domain moved, requirements changed, the deadline was real. Second: "we'll pay it back later" said into the void. Debt you don't write down never gets repaid; it just compounds invisibly until a simple change costs a week.
The quadrants worth knowing
Martin Fowler's taxonomy is a 2x2 — deliberate/inadvertent crossed with prudent/reckless:
- Deliberate and prudent — "we'll ship without pagination to hit the launch, and ticket the fix." Legitimate leverage. This is what debt is for.
- Deliberate and reckless — "no time for design." That's not a loan, it's a default waiting for a date.
- Inadvertent — "now we know how we should have built it." The most common kind, and unavoidable: you can't pay attention to a design you hadn't learned yet.
How the interest actually gets charged
You see it in the telemetry before anyone says the word: cycle time grows, and bug reports cluster on the same files. Every developer who touches legacy_auth/ pays a toll. The payment mechanisms that work are boring and continuous: the boy-scout rule (leave each file slightly better than you found it — small refactors in the files you're already editing for real work), and the strangler fig pattern for the big ones — Fowler named it after the vine that grows around a tree until the tree dies; you route new work around the old system until nothing calls it, then delete it. The strangler exists precisely because the alternative — stop everything and rewrite — is the failure mode from the refactoring lesson.
The cheap instrumentation is enumeration. grep -rn "TODO" src/ lists the debt you already wrote down, and the issue tracker can graph how long each entry has sat unpaid and what it costs in the meantime. Debt you can list is debt you can schedule payments on; the entries that hurt are the ones nobody enumerated — they surface as "everything in this folder takes a week."
Naming debt when you take it
Deliberate debt needs a ledger entry at the moment you borrow — a ticket, an owner, and a // TODO(billing#412) anchored to the line that will need rework. "We'll fix it later" without a pointer is how debt becomes invisible, and invisible debt is indistinguishable from architecture until it bills you. Fowler's deliberate-and-prudent quadrant is legitimate leverage precisely because the payback was planned when the loan was taken.
What inadvertent debt looks like
You built the domain model on what you knew in January; by September the business grew a case the model doesn't fit. Nobody wrote bad code — the world changed under it. The signal is identical: every new feature in that area costs more than it should, and the bug tracker clusters on the same files.
What you must never borrow against
Some debts can't be repaid because the damage escapes the codebase: security holes, corrupted data, leaked credentials. "Ship now, fix auth later" isn't leverage — the interest gets paid in an incident report.
Try it yourself — debt on the ledger, in JS
// Debt you take deliberately gets a name and an owner:
const ledger = [
{ item: "admin endpoint lacks pagination", owner: "billing#412", taken: "2026-11" },
];
console.log("tracked debt:", ledger[0].item, "->", ledger[0].owner);
// A TODO with a ticket is a loan. A TODO with nothing is a default.The practice
When you take debt, name it — ticket, owner, a dated // TODO in the code. Pay interest in every file you touch — the boy-scout rule is the compounding that runs in your favor. And never take on debt that can cost more than the codebase itself.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
systemd Added Rust by Refusing Almost Everything Rust Offers
The headline was "systemd adopts Rust." The commit, which I read in the tree, rejects most of how Rust is normally used: no standard library, no cargo, no crates, no rewrites, no Rust in shared libraries. The reasoning is a quiet argument about where systemd's real attack surface is.
Next.js Shipped Seven Advisories and Six of Them Are the Cache
The November 2026 Next.js security release patches seven issues, and six live in the new Cache Components layer, the feature meant to make your app faster by remembering more. Three hit self-hosted next start specifically: the ones Vercel's own platform quietly absorbs.
The Same Researcher Broke apt the Same Way Twice, Seven Years Apart
In 2019 Max Justicz showed apt would install a package an attacker swapped in over a redirect. In November 2026 he did it again, CVE-2026-109518, through a different door that ends in the same place: code as root from a man in the middle. The fix shows how apt reuses files on disk.
Java Pulled Primitive Patterns After Five Previews. JDK 28 Won't Compile Them.
Primitive types in patterns, instanceof, and switch previewed in every JDK from 23 to 27. On November 9 the Amber team withdrew the feature, and it won't be in JDK 28 even with --enable-preview. Here's why Valhalla changed the plan, what replaces it, and how to rewrite code that used it.