Won’t fix! – Teil 4: Warum sich Codequalität nicht in eine Zahl pressen lässt
The article examines why code quality resists reduction to single metrics such as Lines of Code, cyclomatic complexity, Halstead metrics, Maintainability Index or code coverage.
HEISE DEVELOPER — It references Goodhart’s Law and Weyuker’s theorems to show that quality is multidimensional, incentive systems distort measurements, and key aspects remain unquantifiable. Experienced developers assess code by reading rather than dashboards.
Since the 1970s, the software industry has attempted to quantify code quality using various metrics, including Lines of Code (LOC), cyclomatic complexity, Halstead metrics, the Maintainability Index, and code coverage. The objective is to create a systematic approach to improving code, thereby reducing bugs, lowering maintenance costs, and streamlining development timelines.
However, the author argues that a single number cannot reliably determine if code is good or bad. This is not due to a lack of data, but because code quality is a multidimensional construct. While tools and CI pipelines provide constant reports, experienced developers typically identify quality by reading the code rather than relying on dashboards.
The article highlights structural failures in quantification through Goodhart’s Law and Weyuker’s theorems, suggesting that incentive systems often distort the measurements they rely on. Ultimately, the most critical aspects of quality remain unquantifiable, making the pursuit of a single quality score a futile endeavor.
Readers’ Forum
No contributions yet — open the debate.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Waiting for your click …
·