Variable Name Antipatterns Named and Explained

There are only two hard things in Computer Science: cache invalidation and naming things. – Phil Karlton Let’s talk about variable name antipatterns! ...

April 3, 2023 · 5 min · Jake Worth

Better Than 'foo'

There’s almost always a better variable name or value than ‘foo’. It’s useful as a debugging placeholder, but it almost never belongs in production code, even and especially in automated tests. ...

July 13, 2022 · 4 min · Jake Worth

How to Make Renames Easy

Names in software are hard. But what’s worse than a bad name? Sticking with it because you can’t change it. I want us all to be able to effortlessly and fearlessly fix bad names. That’s the topic of this post. ...

March 22, 2022 · 4 min · Jake Worth

Avoid Similar Variable Names

A common, problematic convention I see in Ruby tests are variable names like this: user_a = create(:user, last_log_in: today) user_b = create(:user, last_log_in: last_year) ...

February 14, 2022 · 1 min · Jake Worth

Don’t miss my next essay

Hear from me immediately when I post: no ads, unsubscribe anytime.