The Mind Is a Powerful Place: How Showing Code Comprehensibility Metrics Influences Code Understanding

12/16/2020
by   Marvin Wyrich, et al.
0

Static code analysis tools and integrated development environments present developers with quality-related software metrics, some of which describe the understandability of source code. Software metrics influence overarching strategic decisions that impact the future of companies and the prioritization of everyday software development tasks. Several software metrics, however, lack in validation: we just choose to trust that they reflect what they are supposed to measure. Some of them were even shown to not measure the quality aspects they intend to measure. Yet, they influence us through biases in our cognitive-driven actions. In particular, they might anchor us in our decisions. Whether the anchoring effect exists with software metrics has not been studied yet. We conducted a randomized and double-blind experiment to investigate the extent to which a displayed metric value for source code comprehensibility anchors developers in their subjective rating of source code comprehensibility, whether performance is affected by the anchoring effect when working on comprehension tasks, and which individual characteristics might play a role in the anchoring effect. We found that the displayed value of a comprehensibility metric has a significant and large anchoring effect on a developer's code comprehensibility rating. The effect does not seem to affect the time or correctness when working on comprehension questions related to the code snippets under study. Since the anchoring effect is one of the most robust cognitive biases, and we have limited understanding of the consequences of the demonstrated manipulation of developers by non-validated metrics, we call for an increased awareness of the responsibility in code quality reporting and for corresponding tools to be based on scientific evidence.

READ FULL TEXT
research
07/24/2020

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

Background: Developers spend a lot of their time on understanding source...
research
03/10/2020

Engineering Human Values in Software through Value Programming

Ignoring human values in software development may disadvantage users by ...
research
08/25/2023

Investigating the Impact of Vocabulary Difficulty and Code Naturalness on Program Comprehension

Context: Developers spend most of their time comprehending source code d...
research
09/20/2019

Do internal software quality tools measure validated metrics?

Internal software quality determines the maintainability of the software...
research
04/23/2023

U Owns the Code That Changes and How Marginal Owners Resolve Issues Slower in Low-Quality Source Code

[Context] Accurate time estimation is a critical aspect of predictable s...
research
04/11/2018

An Experimental Evaluation of a De-biasing Intervention for Professional Software Developers

CONTEXT: The role of expert judgement is essential in our quest to impro...
research
07/22/2023

A Quantitative Analysis of Open Source Software Code Quality: Insights from Metric Distributions

Code quality is a crucial construct in open-source software (OSS) with t...

Please sign up or login with your details

Forgot password? Click here to reset