4 ms·
This needed to be said! What bothers me most about the 80 character mafia is not just the line-breaks, but also the insistence on short cryptic variable and fun
by quelsolaar 5y ago
This needed to be said! What bothers me most about the 80 character mafia is not just the line-breaks, but also the insistence on short cryptic variable and function names. Good code is wide code.
- geerlingguy 5y agoGood code can be wide code. Doesn't have to be. And code editors are decent at wrapping lines nowadays, if you like it.
- worik 5y agoadjustFooSOItFitsIntoTheSpaceAvailableIfNeeded What gets me is long verbose names. noun-verb. Short names. They are mnemonic not descriptive
- d0mine 5y agoA docstring can be used instead of making a many-words sentence-long name. IDE can show it automatically when you focus on the name in the source code.
- afiori 5y agoSometimes a variable is for checking whether a value is kerfuffled by jingleberry so isKerfuffledByJingleberry can be a good name
- worik 5y agoThat is, roughly, verb/noun It also depends on how wide the scope is. "i" for an index variable is often a good choice. For the global count of eyes, "i" is a terrible choice. So in a limited scope I would tend to: kerfuffled:bool
- GoblinSlayer 5y ago>noun-verb fcntl
- worik 5y agoActually I prefer verb noun. I misstyped. goDisplay() rather than initialiseDisplaAndEnterDisplayModeIfEverythingIsOk
- necovek 5y agoThat's quite curious. I'd probably be someone you'd consider a member of the "80 character mafia", but I am also pretty insistent on long, descriptive variable names. Good code is readable code (so even if it's bad code, it's clear why it is so). What you lose with 80 character limit, you also win just as much.