Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Good code can be wide code. Doesn't have to be.

And code editors are decent at wrapping lines nowadays, if you like it.


That'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.


adjustFooSOItFitsIntoTheSpaceAvailableIfNeeded

What gets me is long verbose names.

noun-verb. Short names. They are mnemonic not descriptive


A 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.


Sometimes a variable is for checking whether a value is kerfuffled by jingleberry so isKerfuffledByJingleberry can be a good name


That 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


>noun-verb

fcntl


Actually I prefer verb noun. I misstyped.

goDisplay() rather than initialiseDisplaAndEnterDisplayModeIfEverythingIsOk




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: