ABSTRACT
Names of classes/methods/variables play an important role in code readability. To investigate how developers choose names, Feitelson et al. conducted an empirical survey and suggested a method to improve naming quality. We replicated their study, but limited the survey subjects to university students. Specifically, we conducted two experiments including 341 students from freshmen to seniors. The aim of the first experiment was to investigate the characteristics of the names given by students. The experimental results showed that the name length as well as the number of words contained in names increased with the grade and students have ambiguity in understanding variable names. The second experiment was to verify whether Feitelson et al.’s naming method can help improve the quality of the names given by students. The experimental results showed an improvement in naming quality for more than 67% of cases, which confirms the validity of the method for university students.
- Eran Avidan and Dror G. Feitelson. 2017. Effects of Variable Names on Comprehension: An Empirical Study. In 2017 IEEE/ACM 25th International Conference on Program Comprehension (ICPC). 55–65. https://doi.org/10.1109/ICPC.2017.27Google ScholarDigital Library
- Raymond PL Buse and Westley R Weimer. 2009. Learning a metric for code readability. IEEE Transactions on software engineering 36, 4 (2009), 546–558.Google ScholarDigital Library
- Roee Cates, Nadav Yunik, and Dror G. Feitelson. 2021. Does Code Structure Affect Comprehension? On Using and Naming Intermediate Variables. In 2021 IEEE/ACM 29th International Conference on Program Comprehension (ICPC). 118–126. https://doi.org/10.1109/ICPC52881.2021.00020Google Scholar
- Marcus Ciolkowski, Oliver Laitenberger, and Stefan Biffl. 2003. Software reviews, the state of the practice. IEEE software 20, 6 (2003), 46–51.Google ScholarDigital Library
- Carlos Eduardo C Dantas and Marcelo A Maia. 2021. Readability and Understandability of Snippets Recommended by General-purpose Web Search Engines: a Comparative Study. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW). IEEE, 126–130.Google ScholarCross Ref
- Sarah Fakhoury, Devjeet Roy, Yuzhan Ma, Venera Arnaoudova, and Olusola Adesope. 2020. Measuring the impact of lexical and structural inconsistencies on developers’ cognitive load during bug localization. Empirical Software Engineering 25, 3 (2020), 2140–2178.Google ScholarDigital Library
- Davide Falessi, Natalia Juristo, Claes Wohlin, Burak Turhan, Jürgen Münch, Andreas Jedlitschka, and Markku Oivo. 2018. Empirical software engineering experts on the use of students and professionals in experiments. Empirical Software Engineering 23, 1 (2018), 452–489.Google ScholarDigital Library
- Dror G. Feitelson, Ayelet Mizrahi, Nofar Noy, Aviad Ben Shabat, Or Eliyahu, and Roy Sheffer. 2022. How Developers Choose Names. IEEE Transactions on Software Engineering 48, 1 (2022), 37–52. https://doi.org/10.1109/TSE.2020.2976920Google ScholarDigital Library
- George W. Furnas, Thomas K. Landauer, Louis M. Gomez, and Susan T. Dumais. 1987. The vocabulary problem in human-system communication. Commun. ACM 30, 11 (1987), 964–971.Google ScholarDigital Library
- Edward M Gellenbeck and Curtis R Cook. 1991. An investigation of procedure and variable names as beacons during program comprehension. In Empirical studies of programmers: Fourth workshop. Ablex Publishing, Norwood, NJ, 65–81.Google Scholar
- Emily Hill, David Binkley, Dawn Lawrie, Lori Pollock, and K Vijay-Shanker. 2014. An empirical study of identifier splitting techniques. Empirical Software Engineering 19, 6 (2014), 1754–1780.Google ScholarDigital Library
- Walid Maalej, Rebecca Tiarks, Tobias Roehm, and Rainer Koschke. 2014. On the comprehension of program comprehension. ACM Transactions on Software Engineering and Methodology (TOSEM) 23, 4(2014), 1–37.Google ScholarDigital Library
- Steve McConnell. [n. d.]. Code Complete 2nd Edition V413hav. ([n. d.]).Google Scholar
- Zoltán Porkoláb and Tibor Brunner. 2018. The codecompass comprehension framework. In Proceedings of the 26th Conference on Program Comprehension. 393–396.Google ScholarDigital Library
- Juergen Rilling and Tuomas Klemola. 2003. Identifying comprehension bottlenecks using program slicing and cognitive complexity metrics. In 11th IEEE International Workshop on Program Comprehension, 2003. IEEE, 115–124.Google ScholarDigital Library
- Janet Siegmund. 2016. Program Comprehension: Past, Present, and Future. In 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Vol. 5. 13–20. https://doi.org/10.1109/SANER.2016.35Google ScholarCross Ref
- Janet Siegmund, Norman Peitek, Chris Parnin, Sven Apel, Johannes Hofmeister, Christian Kästner, Andrew Begel, Anja Bethmann, and André Brechmann. 2017. Measuring neural efficiency of program comprehension. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering. 140–150.Google ScholarDigital Library
- P Sivaprakasam and V Sangeetha. 2012. An accurate model of software code readability. International Journal of Engineering 1, 6 (2012).Google Scholar
- Alaaeddin Swidan, Alexander Serebrenik, and Felienne Hermans. 2017. How do Scratch programmers name variables and procedures?. In 2017 IEEE 17th International Working Conference on Source Code Analysis and Manipulation (SCAM). IEEE, 51–60.Google ScholarCross Ref
- Yi Wang, Keqiang He, Huichen Dai, Wei Meng, Junchen Jiang, Bin Liu, and Yan Chen. 2012. Scalable name lookup in NDN using effective name component encoding. In 2012 IEEE 32nd International Conference on Distributed Computing Systems. IEEE, 688–697.Google ScholarDigital Library
Index Terms
- How students choose names: A replication study
Recommendations
A Survey of the Forms of Java Reference Names
ICPC '15: Proceedings of the 2015 IEEE 23rd International Conference on Program ComprehensionThe readability of identifiers is a major factor of program comprehension and an aim of naming convention guidelines. Due to their semantic content, identifiers are also used in feature and bug location, among other software maintenance tasks. Looking ...
Shorter identifier names take longer to comprehend
Developers spend the majority of their time reading code, a process in which identifier names play a key role. Although many identifier naming styles exist, they often lack an empirical basis and it is not clear whether short or long identifier names ...
How Developers Choose Names
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 ...
Comments