Evaluating Code Readability and Legibility: An Examination of Human-centric Studies

@article{Oliveira2020EvaluatingCR,
  title={Evaluating Code Readability and Legibility: An Examination of Human-centric Studies},
  author={Delano Oliveira and Reydne Bruno and Fernanda Madeiral and Fernando Castor Filho},
  journal={2020 IEEE International Conference on Software Maintenance and Evolution (ICSME)},
  year={2020},
  pages={348-359}
}
Reading code is an essential activity in software maintenance and evolution. Several studies with human subjects have investigated how different factors, such as the employed programming constructs and naming conventions, can impact code readability, i.e., what makes a program easier or harder to read and apprehend by developers, and code legibility, i.e., what influences the ease of identifying elements of a program. These studies evaluate readability and legibility by means of different… 

Figures and Tables from this paper

The Mind Is a Powerful Place: How Showing Code Comprehensibility Metrics Influences Code Understanding
TLDR
It is found that the displayed value of a comprehensibility metric has a significant and large anchoring effect on a developer's code comprehensibility rating, and for corresponding tools to be based on scientific evidence.
To What Extent Cognitive-Driven Development Improves Code Readability?
TLDR
A two-phase study invites professional software developers to vote on the most readable pair of code snippets and applies the state-of-the art readability model on the 10-pairs of CDD-guided refactorings, providing initial evidence that CDD could be an interesting approach for software design.
Considerations and Pitfalls for Reducing Threats to the Validity of Controlled Experiments on Code Comprehension
  • D. Feitelson
  • Computer Science
    Empirical Software Engineering
  • 2022
TLDR
In order to promote the development and use of sound experimental methodology, both considerations which need to be applied and potential problems that might occur are discussed, with regard to the experimental subjects, the code they work on, the tasks they are asked to perform, and the metrics for their performance.
Evaluating refactorings for disciplining #ifdef annotations: An eye tracking study with novices
TLDR
Whether three fine-grained refactorings to discipline #ifdef annotations correlate with improvements in code comprehension and visual effort with an eye tracker is evaluated.
40 Years of Designing Code Comprehension Experiments: A Systematic Mapping Study
TLDR
A systematicmapping study of 95 source code comprehension experiments published between 1979 and 2019 provides a basis for subsequent discussion of the huge diversity of design options in the face of a lack of basic research on their consequences and comparability.
Readability and Understandability Scores for Snippet Assessment: an Exploratory Study
  • C. E. Dantas, M. Maia
  • Computer Science
    Anais do IX Workshop de Visualização, Evolução e Manutenção de Software (VEM 2021)
  • 2021
TLDR
This work investigates scores for understandability and readability features, under the perspective of the possible subjective perception of code snippet comprehension, and finds that code snippets with higher readability score has better comprehension than lower ones.
Naming Practices in Java Projects: An Empirical Study
TLDR
A study to explore the naming practices of Java programmers and analyzed 1,421,607 identifier names from 40 open-source Java projects and categorized these names into eight naming practices, highlighting in which contexts identifiers following each naming practice tend to appear more regularly.
Anchoring Code Understandability Evaluations Through Task Descriptions
TLDR
This study investigated in a randomized, controlled experiment whether a hint about the difficulty of the code to be understood in a task description anchors participants in their own code comprehensibility ratings and shows that participants are significantly influenced by the initial scenario description in their assessment of code com-prehensibility.
Recommending Code Understandability Improvements Based on Code Reviews
  • Delano Oliveira
  • Computer Science
    2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW)
  • 2021
TLDR
This paper is an early research proposal to recommend code understandability improvements based on code reviewer knowledge, which comprises a dataset of code understandable improvements extracted from code reviews.
Code Comprehension Confounders: A Study of Intelligence and Personal
TLDR
It is found that personality traits are unlikely to impact code comprehension performance, at least not when their influence is considered in isolation, and several intelligence facets as well as the personality trait conscientiousness are potential confounders that should not be neglected in code comprehension studies of individual performance and should be controlled for via an appropriate study design.
...
...

References

SHOWING 1-10 OF 79 REFERENCES
A simpler model of software readability
TLDR
This work presents a simple, intuitive theory of readability, based on size and code entropy, and shows how this theory leads to a much sparser, yet statistically significant, model of the mean readability scores produced in Buse's studies.
Learning a Metric for Code Readability
TLDR
An automated readability measure is constructed and shown that it can be 80 percent effective and better than a human, on average, at predicting readability judgments, and correlates strongly with three measures of software quality.
A metric for software readability
TLDR
An automated readability measure is constructed and it is shown that this metric correlates strongly with two traditional measures of software quality, code changes and defect reports and suggests that comments are less important than simple blank lines to local judgments of readability.
A comprehensive model for code readability
TLDR
The results demonstrate that (1) textual features complement other features and (2) a model containing all the features achieves a significantly higher accuracy as compared with all the other state‐of‐the‐art models.
Linking Code Readability, Structure, and Comprehension Among Novices: It's Complicated
TLDR
Novices may benefit from lightweight tools that identify common patterns and suggest an "ex expert" solution, while helping them see that the "expert" solution is more readable than they think.
"Automatically Assessing Code Understandability" Reanalyzed: Combined Metrics Matter
TLDR
A reanalysis of the data from the Scalabrino et al. study, in which different statistical modeling techniques suggest that some computed features of code, such as those arising from syntactic structure and documentation, have a small but significant correlation with understandability.
An investigation of misunderstanding code patterns in C open-source software projects
TLDR
The study shows that according to developers only some patterns considered previously by researchers may cause misunderstandings, and this results complement previous studies by taking the perception of developers into account.
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
TLDR
This paper extends the ActivitySpace framework to collect and analyze Human-Computer Interaction data across many applications (not just the IDEs), and finds that on average developers spend on average 58 percent of their time on program comprehension activities, and that they frequently use web browsers and document editors to performprogram comprehension activities.
Does the discipline of preprocessor annotations matter?: a controlled experiment
TLDR
The results suggest that there are no differences between disciplined and undisciplined annotations from a program-comprehension perspective, and observed that finding and correcting errors is a time-consuming and tedious task in the presence of preprocessor annotations.
The impact of identifier style on effort and comprehension
TLDR
A family of studies investigating the impact of program identifier style on human comprehension is presented, finding that experienced software developers appear to be less affected by identifier style; however, beginners benefit from the use of camel casing with respect to accuracy and effort.
...
...