3 ms·
I used to be clever, and bumped up against the 80 character limit. Now it's the opposite: my avoidance of cleverness is what is causing me to bump up against th
by sfink 4y ago
I used to be clever, and bumped up against the 80 character limit. Now it's the opposite: my avoidance of cleverness is what is causing me to bump up against the 80 character limit.
There are two reasons for lines to get long: (1) cleverness, or (2) long names.
I used to hate long names, and still can't stomach most Java code. But I've learned that if you want understandable code, you can either have short names and long comments, or long names and hardly any comments. (But please, no longer than is necessary to communicate what needs to be communicated. addKeyAndValueToTable() tells you nothing of use over add() or put(). setForwardingPointerWhileTenuring() does communicate some important things that set() or setPtr() would not.)
- marcus_holmes 4y agoyeh, another signal that you're over-complicating things. I stick to VerbNoun function naming, and usually code in Go where short (1-letter short) variable names are idiomatic. If I can't VerbNoun a function, then I probably need to rethink it. Part of the reason I don't do anonymous/lambda functions too happily - it's actually harder to read a stack of anonymous functions than a stack of VerbNoun named functions.