Technical Debt: It's Not Just Bad Code
Martin Fowler describes Technical Debt metaphorically. Like financial debt, you can take it on to ship faster (buy a house), but you must pay interest (slower development later).
Good Debt vs Bad Debt
Intentional Debt (Good)
"We need to launch for the Black Friday sale. We will hardcode the banner logic for now and refactor it next week." Decision: Conscious trade-off. Speed > Cleanliness.
Accidental Debt (Bad)
"I didn't understand how React Context works, so I drilled props down 10 levels." Cause: Lack of knowledge or mentorship.
Bit Rot (Ugly)
"This library hasn't been updated in 3 years and now has security vulnerabilities." Cause: Neglect.
Signs You Are Bankrupt
- Velocity Drop: Simple changes take days.
- Regression Bugs: Fixing one bug creates two more.
- Fear: "Don't touch that module, it is haunted."
- Onboarding Pain: New devs take months to be productive.
How to Pay It Back
You cannot stop features to "rewrite everything." Management won't allow it, and rewrites often fail.
The Boy Scout Rule
"Leave the code better than you found it." If you touch a file to add a feature, clean up one variable name or extract one function.
The 20% Rule
Negotiate with product managers. 80% time on features, 20% on tech debt/refactoring.
Tech Debt Radar
Maintain a list. prioritizing by "Pain Frequency". If a hacky script breaks once a year, ignore it. If a messy Auth module causes bugs every sprint, fix it NOW.
Technical debt isn't a failure. It's a tool. Use it wisely.