一句话:以 Meta 为案例研究持续代码改进实践,提出指标与激励机制,并建模再工程对质量、速度和复杂度的影响。
快速软件交付常导致技术债积累,损害质量并拖慢后续开发。本文研究企业如何保持代码库可维护并自动化代码改进,以 Meta 为案例,通过行动研究与工程师合作,并用混合方法分析源代码变更历史。实践涵盖工程师自发的草根改进、Better Engineering 游戏化与固定时间投入,以及针对复杂代码的大型再工程和死代码清理。超过 14% 的变更明确用于代码改进,开发者获得徽章以认可工作类型和投入;作者提出用于优先级排序的指标。对再工程影响的建模显示质量与速度显著提升、代码复杂度降低。总体而言,改进活动投入较大但足够简单,适合作为自动化优先目标。
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.
DOI 原文 ·
@inproceedings{paperbot9368,
title = {Metrics Driven Reengineering and Continuous Code Improvement at Meta},
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 Francois Morin and Neil Mitchell and Venus Montes and Maher Saba and Matt Steiner and Andrea Valori and Shanchao Wang and Nachiappan Nagappan},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00268}
}