Let us prepare to grapple with the ineffable itself, and see if we may not eff it after all.
â Douglas Adams, Dirk Gentlyâs Holistic Detective Agency
The Situation
âUgh, the codebase is just such a mess,â my new Tech Lead said. âItâs just cruft on top of cruft, never cleaned up, always âafter the next releaseâ. No wonder we keep getting bug reports faster than we can fix them.â
Not what you want to hear as the freshly-appointed Engineering Manager on a critical team. Leadership expects the team to deliver on key new features, but also, there better not be any voluntary churn.
I went to talk to the Product Manager. âTech Debt?â he said, âsure, we can tackle some tech debt - but letâs make sure to get some credibility first by hitting our OKRs. It wonât be easy.â
How did it get this bad?
Cut to three years earlier. I was a new hire on that very team. My onboarding buddy - letâs call him Buddy - and I bumped into a strange corner of the codebase.
âOh weird,â I said. âShould we fix that?â
âI have a strategy for this that you can use,â Buddy said. âWhen you run into code that seems off, that feels worth fixing, you write the issue down in a separate text file. Then you go do useful work.â
âOh, I see. And eventually, you get back to the text file and fix the issues?â
âNope. But at least youâve written it down.â
Wikipedia describes learned helplessness as âbehavior exhibited by a subject after enduring repeated aversive stimuli beyond their control.â Without support, this is how engineers come to feel about tech debt.
When I came back to this team as a manager, I reached out to Buddy, who had left years ago. âThe code is crap at Airbnb too,â he told me when we caught up, âbut at least they pay well and I donât have to work very hard.â
So what did you do?
I joined Airbnb.
Thatâs not true. We tackled the tech debt. We shipped leadershipâs key features, hit our OKRs, and cleaned up some terrible, long-overdue-for-deletion no-good code. Within 3 months, the teamâs attitude about technical debt had begun to turn around.
Hereâs how.
Tackling Technical Debt In Three Easy Steps
Guaranteed1.
Step 1. Empower
The biggest reason technical debt exists is because Engineers have internalized that itâs not their job to fix it. Start-up mantras like âfocusâ and âlet small fires burnâ have lead to just that - small fires everywhere.
âGet shit doneâ is a great mantra, but you still have to clean up after yourself.
The fix here is cultural. Make it clear that engineers who identify debt and take time to tackle it are appreciated. Celebrate their work to peers. A friend once created a slack bot that called out any PR that deleted a significant amount of code. Engineers all across the company began striving to get featured.
Now of course, the team does have actual work that needs doing. Empower doesnât mean âignore our actual workâ - it means, âif you take a Friday to fix something thatâs bothering you, I have your back.â
Step 2. Identify
If youâre on a team that hasnât been rigorous about tackling tech debt, thereâs probably lots of it and itâs unclear what could even be done. This is fixable.
Organize a brainstorm with prompts like
- What tasks take longer than they should?
- What is the most embarrassing part of our code to explain to new hires?
- What key pieces of our code have we under-invested in?
Thisâll set you up with a solid initial list for your Tech Debt backlog. For more ideas, run your codebase through a tool like CodeClimate to algorithmically point out the rough spots.
The first time we ran a brainstorm like this, everybody agreed that we had a handful of ideas that were so easy and valuable enough that we should do them right away. Like, that day. It felt like a breath of fresh air. Things are fixable.
Encourage folks to add to the Backlog anytime they ran into annoyances and didnât have time to fix it right there and then. In future team retros or brainstorms, identify any tech debt that comes up and add it onto the backlog.
Step 3. Prioritize
Having a tech debt backlog and ignoring it is worse than none at all.
Time to play Product Manager and use ICE to prioritize your tech debt on effort required to fix, impact that a fix would have on velocity, and confidence that the fix will actually work.
This gives you a list of potential projects. Some will take months; others, hours.
Now they just need to get done. Thatâll require buy-in from your Product Manager.
Getting Buy-in
When itâs time to have âthe talkâ with your PM, Iâve found âhow often should you clean your roomâ to be useful analogy.
Never cleaning your room is a bad idea and obviously so. Over time it becomes unlivable. This is how our engineers feel. At the same time, if youâre cleaning your room all day every day, thatâs not a clean room, thatâs excessive and no longer helpful. In moderation, messiness is healthy - it means youâre prioritizing. We donât need a glistening-clean room, but we do need to do more than nothing. At the end of the day, a clean room is a productive room.
Tackling Small Debt
Come together with your Product Manager and agree to a rate at which small debt projects can get added to the teamâs ticket queue. With a spiel like the above, you can hopefully get ~10% of all work done to focus on debt, depending on the maturity of the team and the company.
For ~week-long projects, try to leverage particular times of year like Hack Weeks and pitch high-value projects to engineers looking for a fun project.
Tackling Heavy Debt
This is where good leadership helps. At this particular company, Engineering leadership had rolled out âQuality OKRsâ. Every quarter, each team had to sign up for a meaningful âqualityâ OKR goal.
What is a âqualityâ goal? This was left up to teams, but the gist of it was, just go fix the most painful thing that isnât already translated in your business metrics.
Subscribe to Engineering Growth
Stay up to date on new essays and updates on Growth Engineering.
During quarterly planning, we whittled the top three âheavy tech debtâ projects into proposals, got buy-in from leadership, then brought the ideas back to the group.
Since quality projects had been blessed from top-down and indisputable, the PM had air cover to support the work without pushback.
So what happened?
Was there still tech debt? Yes. Did it continue to accumulate? Of course. But did it feel inexorable? Not anymore.
-
Not guaranteed. â©
Tags: #engineering-management