Technical Debt
When and How to treat "technical debt"
We need to avoid including changes (no matter how small or beneficial) that have nothing to do with the ticket. I understand that this isn't Live code and the containerized version is still a work in progress, but it will make things more difficult for tracking purposes later on. Those changes should be tracked in separate tickets and PRs.
I beg to differ. If you only address technical debt, be it a spelling mistake, formatting, or just better error handling, if you put the requirement that every change needs to be documented and accounted for by some sort of issue tracking system, the overhead and non-sexiness of cleanup will rarely, if ever, get done.
And Gemini agrees with me:
You have hit on one of the most frustrating, universal truths of software engineering: if technical debt requires a dedicated ticket, a product manager will eventually bury it at the bottom of the backlog to die.
Your experience is totally valid. When debt is formalized into a ticket, it suddenly has to compete with new features that bring immediate revenue. Features almost always win.
The short answer? You should do both, but you need to draw a hard line between "Micro-Debt" and "Macro-Debt."
Here is how to strike the right balance so things actually get fixed without you getting bogged down in endless paperwork.
1. The Boy Scout Rule: Handle "Micro-Debt" In-Stride
If you are already working in a file and notice messy formatting, confusing variable names, lack of test coverage, or minor code duplication, fix it right there. Do not create a ticket.
Think of tech debt like dishes in a kitchen. You don't file a ticket to wipe down the counter after making a sandwich; you just do it as part of the process.
The 20% Rule: A good rule of thumb is that up to 20% of your time on a feature ticket can be implicitly spent on cleaning up the immediate area you are touching.
How to frame it: If anyone asks, this isn't "extra work." This is the cost of implementing the feature correctly and safely. You are keeping the codebase maintainable.
Crucial Rule: The clean-up must match the scope of your ticket. If you are fixing a bug in
user_profile.py, don't rewrite the entireauthenticationmodule in the same pull request. That leads to scope creep and risky code reviews.2. When to Actually Fill Out the "Paperwork" (Macro-Debt)
You cannot—and should not—sneak massive architectural changes into a minor feature ticket. If the refactor requires rewriting an entire database schema, switching a major library, or will take more than a few hours, it needs a ticket.
If you try to slide massive changes under the radar, your pull requests will become unreviewable, deployments will get risky, and you will frustrate your team.
3. How to Make Sure Tech Debt Tickets Actually Get Done
If you do have to create a ticket for Macro-Debt, here is how to prevent it from dying in the backlog graveyard:
Tie it to Pain, Not Aesthetics: Don't write a ticket that says "Clean up old API code because it's messy." PMs will ignore it. Write: "Refactor old API code to reduce page load time by 400ms and stop flaky CI test failures." Translate the debt into business pain (speed, stability, developer velocity).
Advocate for a "Tax" System: Work with your team to establish a dedicated capacity rule. For example: "80% of our sprint goes to features, 20% goes to technical debt and maintenance." This keeps the pipeline moving without needing to beg for permission every single sprint.
Group it into a "Fix-it" Day: If tickets are piling up, lobby for a quarterly "Quality Sprint" or a monthly "Fix-It Friday" where the team tackles nothing but the top-voted debt tickets.
The Bottom Line
Leave the campground cleaner than you found it for the daily stuff. For the massive, structural changes, write the ticket—but learn to pitch it as a performance and stability upgrade, not just a cleanup.
Comments
Post a Comment