←back to thread

-2000 Lines of code (2004)

(www.folklore.org)
510 points xeonmc | 1 comments | | HN request time: 0.205s | 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 #
entuno ◴[] No.44385798[source]
That just encourages bad behaviour in the other direction though. A massive multi-level nested ternary on one line is usually going to be worse than a longer but clearer set of conditions. Trying to make code brief can be good, but it can often result in an unmaintainable and hard to read mess.
replies(1): >>44385983 #
1. windward ◴[] No.44385983[source]
That results in the same AST, it's not really taking anything away