Handling Technical Debt: The Financial Advisor Approach
Junior Developers treat Technical Debt as a sin. "We can't ship this, it's messy!" CTOs treat Technical Debt as a tool. "We will leverage this debt to hit the Q3 deadline, and pay it off in Q4."
The problem is not the debt itself; it's the unmanaged debt. Just like a credit card, if you pay the balance every month, you get the rewards (speed). If you ignore the balance, the interest (bugs, slowness) bankruipts you.
In this guide, we stop treating debt as "code we feel bad about" and start managing it like a portfolio.
Here is what we'll cover:
- The Quadrant: Distinguishing "Reckless" debt from "Prudent" debt.
- The Interest Rate: How to prioritize what to fix.
- The Payment Plan: The "Boy Scout Rule" vs "Debt Sprints."
- The Script: How to explain this to non-technical stakeholders.
1. Classifying the Debt (The Quadrant)
Not all bad code is the same. Martin Fowler's "Technical Debt Quadrant" is the industry standard for categorization.
- Prudent/Deliberate: The only "Good" debt. You decided to hardcode the pricing tier to ship faster. You acknowledge it and plan to fix it.
- The Rest: Usually a sign of process failure or lack of training.
2. Calculating the "Interest Rate"
Why do we fix the typographer's CSS debt before the core database debt? Because we emotionally react to what we see. This is wrong.
You must prioritize debt by its Interest Rate: How much time does this debt cost us every week?
- High Interest: The CI/CD pipeline is flaky. (Costs the whole team 5 hours/week). FIX NOW.
- Low Interest: The innovative "Utils" class is ugly. (Costs nobody any time because we never touch it). IGNORE.
Mentor Tip: If a piece of code is ugly but stable, and you haven't touched it in a year, it has 0% interest. Do not refactor it.
3. The Payment Plans
You cannot stop all feature development to "rewrite everything." You need a payment plan.
Strategy A: The Boy Scout Rule (Amortized Payment)
"Leave the campground cleaner than you found it." If you touch a file to add a feature, you must fix one small thing (rename a variable, extract a function).
- Pros: Continuous improvement. Zero "approval" needed.
- Cons: Slow.
Strategy B: The Debt Tax (Fixed Payment)
Reserve 20% of every sprint for "Platform Health."
- Pros: Predictable.
- Cons: Product Managers constantly try to steal this time.
Strategy C: The Bankruptcy (Lump Sum)
A "Fix-it Week" or "Performance Sprint" where no features are shipped.
- Pros: Solves big structural problems (e.g., upgrading Rails versions).
- Cons: Hard to sell to the business.
Summary
Stop apologizing for Technical Debt. Manage it.
- Acknowledge it: "We are borrowing time from the future."
- Document it: Create a Jira ticket immediately.
- Pay it down: Use the Boy Scout rule for small things, and Business Cases for big things.
A debt-free codebase usually means a product that launched too late.
