Slithering Hump-Back Kebabs
It’s said there are only 2 hard things in race conditions, computer science: cache invalidation, naming things, and off-by-one errors. While I have yet to encounter NullPointerException
in my programming excursions, the latter still confuzzles my 2.0 brain cells every now and then, and I very much hope I never have to deal with the living nightmare of debugging a multithreaded system, above all it’s that one – naming things – that I feel most painfully.
Ayo, lemme translate that for you, since that sentence looks like a mangled piece of very legacy code from the noughties. There are 4 hard things: race conditions, cache invalidation, namings things, and off-by-one errors. I have yet to encounter the first 2. The last happens all the time. And naming things? You have no idea. Day in, day out. It’s just what I do.
With that said, different languages and different developers all have different preferences and conventions over how identifiers should be stylised to achieve this. As someone who’s coded in a few languages that all have quite different casing conventions, and has tried to create their own language which inevitably involved considerations related to this, I thought I’d run through the different styles and elucidate my opinions on them.
informality
EXFORMALITY
slyther_into_that_database
alongForABumpyRide
WhyNotStartTheRideBumpy
nocase!
I-don’t-even-like-kebabs...
Y’know what’s even better than kebab-case?
dot.notation
. As in,python.s.order
. Unfortunately, this isn’t always applicable, and can also quickly get out of hand with too much nesting.