Readability and Understandability Scores for Snippet Assessment: an Exploratory Study

by   Carlos Eduardo C. Dantas, et al.

Code search engines usually use readability feature to rank code snippets. There are several metrics to calculate this feature, but developers may have different perceptions about readability. Correlation between readability and understandability features has already been proposed, i.e., developers need to read and comprehend the code snippet syntax, but also understand the semantics. This work investigate scores for understandability and readability features, under the perspective of the possible subjective perception of code snippet comprehension. We find that code snippets with higher readability score has better comprehension than lower ones. The understandability score presents better comprehension in specific situations, e.g. nested loops or if-else chains. The developers also mentioned writability aspects as the principal characteristic to evaluate code snippets comprehension. These results provide insights for future works in code comprehension score optimization.


Developers' Visuo-spatial Mental Model and Program Comprehension

Previous works from research and industry have proposed a spatial repres...

An Empirical Validation of Cognitive Complexity as a Measure of Source Code Understandability

Background: Developers spend a lot of their time on understanding source...

40 Years of Designing Code Comprehension Experiments: A Systematic Mapping Study

The relevance of code comprehension in a developer's daily work was reco...

Anchoring Code Understandability Evaluations Through Task Descriptions

In code comprehension experiments, participants are usually told at the ...

Code Search: A Survey of Techniques for Finding Code

The immense amounts of source code provide ample challenges and opportun...

A Replication Study on Code Comprehension and Expertise using Lightweight Biometric Sensors

Code comprehension has been recently investigated from physiological and...

Please sign up or login with your details

Forgot password? Click here to reset