Not the original title I gave it, but I thought that one was potentially to clickbaity for people not familiar with the source quote, so I changed it.
Overall it’s just a bunch of thoughts trying to explore the subject of naming variables, not sure if anything is useful or original, but I hope at least some of the questions I raise serve as a bit of inspiration.
It’s interesting to me that that of the three examples:
and
Only the last one is the one with no glaring errors: the other two use nonexistent variables, and both
calculate
and its abbreviation are misspelled.It seems that there is some sort of an axiom or theorem emerging:
Every article about variable naming must begin with that Phil Karlton’s quote
[1] https://hackernoon.com/the-art-of-naming-variables-52f44de00aad
I always heard the quote as “There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.”