Improving Source Code Readability: Theory and Practice
There are several widely accepted metrics to measure code quality that are currently being used in both research and practice to detect code smells and to find opportunities for code improvement. Although these metrics have been proposed as a proxy of code quality, recent research suggests that more often than not, state-of-the-art code quality metrics do not successfully capture quality improvements in the source code as perceived by developers. More specifically, results show that there may be inconsistencies between, on the one hand, the results from metrics for cohesion, coupling, complexity, and readability, and, on the other hand, the interpretation of these metrics in practice. As code improvement tools rely on these metrics, there is a clear need to identify and resolve the aforementioned inconsistencies. This will allow for the creation of tools that are more aligned with developers’ perception of quality, and can more effectively help source code improvement efforts. In this study, we investigate 548 instances of source code readability improvements, as explicitly stated by internal developers in practice, from 63 engineered software projects. We show that current readability models fail to capture readability improvements. We also show that tools to calculate additional metrics, to detect refactorings, and to detect style problems are able to capture characteristics that are specific to readability changes and thus should be considered by future readability models.
Sat 25 MayDisplayed time zone: Eastern Time (US & Canada) change
10:00 - 10:30 | Session I : Comprehending program comprehension IICPC 2019 Technical Research / ICPC 2019 Replications at Laurier Chair(s): Dror Feitelson Hebrew University | ||
10:00 20mFull-paper | Improving Source Code Readability: Theory and Practice ICPC 2019 Technical Research A: Sarah Fakhoury Washington State University, Devjeet Roy , Sk. Adnan Hassan Infosapex Limited, Venera Arnaoudova Washington State University Pre-print | ||
10:20 10mShort-paper | Replicating Novices' Struggles with Coding Style ICPC 2019 Replications Pre-print |