Logo des Repositoriums
 
Zeitschriftenartikel

Indentation: A Simple Matter of Style or Support for Program Comprehension?

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.

Beschreibung

Bauer, Jennifer; Hofmeister, Johannes C.; Siegmund, Janet; Apel, Sven (2018): Indentation: A Simple Matter of Style or Support for Program Comprehension?. Softwaretechnik-Trends Band 38, Heft 2. Bonn: Geselllschaft für Informatik e.V.. PISSN: 0720-8928. pp. 43-44. FG SRE: 20. Workshop Software-Reengineering und -Evolution der GI-Fachgruppe Software-Reengineering (SRE) und 9. Workshop "Design for Future" des GI-Arbeitskreises "Langlebige Softwaresysteme" (L2S2), Bad-Honnef 02. -- 04. Mai 2018S

Schlagwörter

Zitierform

DOI

Tags