logoalt Hacker News

deweylast Monday at 7:40 PM3 repliesview on HN

Using lines of code as a metric for productivity is bad. Using it to show how simple something is, or how a refactor removed x lines of code that doesn’t need to be maintained any more isn’t such a bad thing I’d say.


Replies

alphazardlast Monday at 7:53 PM

Yeah this is exactly right, if you can trust the contributors to not code-golf or otherwise Goodhart the LoC metric, then it's a reasonable measure of complexity.

It doesn't work as well when you start mixing languages, or generating code.

selkinlast Monday at 8:08 PM

Less LOC also doesn't imply simplicity: just look at the demoscene, which often has the former but not the latter.

show 1 reply
whilenot-devlast Monday at 7:46 PM

TFA includes a time measurement though, and 5 years for 18'935 SLOC doesn't scream quite "how simple something is".