Needs better words

How much easier would Haskell be if its vocabulary wasn’t so deeply rooted in abstract mathematics? How many more people would immediately understand Cassandra if it just adopted the vernacular of row-oriented databases instead of overriding it with column-oriented semantics? Wouldn’t the programming world be better if every language didn’t call itself object-oriented?

So many programmer-facing things could be better if they had better names for concepts. The power of good naming:

Characters are cheap, confusion is costly. Let’s not make things harder for the programmers who come after us. Remember, this is just as likely to be ourselves in a few months. Let’s avoid using a name like prj when project is only four characters more typing. Anything that reduces reading friction in our code is a good thing.

The cynical view is, we are actively confusing and inhibiting ourselves when we use names that are too short, not clear, or outright wrong. The optimistic view is that there’s a progression we can take from not knowing what something should be named, to giving it an acceptable name, to using the naming process to discover better structures.

If you ever hear me say something “needs better words”, it means that I think the idea is right but the labels are wrong. A philosophical dialog may ensue, where I struggle to discover what the essence of the idea is. The end goal is a word that is concise, has the right connotation, and whose meaning is obvious and accessible to as many audiences as possible.

I love naming things.

3 thoughts on “Needs better words

  1. One of the proverbial “hardest things in programming”, yes? I often struggle with this when I realize I want to factor out a long or complicated decision tree from nested ifs, to lots of little methods. Now I have to NAME all the decisions in a clear, concise manner. There’s nothing like a good name… and picking the right one can be a real challenge.

  2. I love that moment when extracting a bunch of conditionals forces me to really name something! It’s challenging, but it usually leads me to feel like I grasp the system much better when I’m done.

  3. Really great post. I have repeatedly had this argument with a former colleague of mine about his use of language in every day things, too. This is just as true in code as it is in everyday conversation. Although, it’s much more dangerous in real life. Language is power.

Comments are closed.