Zeitschriftenartikel
Indentation: A Simple Matter of Style or Support for Program Comprehension?
Lade...
Volltext URI
Dokumententyp
Text/Journal Article
Zusatzinformation
Datum
2018
Zeitschriftentitel
ISSN der Zeitschrift
Bandtitel
Verlag
Geselllschaft für Informatik e.V.
Zusammenfassung
Most modern programming language style guides suggest a specific indentation depth to convey the structure of code (e.g., two or four spaces). In this study, we examine the effect of indentation depth on program comprehension, to provide justification for suggested levels of indentation made by modern style guides. In the course of our study, we asked 22 participants to evaluate the output of Java code snippets with different levels of indentation. We also measured correctness and speed of the responses, and asked participants to rate the difficulty of the code presented. We employed an eye tracker to gain additional insights into the influence of indentation on visual effort. We found a small effect of indentation depth on fixation duration, but could not detect differences in correctness or visual effort. Our findings suggest that indentations affect program comprehension at a lower, perceptual level of processing, rather than higher level reasoning. Our research design and methods with respect to visual effort could be a promising starting point for future studies in this field.