←back to thread

-2000 Lines of code

(www.folklore.org)
502 points xeonmc | 2 comments | | HN request time: 0.543s | source
Show context
rossant ◴[] No.44385749[source]
I think lines of code could be an interesting and valuable metric.

If the lower (negative) score, the better (given a fixed set of features).

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” ― Antoine de Saint-Exupéry, Airman's Odyssey

replies(3): >>44385798 #>>44386761 #>>44387419 #
1. Cthulhu_ ◴[] No.44386761[source]
You'll never get it right though. Focusing on "features per LOC" means people will write shorthand, convoluted code, pick obscure, compact languages, etc. To use an adage, if a metric becomes a target, it stops being a useful metric.
replies(1): >>44388680 #
2. Kinrany ◴[] No.44388680[source]
An opinionated formatter plus a smart line counter fix this problem. There's still space for abuse but not enough to overshadow genuine improvements.