How Developers Choose Names
Dror G. Feitelson, Ayelet Mizrahi, Nofar Noy, Aviad Ben Shabat, Or, Eliyahu, Roy Sheffer

TL;DR
This study investigates how developers choose variable and function names, revealing low agreement among developers but high understanding of chosen names, and proposes a three-step model to improve naming quality.
Contribution
The paper introduces a three-step naming model and demonstrates its effectiveness in producing higher-quality, more comprehensive names compared to unstructured naming.
Findings
Low agreement (median 6.9%) among developers on specific names.
Names following the model were judged superior in quality.
Model encourages longer, more concept-rich names.
Abstract
The names of variables and functions serve as implicit documentation and are instrumental for program comprehension. But choosing good meaningful names is hard. We perform a sequence of experiments in which a total of 334 subjects are required to choose names in given programming scenarios. The first experiment shows that the probability that two developers would select the same name is low: in the 47 instances in our experiments the median probability was only 6.9%. At the same time, given that a specific name is chosen, it is usually understood by the majority of developers. Analysis of the names given in the experiment suggests a model where naming is a (not necessarily cognizant or serial) three-step process: (1) selecting the concepts to include in the name, (2) choosing the words to represent each concept, and (3) constructing a name using these words. A followup experiment, using…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
