Lines of code (LOC) is widely dismissed as a meaningless metric, but research consistently shows it correlates strongly with established complexity measures like cyclomatic complexity and Halstead volume — often as well as or better than those more complicated metrics. LOC reliably measures total code complexity, which directly maps to software cost (development and maintenance). The distinction between essential complexity (inherent to the problem) and accidental complexity (introduced during implementation) is key: LOC captures both, making it a good cost proxy but a noisier productivity proxy. Practical rules of thumb are offered: roughly every 25,000 lines of open source code requires one additional maintainer, and every 100,000 lines costs ~$200/day in maintenance at modest developer rates. LOC is most defensible as a cost metric; using it as a productivity metric requires stable ratios of essential to accidental complexity, which is a strong assumption.
1 Comment
Sort: