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 language | English |
---|---|
Title of host publication | Proceedings - 2017 IEEE 25th International Conference on Program Comprehension, ICPC 2017 |
Publisher | IEEE Computer Society |
Pages | 55-65 |
Number of pages | 11 |
ISBN (Electronic) | 9781538605356 |
DOIs | |
State | Published - 28 Jun 2017 |
Event | 25th IEEE International Conference on Program Comprehension, ICPC 2017 - Buenos Aires, Argentina Duration: 22 May 2017 → 23 May 2017 |
Publication series
Name | IEEE International Conference on Program Comprehension |
---|
Conference
Conference | 25th IEEE International Conference on Program Comprehension, ICPC 2017 |
---|---|
Country/Territory | Argentina |
City | Buenos Aires |
Period | 22/05/17 → 23/05/17 |
Bibliographical note
Publisher Copyright:© 2017 IEEE.
Keywords
- code comprehension
- local variables
- method parameters
- misleading names
- variable names