4 ms·
There is no correlation between line count and code quality.
by solox3 14y ago
There is no correlation between line count and code quality.
- famousactress 14y agoIs it not likely a bell-curve? IE: Is it not likely that there's a correlation between high line count and average quality?
- reitzensteinm 14y agoSure there is, if you control for functionality. You can't solve complex problems concisely without the right abstractions, and the right abstractions are 90% of the battle for code quality.
- sp332 14y agoActually there is. https://news.ycombinator.com/item?id=3037293 https://news.ycombinator.com/item?id=3037293
- bunderbunder 14y agoI suspect that if someone could come up with a reasonable way to single out confounding variables, there would prove to be an inverse correlation between SLOC per function point and code quality. My rationales: - More SLOC means more places for a bug to hide. - More SLOC means more logic to have to reason about. - More repetition leads to more SLOC. - More repetition increases the chance that a bug can be fixed in one spot but not in others. - More repetition increases the chance for regression bugs resulting from updates not being fully propagated Anecdotally, on my team it seems that we tend to have the least quality issues in the stuff that's written by folks who produce the most factored code.
- JoeAltmaier 14y ago- Fewer SLOC means less code to compile and execute. - Fewer SLOC means more code fits on one page. - Fewer SLOC means it may be easier to explain/document/remember what it does.