Metrics Driven Reengineering and Continuous Code Improvement at Meta
Abstract
The focus on rapid software delivery inevitably results in the accumulation of technical debt, which, in turn, affects quality and slows future development. Our primary aim is to discover how companies keep their codebases maintainable and how code improvements might be automated. Method: we investigate Meta practices by collaborating with engineers on code quality (via action research) and by analyzing rich source code change history using mixed-methods to reveal a range of practices used for continual improvement of the codebase. Results: Code improvements at Meta range from completely organic grass-roots done at the initiative of individual engineers, to regularly blocked time and engagement via gamification of Better Engineering (BE) work, to major explicit initiatives aimed at reengineering the complex parts of the codebase or deleting accumulations of dead code. Over 14% of changes are explicitly devoted to code improvement and the developers are given "badges" to acknowledge the type of work and the amount of effort. Based on the interactions with development teams we suggest metrics to help prioritization of code improvement efforts. Finally, our models of the impact of reengineering activities revealed substantial improvements in quality and speed and reductions in code complexity. Overall, code improvement activities are relatively effort intensive yet simple enough to be prime targets for automation.
BibTeX
@inproceedings{Mockus-al:ASE25,
author = {Audris Mockus and
Peter C. Rigby and
Rui Abreu and
Anatoly Akkerman and
Yogesh Bhootada and
Payal Bhuptani and
Gurnit Ghardhora and
Lan Hoang Dao and
Chris Hawley and
Renzhi He and
Sagar Krishnamoorthy and
Sergei Krauze and
Jianmin Li and
Anton Lunov and
Dragos Martac and
Fran{\c{c}}ois Morin and
Neil Mitchell and
Venus Montes and
Maher Saba and
Matt Steiner and
Andrea Valori and
Shanchao Wang and
Nachiappan Nagappan},
title = {Metrics Driven Reengineering and Continuous Code Improvement at Meta},
booktitle = {ASE},
pages = {3251--3261},
publisher = {{IEEE}},
year = {2025},
}