News for hackers. Stuff that matters.
Re:Laziness Impatience Hubris by dragonwriter on Monday July 13, 2020 @11:25PM (#23828176)
I've yet to see 1,000 (or even 100, and rarely 10) lines of code doing what could be done in a 1 liner that is both clear and correct, and generally the more verbose, the less clear and the less correct it is.

Moreover, the longer version almost invariably (and more likely the longer it is) either is or contains a DRY violation that was originally copy-and-pasted from elsewhere in the same codebase, often with some intentional changes, which has since diverged (or diverged further than the intended differences) because of inconsistent maintenance.

Re:Laziness Impatience Hubris by TheOtherHobbes on Tuesday July 14, 2020 @07:50AM (#23830764)
It's not line count, it's the dot product of line count and conceptual clarity.

There's a sweet spot where code is as terse as it can be while still being easy to read. The abstractions are clear and fit the domain, they're not decorated with poorly configured edge cases, and they're no more nested than they need to be.

It's debatable if this ideal has ever existed, but it's nice to believe it might be possible.

Re:Laziness Impatience Hubris by dragonwriter on Tuesday July 14, 2020 @10:15AM (#23832211)
> It's not line count, it's the dot product of line count and conceptual clarity.

In my experience, in practice, beyond a very small multiple of the minimum required line count, line count and conceptual clarity for perfoming any given task are inversely related.

Also, neither of those are vector quantities, so I'm not sure what you are trying to get at with “dot product”.