Increasing, not Diminishing: Investigating the Returns of Highly Maintainable Code

2024年01月24日
理解和有效管理技术债务(Technical Debt,TD)仍然是软件工程中的一个重要挑战。虽然已经发表了许多关于代码级TD的研究,但很少有研究说明低质量源代码的商业影响。在本研究中,我们结合了两个公开可用的数据集,研究了代码质量与缺陷数量和实现时间之间的关联。我们引入了一个价值创造模型,从回归分析中得出,探讨相对于基线的相对变化。我们的结果表明,不同代码质量间的关联因时间间隔而异。此外,价值模型表明,在代码质量光谱的极端端点处存在强烈的非线性。最重要的是,该模型表明,在上端的投资回报会被放大。我们在“破窗理论”的背景下讨论了这些发现,并建议组织努力防止在高变更率的文件中引入代码异味。最后,我们认为,这个价值创造模型可以用来启动有关重构投资回报的讨论。
Understanding and effectively managing Technical Debt (TD) remains a vital challenge in software engineering. While many studies on code-level TD have been published, few illustrate the business impact of low-quality source code. In this study, we combine two publicly available datasets to study the association between code quality on the one hand, and defect count and implementation time on the other hand. We introduce a value-creation model, derived from regression analyses, to explore relative changes from a baseline. Our results show that the associations vary across different intervals of code quality. Furthermore, the value model suggests strong non-linearities at the extremes of the code quality spectrum. Most importantly, the model suggests amplified returns on investment in the upper end. We discuss the findings within the context of the "broken windows" theory and recommend organizations to diligently prevent the introduction of code smells in files with high churn. Finally, we argue that the value-creation model can be used to initiate discussions regarding the return on investment in refactoring efforts.
许愿