Simpler Programming Lingo
People add extra words when they want things to sound more important than they really are.
— George Carlin
While working on THT, I've thought a lot about how the choosing the right name for something can can improve its usability.
As programmers, we work in the realm of pure imagination and intellect, where words and symbols are both our tools AND our building materials.
When we pick the right names for our variables and functions, we get a clear mental picture of how our programs work.
Likewise, when we use names that are clunky or vague, they create mental friction that slows us down and causes us to make more mistakes.
If we agree that clear names are important in code, then what does that mean for the terms and lingo we use as an industry?
For example, we have terms like “dependency injection” and “polymorphism” that are probably more complicated than they need to be.
You might argue that these words are complex because they have precise technical meaning. That might be true, but in the day-to-day task of programming, I don’t think they serve us very well.
In the process of writing code, we need to juggle a dozen or so concepts in our head at any given time. If we can shrink each of those concepts by using more concise language (like a kind of compression) we can reduce our cognitive load.
In other words, the more compact our tools are, the more we can fit in our mental toolbox.
I believe a good name tends to have these qualities:
- Concise: Short, with few syllables. Easy to say and easy to type.
- Concrete: Familiar, or has an analog in the real world. Easy to imagine.
- Friendly: Not too technical, maybe even a little fun.
For example, in place of “dependency injection” (7 syllables), the term “plugin”
It’s important to remember that words are just “pointers” to ideas or definitions. A word doesn’t need to fully convey its meaning.
For example, the term “AJAX” caught on over the alternatives because it was snappy and memorable. Even though it is now a bit outdated (the “X” for “XML” is rarely used nowadays), it’s still an easy way to refer to “web pages that update in real time”.
Here are some industry terms I like.
Once you learn what they mean, they tend to stick with you.
bit bug mixin sandbox duck typing push/pop grep factory template AJAX DRY front-end/back-end dead code monkey testing kludge linker library pipe pointer race dump syntactic sugar zombie process garbage collector code golf
Here are some particularly clunky terms, and how they might be simplified.
CURRENT ALTERNATIVE executable --> runnable instantiate --> spawn encapsulation --> boxing polymorphism --> swapping dependency injection --> plugin delegate --> passthru immutable --> locked, frozen mutable --> unlocked, fluid lambda --> inline function closure --> sticky function increment --> uptick decrement --> downtick subscribe --> listen coalesce --> absorb interpolation --> insertion hungarian notation --> prefixing shift --> pop-first unshift --> push-first obfuscate --> scramble asynchronous --> side-run memoization --> call-caching boolean --> bit
The goal here isn’t to “dumb down” the language. Humans already have a natural tendency to streamline language (e.g. acronyms, abbreviations, and slang.)
It takes a bit more creativity to find words that will stick in our minds and convey difficult ideas (Naming is Hard), but I believe it will be worth the effort.
By adopting concise, easy-to-remember language, we can reduce some of the friction in order to make our programming tasks easier.
On a related note, check out George Carlin’s rant on Airline lingo.