Skip to main content
Erschienen in: Empirical Software Engineering 1/2019

26.04.2018

Shorter identifier names take longer to comprehend

verfasst von: Johannes C. Hofmeister, Janet Siegmund, Daniel V. Holt

Erschienen in: Empirical Software Engineering | Ausgabe 1/2019

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

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 facilitate comprehension. In this paper, we investigate the effect of different identifier naming styles (single letters, abbreviations, and words) on program comprehension. We conducted an experimental study with 72 professional C# developers who had to locate defects in source code snippets. We used a within-subjects design, such that each developer worked with all three versions of identifier naming styles, and we measured the time it took them to find a defect. We found that word identifiers led to a 19% increase in speed to find defects compared to meaningless single letters and abbreviations, but we did not find a difference between letters and abbreviations. The results of our study suggest that code is more difficult to comprehend when it contains only letters and abbreviations as identifier names. Words as identifier names facilitate program comprehension and may help to save costs and improve software quality.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Fußnoten
2
Miller (1994) originally argued for a capacity limit of about 7 ± 2 items, while newer research shows that core working memory capacity is more likely limited to 3 to 5 items (Cowan 2001).
 
3
The IQR is defined as Q3 − Q1, where the slowest 25% of response times lie below Q1 (first quartile) and the fastest 25% above Q3 (third quartile)
 
4
The t-values of these two tests are by chance identical when rounded to two decimal places. The standardized effect sizes differ due to the correction for correlated observations.
 
Literatur
Zurück zum Zitat Anquetil N, Lethbridge T (1998) Assessing the relevance of identifier names in a legacy software system. In: Conf. centre for advanced studies on collaborative research, CASCON ’98. IBM Press, Toronto, pp 1–10 Anquetil N, Lethbridge T (1998) Assessing the relevance of identifier names in a legacy software system. In: Conf. centre for advanced studies on collaborative research, CASCON ’98. IBM Press, Toronto, pp 1–10
Zurück zum Zitat Ceccato M, Di Penta M, Falcarin P, Ricca F, Torchiano M, Tonella P (2014) A family of experiments to assess the effectiveness and efficiency of source code obfuscation techniques. Empir Softw Eng 19:1040–1074 Ceccato M, Di Penta M, Falcarin P, Ricca F, Torchiano M, Tonella P (2014) A family of experiments to assess the effectiveness and efficiency of source code obfuscation techniques. Empir Softw Eng 19:1040–1074
Zurück zum Zitat Cohen J (1988) Statistical power analysis for the behavioral sciences. Erlbaum, HillsdaleMATH Cohen J (1988) Statistical power analysis for the behavioral sciences. Erlbaum, HillsdaleMATH
Zurück zum Zitat Coltheart M, Rastle K, Perry C, Langdon R, Ziegler J (2001) DRC: a dual route cascaded model of visual word recognition and reading aloud. Psychol Rev 108(1):204–256CrossRef Coltheart M, Rastle K, Perry C, Langdon R, Ziegler J (2001) DRC: a dual route cascaded model of visual word recognition and reading aloud. Psychol Rev 108(1):204–256CrossRef
Zurück zum Zitat Cowan N (2001) The magical number 4 in short-term memory: a reconsideration of mental storage capacity. Behav Brain Sci 24(1):87–185CrossRef Cowan N (2001) The magical number 4 in short-term memory: a reconsideration of mental storage capacity. Behav Brain Sci 24(1):87–185CrossRef
Zurück zum Zitat Jansen AR, Blackwell AF, Marriott K (2003) A tool for tracking visual attention: the restricted focus viewer. Behav Res Methods Instrum Comput 35(1):57–69MATHCrossRef Jansen AR, Blackwell AF, Marriott K (2003) A tool for tracking visual attention: the restricted focus viewer. Behav Res Methods Instrum Comput 35(1):57–69MATHCrossRef
Zurück zum Zitat Leonhart R (2009) Lehrbuch Statistik Einstieg und Vertiefung, 2nd edn. Hans Huber, Hogrefe AG, Bern Leonhart R (2009) Lehrbuch Statistik Einstieg und Vertiefung, 2nd edn. Hans Huber, Hogrefe AG, Bern
Zurück zum Zitat Miller GA (1994) The magical number seven, plus or minus two: some limits on our capacity for processing information. Psychol Rev 101(2):343–352CrossRef Miller GA (1994) The magical number seven, plus or minus two: some limits on our capacity for processing information. Psychol Rev 101(2):343–352CrossRef
Zurück zum Zitat Posnett D, Hindle A, Devanbu P (2011) A simpler model of software readability, ACM, New York Posnett D, Hindle A, Devanbu P (2011) A simpler model of software readability, ACM, New York
Zurück zum Zitat Ratcliff R (1993) Methods for dealing with reaction time outliers. Psychol Bull 114(3):510–532CrossRef Ratcliff R (1993) Methods for dealing with reaction time outliers. Psychol Bull 114(3):510–532CrossRef
Zurück zum Zitat Sharif B, Maletic JI (2010) An eye tracking study on camelcase and under_score identifier styles. In: Proc. Int’l Conf. program comprehension (ICPC). Proc. Int’l Conf. Program Comprehension (ICPC). IEEE Computer Society, Washington, DC, pp 196–205 Sharif B, Maletic JI (2010) An eye tracking study on camelcase and under_score identifier styles. In: Proc. Int’l Conf. program comprehension (ICPC). Proc. Int’l Conf. Program Comprehension (ICPC). IEEE Computer Society, Washington, DC, pp 196–205
Zurück zum Zitat Tichy WF (1998) Should computer scientists experiment more? In: IEEE Computer Tichy WF (1998) Should computer scientists experiment more? In: IEEE Computer
Zurück zum Zitat Whelan R (2008) Effective analysis of reaction time data. Psychol Record 58 (3):475CrossRef Whelan R (2008) Effective analysis of reaction time data. Psychol Record 58 (3):475CrossRef
Metadaten
Titel
Shorter identifier names take longer to comprehend
verfasst von
Johannes C. Hofmeister
Janet Siegmund
Daniel V. Holt
Publikationsdatum
26.04.2018
Verlag
Springer US
Erschienen in
Empirical Software Engineering / Ausgabe 1/2019
Print ISSN: 1382-3256
Elektronische ISSN: 1573-7616
DOI
https://doi.org/10.1007/s10664-018-9621-x

Weitere Artikel der Ausgabe 1/2019

Empirical Software Engineering 1/2019 Zur Ausgabe

Premium Partner