A Systematic Literature Review on the Impact of Formatting Elements on Program Understandability
2022; RELX Group (Netherlands); Linguagem: Inglês
10.2139/ssrn.4182156
ISSN1556-5068
AutoresDelano Oliveira, Reyde Bruno, Fernanda Madeiral, Hidehiko Masuhara, Fernando Castor,
Tópico(s)Behavioral and Psychological Studies
ResumoSoftware programs can be written in different but functionally equivalent ways. Even though previous research has compared specific formatting elements to find out which alternatives affect code legibility, seeing the bigger picture of what makes code more or less legible is challenging.We aim to find which formatting elements have been investigated in empirical studies and which ones were found to be more legible for human subjects.We conduct a systematic literature review and identify 12 papers that compare alternative formatting elements. We organize these formatting elements using a card sorting method.We identify 29 formatting elements, which are about formatting styles, spacing, block delimiters, long or complex code lines, and word boundary styles. While some formatting elements were found to be statistically better than other equivalent ones, e.g., camel case over underscore, others were not, e.g., pretty-printed vs. disrupted layout. For some alternatives, divergent results were found, e.g., one study found a significant difference in favor of 2-space indentation, but two other studies did not find it.Our results can serve as guidelines for developers in choosing ways to format their code and help researchers in developing, e.g., recommendation systems, to aid developers to make their code more legible.
Referência(s)