Everyone: please keep your variable names self-explanatory

Arpit Bhayani

Arpit Bhayani

Jun 12, 2024 • 1 min read


Everyone: please keep your variable names self-explanatory CockroachDB: hold my beer 🙃

While I was skimming the Pebble codebase, I stumbled on an oddly long variable name that was quite verbose. Look at the attached snippet.

By the way, the code snippet is from a database called Pebble, which is a KV store by CockroachDB, and it acts as their primary storage engine. It has a very similar API as RocksDB, but instead of going for absolute drop-in replacement, Pebble took a different part and diverged.

They documented the differences between RocksDB and Pebble, and it is a must-read document if you find database internals amusing. If not the entire document just read how they implement Range Deletions; pretty fascinating stuff.

ref: https://lnkd.in/dWMG9G53 ref: https://lnkd.in/g64YgNnH

âš¡ I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along.

youtube.com/c/ArpitBhayani

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses