[The] length of a variable name should be proportional to its scope.

I come across this from time to time. This quote is by stirner in this HackerNews thread.

Make illegal states unrepresentable

This is what type systems are for: Statically preventing things from being wrong. I first saw this in this “F# for fun and profit” post of the same title. You should read it if you haven’t yet. It’s definitely an easier read than the Wikipedia article on the Curry–Howard correspondence.

There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.

Quote from Jeff Atwood’s tweet, which credits the original quote (without the “off-by-one”) to Phil Karlton.

Replaced “clean code” with “predictable code” because ‘clean’ is subjective and a platitude.

André Staltz on Twitter.