18 hours ago
- Lines of code (LOC) correlate strongly with established complexity metrics like cyclomatic complexity and Halstead volume, making it a credible measure of code complexity.
- Complexity determines software cost: essential complexity adds value, while both essential and accidental complexity increase cost; LOC measures total complexity, closely tracking development and maintenance costs.
- LOC is a useful cost metric for estimating maintenance burden, with data suggesting roughly one maintainer per 25,000 lines of open-source code.
- Using LOC as a productivity metric is difficult due to its imperfect proxy for essential complexity and value, and caution against Goodhart’s law when individuals are judged by it.
- The ratio of essential to accidental complexity must be stable for LOC to proxy productivity, but this assumption is fragile across different types of work.