All codebases have technical debt. Sometimes we reluctantly pass by leaving a TODO to clean it up later and sometimes we act on the urge to go on refactoring binge to clean it up. Addressing technical debt can be rewarding and useful, but how can we make sure that it is not simply left to the whim of a good samaritan? And can such work be consistently seen and encouraged by engineering leadership?
Following the trope of "you can't improve what you don't measure", at Slack, we have employed code health score: an empirical measure that provides visibility into cumulative and team-based technical debt to address these questions. But measurement alone isn't enough; it's equally important to integrate such measurement into the day-to-day engineering culture of the team.
This talk provides the formula for building a code health score for any codebase, touches on the nuances of its implementation on Android/iOS, and shares lessons learned about integrating this tool into the engineering process.