Re:Writing Good Code Is a Lot Like Writing Prose
by matt4077 on Tuesday July 11, 2017 @08:34AM
(#14743575)
I'll give my personal pet peeve as an example: abbreviations.
When I want the constant for the user's language, everyone knows they're looking for LANGUAGE, in principle. And long identifiers aren't quite the problem any more with autocomplete. But some library- and language authors insist on saving 4 bytes by naming it LANG, or even just L. Or they somehow end up with this abomination:
> locale
LANG=en_US.UTF-8
LANGUAGE=
There are better examples where more variations can be found in the wild. And there are some abbreviations that somehow just feel terribly ugly to me, but I've apparently succeeded in erasing them from memory. They sometimes remind me of people who use a plus sign instead of the word "and"–it betrays a certain lack of respect for the language,
However, this article leaves me wishing he'd show examples of what he's talking about.
I'd like to see his code to determine whether it reads more prose-like.