2 ms·
Never understood why a lot of programmers are so obsessed with reducing lines of code at the expense of all else. What's important to me is that I can understa
by magicalhippo 1y ago
Never understood why a lot of programmers are so obsessed with reducing lines of code at the expense of all else.
What's important to me is that I can understand the intent of the code, that I can reason about how that code will be executed at runtime, and that I can easily debug the code if needed.
Of course, there's no need to go full enterprise Java. Never go full enterprise Java.
But having ten lines of clear code that's easily debuggable and which runtime characteristics is predictable is much better than one dense line that's difficult to untangle, or a few that's hard to predict what will do etc.
- anonymars 1y agoNot to mention it's much easier to put a breakpoint on one of those specific lines
- the_other 1y agoYears ago on the Ruby Rogues podcast, someone mentioned they aim to do just one operation per line. I’ve aimed to do that with ny TS/JS ever since. My files are longer but they’re usually easier to read.