A Systematic Literature Review on the Impact of Formatting Elements on Code Legibility
Delano Oliveira, Reydne Santos, Fernanda Madeiral, Hidehiko Masuhara,, Fernando Castor

TL;DR
This systematic review examines empirical studies on how various formatting elements affect code legibility, highlighting key elements, conflicting results, and the need for further research to develop effective coding guidelines.
Contribution
It provides a comprehensive organization of formatting elements studied in empirical research and identifies gaps and contradictions in current findings.
Findings
Indentation significantly improves legibility.
Formatting layout shows inconsistent effects.
Divergent results for identifier styles like camelCase and snake_case.
Abstract
Context: Software 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. Goal: We aim to find which formatting elements have been investigated in empirical studies and which alternatives were found to be more legible for human subjects. Method: We conducted a systematic literature review and identified 15 papers containing human-centric studies that directly compared alternative formatting elements. We analyzed and organized these formatting elements using a card-sorting method. Results: We identified 13 formatting elements (e.g., indentation) and 33 levels of formatting elements (e.g., two-space indentation), which are about formatting styles, spacing, block…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Engineering Techniques and Practices · Software Reliability and Analysis Research
