Naming is an essential but grossly underrated skill. Every programmer faces the problem of finding good names on a daily basis. Yet, few programming textbooks and university courses discuss the topic beyond a few syntactic do’s and don’ts. Vague rules such as “identifiers should be self-describing” are not explained and are hard to follow, especially for novices. Ironically, studies show that beginners are especially reliant on good names, as more experienced developers are better at reading contextual cues. While developers agree that naming matters, they adhere to different conventions and disagree on critical aspects such as acceptable names lengths. Very few use written guidelines or consult empirical evidence.
In this article you’ll find theory behind finding good names for programming purposes and a set of practical guidelines that will help you improve your craft. Dive in to discover what the name of your next variable, class or method should be.