Effects of Variable Names on Comprehension: An Empirical Study

Eran Avidan, Dror G. Feitelson

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

45 Scopus citations

Abstract

It is widely accepted that meaningful variable names are important for comprehension. We conducted a controlled experiment in which 9 professional developers try to understand 6 methods from production util classes, either with the original variable names or with names replaced by meaningless single letters. Results show that parameter names are more significant for comprehension than local variables. But, surprisingly, we also found that in 3 of the methods there were no significant differences between the control and experimental groups, due to poor and even misleading variable names. These disturbingly common bad names reflect the subjective nature of naming, and highlight the need for additional research on how variable names are interpreted and how better names can be chosen.

Original languageEnglish
Title of host publicationProceedings - 2017 IEEE 25th International Conference on Program Comprehension, ICPC 2017
PublisherIEEE Computer Society
Pages55-65
Number of pages11
ISBN (Electronic)9781538605356
DOIs
StatePublished - 28 Jun 2017
Event25th IEEE International Conference on Program Comprehension, ICPC 2017 - Buenos Aires, Argentina
Duration: 22 May 201723 May 2017

Publication series

NameIEEE International Conference on Program Comprehension

Conference

Conference25th IEEE International Conference on Program Comprehension, ICPC 2017
Country/TerritoryArgentina
CityBuenos Aires
Period22/05/1723/05/17

Bibliographical note

Publisher Copyright:
© 2017 IEEE.

Keywords

  • code comprehension
  • local variables
  • method parameters
  • misleading names
  • variable names

Fingerprint

Dive into the research topics of 'Effects of Variable Names on Comprehension: An Empirical Study'. Together they form a unique fingerprint.

Cite this