Technical Debt
The tradeoff between shipping a faster, less-ideal solution now and the ongoing cost of living with or fixing it later, much like financial debt.
What is it?
Sometimes a team ships a quick, hacky version to hit a deadline, planning to do it properly later. Sometimes nobody realizes a shortcut was a shortcut until a "simple" change turns out hard months later. Both are technical debt, an idea borrowed from finance.
Like financial debt, it isn't bad in itself. Borrowing to seize a real opportunity can be the right call. Shipping two weeks early might win a customer, validate an idea, or hit a deadline that truly matters.
What you must take seriously is the interest: the extra cost you keep paying while the debt is unpaid. A rushed module makes every later change slower, every bug harder to find, and every new engineer slower to understand it.
Left alone, the interest compounds. The mess makes the next shortcut more tempting (doing it properly next to a mess feels pointless), which makes the codebase harder to work in, which makes more rushed shortcuts likely: a debt spiral.
The discipline isn't "never take on debt". It's knowing you took it on, doing it on purpose, and having a real plan (ideally written down, like an ADR) to pay it down before the interest outweighs what the shortcut bought.
Explain like I'm 10
Borrowing money to open a store sooner can be a reasonable trade, but you pay interest every month until it's repaid. Ignore it for years and the interest alone can exceed what you borrowed. Unaddressed 'quick and hacky' shortcuts in a codebase work the same way.
Examples
Taking on technical debt deliberately, and marking it
// TECH DEBT: hard-coded to a single currency (USD) to hit the launch
// deadline. Proper fix: support the Money value object with currency
// conversion once international launch is scheduled. Tracked in JIRA-482.
function calculateTotal(items) {
return items.reduce((sum, item) => sum + item.priceInCents, 0);
}The shortcut is real (no multi-currency support), but it's explicit, explained, and linked to a tracked follow-up. The team knows what was borrowed and how it will be paid back.
The same shortcut, left as invisible debt
// No comment, no ticket — just a plain-looking function
function calculateTotal(items) {
return items.reduce((sum, item) => sum + item.priceInCents, 0);
}
// Six months later, "add support for EUR customers" turns into a much
// bigger project than expected, because nobody remembered — or ever
// knew — that currency was hard-coded everywhere this function is used.Identical code, but nobody admits a shortcut was taken. The 'interest' now includes not just the eventual fix but first rediscovering that the debt exists.
How it works
Technical debt charges "interest" in concrete ways:
- Slower feature work in and around the affected code.
- More bugs, because the shortcut skipped edge cases.
- A steeper learning curve for anyone new to that code.
Paying down the debt (refactoring, rewriting, adding missing tests) is the "principal payment". It costs real time up front but stops the interest.
When to pay is a real engineering-management tradeoff. Too early, and you may rework something that never mattered. Too late, and the interest may already outweigh what the shortcut bought.
Why does it exist?
"Always write it properly the first time" isn't realistic with real deadlines, uncertain requirements, and limited time. Sometimes a fast, imperfect solution is the right call.
Calling it "debt" gives teams an honest, shared way to discuss shortcuts, without pretending they don't exist or treating each one as an unforgivable mistake. It's a financial tradeoff to manage, not a moral failing to deny.
When to use it
Take on debt deliberately when the short-term gain (hitting a real deadline, validating an uncertain idea before investing more, unblocking a critical launch) clearly outweighs the interest, and especially when you have a realistic plan to pay it down.
It's also fine to keep some debt permanently in low-stakes code or code likely to be thrown away soon.
When not to use it
Don't take on debt silently, without acknowledging, tracking, or telling anyone. That turns manageable debt into a hidden trap for whoever finds it next.
Also avoid new debt in an area already deep in high-interest debt. At that point you need a deliberate repayment effort, not another shortcut.
Common mistakes
Treating all technical debt as bad and refusing any shortcut, even when shipping something imperfect quickly is the right call.
Taking on debt without recording it anywhere (a comment, a ticket, an ADR), so it turns invisible and gets rediscovered the hard way.
Letting debt pile up with no repayment plan until the 'interest' (slower development, more bugs) is the team's biggest ongoing cost.
Practice exercises
- Easy:
Describe a shortcut you've taken (or seen) in real code, and what its ongoing 'interest' has been.
- Medium:
Write a short tech-debt tracking note (like the comment example above) for this shortcut: a search feature that only does exact string matching instead of fuzzy search, to hit a launch date.
- Hard:
Propose a lightweight process for a small team to record technical debt and revisit it regularly, instead of letting it pile up silently. Consider how it connects to sprint planning or code review.
Interview questions
What is technical debt, in your own words?
The ongoing extra cost of choosing a faster, less-ideal solution now instead of a more thorough one. Like financial debt, the shortcut is the 'principal' and the extra cost of working around or fixing it later is the 'interest'.
Is taking on technical debt always a bad decision?
No. It can be a reasonable tradeoff, like shipping a simpler solution to hit a real deadline or validate an idea, as long as the debt is acknowledged, tracked, and has a realistic plan to address it before its cost outweighs the benefit.
What's the danger of undocumented technical debt specifically?
It's invisible. Future engineers don't know a shortcut was taken, so they can't plan for it, and it's usually rediscovered only when it causes an unexpectedly hard bug or feature.