A Systematic Literature Review on the Impact of Formatting Elements on Code Legibility (bibtex)
by Delano Oliveira, Reydne Santos, Fernanda Madeiral, Hidehiko Masuhara and Fernando Castor
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 delimiters, long or complex code lines, and word boundary styles. While some levels were found to be statistically better than other equivalent ones in terms of code legibility, e.g., appropriate use of indentation with blocks, others were not, e.g., formatting layout. For identifier style, we found divergent results, where one study found a significant difference in favor of camel case, while another study found a positive result in favor of snake case. Conclusion: The number of identified papers, some of which are outdated, and the many null and contradictory results emphasize the relative lack of work in this area and underline the importance of more research. There is much to be understood about how formatting elements influence code legibility before the creation of guidelines and automated aids to help developers make their code more legible.
Reference:
A Systematic Literature Review on the Impact of Formatting Elements on Code Legibility (Delano Oliveira, Reydne Santos, Fernanda Madeiral, Hidehiko Masuhara and Fernando Castor), In The Journal of Systems and Software, volume 203, 2023. (accepted: 2023-04-24, available online: 2023-04-28)
Bibtex Entry:
@article{oliveira2023jss,
  author = {Delano Oliveira and Reydne Santos and Fernanda Madeiral and Hidehiko Masuhara and Fernando Castor},
  title = {A Systematic Literature Review on the Impact of Formatting Elements on Code Legibility},
  journal = {The Journal of Systems and Software},
  year = 2023,
  url = {https://www.sciencedirect.com/science/article/pii/S0164121223001231},
  keywords = {Program understandability, Code legibility, Formatting elements},
  doi = {https://doi.org/10.1016/j.jss.2023.111728},
  issn = {0164-1212},
  year = 2023,
  volume = 203,
  month = sep,
  pdf = {jss2023.pdf},
  pages = {111728},
  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 delimiters, long or complex code lines, and word boundary styles. While some levels were found to be statistically better than other equivalent ones in terms of code legibility, e.g., appropriate use of indentation with blocks, others were not, e.g., formatting layout. For identifier style, we found divergent results, where one study found a significant difference in favor of camel case, while another study found a positive result in favor of snake case. Conclusion: The number of identified papers, some of which are outdated, and the many null and contradictory results emphasize the relative lack of work in this area and underline the importance of more research. There is much to be understood about how formatting elements influence code legibility before the creation of guidelines and automated aids to help developers make their code more legible.},
  note = {accepted: 2023-04-24, available online: 2023-04-28}
}
Powered by bibtexbrowser