What is technical debt? Explained with a credit card
Technical debt is the future cost of a shortcut in software: it gets work out sooner, but later changes take longer until it is fixed. Like a credit card balance that charges interest until you pay it off.
- Author
Umair Mateen- Published
- Reading time
- 5 min
- Category
- Engineering
In one sentence: Technical debt is the future cost of a shortcut taken in software today: the quick fix gets the work out sooner, but every later change to that part takes longer until someone goes back and does it properly.
The everyday picture
Think of paying with a credit card. You need something today, but the money arrives next month. The card lets you buy it now and pay later. Used with a plan, that is a sensible tool.
The catch is the balance. While it stays unpaid, you pay interest on top. Small extra charges keep arriving, and if new purchases pile on, the balance can grow until the interest eats much of your monthly budget.
Technical debt works the same way. A team takes a shortcut in the code to meet a deadline. That is the purchase. The shortcut stays in the software as an unpaid balance, and the "interest" is the extra time every later change in that area costs.
A shortcut leaves an unpaid balance in the code. Every later change there costs extra time, until the team cleans it up and changes get faster again.
How it works, step by step
- The team takes a shortcut (the card purchase). To ship sooner, they copy code instead of sharing it, skip some tests, or bolt a feature on where it does not quite fit.
- The shortcut stays in the code (the unpaid balance). The software works, so customers notice nothing. But the code is now harder to understand and change than it needs to be.
- Each later change costs extra time (the interest). Developers must work around the messy part, and changes there are more likely to break something. Martin Fowler gives an example where a feature takes six days instead of four: the two extra days are the interest.
- The team pays it down (paying off the balance). They spend time cleaning up that code, often called refactoring. The Agile Alliance calls the time this fix takes the principal.
- Changes get faster again (no more interest). With the balance cleared, new features in that area take their normal time.
Try it · Everyday ↔ real
Match the credit card to the code
Switch between the two and see how each part lines up.
- Buying now, paying later
- The unpaid balance
- Monthly interest
- Paying off the balance
Paying with a credit card
| Everyday | Real |
|---|---|
| Buying now, paying later | Taking a shortcut to ship sooner |
| The unpaid balance | Messy code left in the software |
| Monthly interest | Extra time on every later change |
| Paying off the balance | Refactoring the code |
Where the picture stops
- Card interest is charged every month, whatever you do. Technical debt only "charges interest" when someone works on that part of the code. Fowler points out that messy code nobody touches may cost very little.
- A card statement shows your exact balance. Nobody sends a statement for technical debt. It has to be estimated, which is why experts advise making it visible and tracking it.
- You choose every card purchase. Some technical debt is never chosen: it appears later, when the business learns something new and an earlier design no longer fits.
Why it matters for your business
- Speed now, or speed later: a shortcut can help you hit a launch date or test an idea quickly. The Software Engineering Institute notes that debt managed on purpose can help a business catch time-sensitive opportunities.
- Slower delivery if ignored: the same source warns that unmanaged debt keeps growing and can slow new features below the pace the business needs.
- Risk: tangled code is easier to break, so more changes can mean more bugs reaching customers.
- Better budget talks: asking your team "where is our debt, and what is it costing us?" turns a vague complaint about slow work into a decision you can plan for.
Try it · What would you do?
A launch is two weeks away. What would you do?
Your team says it can hit the launch date only by taking a shortcut in how orders are stored. Doing it properly would push the launch back three weeks.
Pick what you would do. You can change your mind.
An example
Imagine a 20-person travel agency adding online booking before the holiday season. To launch in time, the developers copy the pricing rules into three different places instead of keeping them in one. Bookings work, and the season goes well. In spring, the agency changes its fees. Now each change must be made three times, and once a copy is missed and some customers see the old price. The team spends a week moving the rules back into one place. After that, fee changes take an hour again.
Frequently asked questions
Is technical debt always bad?
No. Like a credit card, it can be a sensible choice when you know you are taking it on and plan to pay it back. It becomes a problem when it is ignored and keeps growing.
Who came up with the term?
Ward Cunningham, a software developer, used the debt metaphor in a 1992 conference report to explain why teams need to go back and improve code they have already written.
How do teams pay down technical debt?
Usually by refactoring: improving the inside of the code without changing what it does for users. Many teams fix a little each time they touch an area, and give priority to the parts that change most often.
Is technical debt the same as bugs?
Not quite. A bug is something that works wrongly today. Technical debt is code that works but is harder to change than it should be, though it often leads to more bugs later.
Related explainers
Sources
Could you explain this to a colleague now?
Mark it and posts that mention it will show a tick. Saved in this browser only.