News for hackers. Stuff that matters.
Re:Laziness Impatience Hubris by Cthulhu_ on Tuesday July 14, 2020 @09:03AM (#23831395)
> We know that bug count correlates with line count

Statistically maybe, but when it comes down to it, clear code > compact code hands down.

Paraphrasing, but there's basically two ways to write code: either it's so complicated there are no obvious deficiencies, or it's so simple there are obviously no deficiencies.

I'm not smart enough to be able to read and understand a nested ternary or other examples of clever / compact code.

Re:Laziness Impatience Hubris by lmm on Tuesday July 14, 2020 @08:35PM (#23839868)
> Paraphrasing, but there's basically two ways to write code: either it's so complicated there are no obvious deficiencies, or it's so simple there are obviously no deficiencies.

Anyone who's seen an enterprise Java codebase knows there's a third way: so verbose that no-one can tell whether there are any deficiencies, even if each line in isolation is "simple".

I think we vastly underestimate the importance of sheer code length. Being able to comprehend the function, class, or program as a whole makes a lot more difference than whether nested ternaries or the like were used, IME.