Home

The Importance of Naming

Published 2023-03-24


Sharing a great article on naming, which we all know is one of the hardest parts of programming: Naming conventions in programming – a review of scientific literature

Names are layers of indirection, separating essential features of what things are, or what they do, from the unnecessary details. ... "Layers of indirection can be peeled away incrementally, allowing us to work within a codebase without understanding its entirety. Without indirection, we’d be unable to write software longer than a few hundred lines".
> Tellman, Z., 2019. Elements of Clojure. 1st ed. lulu.com. via article

Code is written for other people. Developing and maintaining software depends on being able to understand a codebase. Good naming goes a long way toward this goal.

To reiterate the quote above, names are layers of indirection. Poor names fail to create a meaningful abstraction for the thing they represent, or they do so in a way that is cognitively demanding to parse: being inconsistent or ambiguous or overly specific or any of the antipatterns discussed in the article. On the other hand, good names provide legible abstractions, which ease the cognitive load of understanding a complex system.