vix.ing · top · new · best · stats · spec

Code beauty is in the eye of the beholder: Exploring the relation between code beauty and quality

2025/05/08 by Theodoros Maikantis, Ilianna Natsiou, Christina Volioti +5 · 1 voice
Computer Science · #Software Engineering Research

paper · doi:10.1016/j.jss.2025.112494

openalex publication_date 2025/05/08 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/23

Abstract

Software artifacts and source code are often viewed as pure technical constructs aiming primarily at delivering specific functionality to the end users. However, almost each line of a computer program is the result of software engineer’s craftsmanship and thus reflects their skills and capabilities, but also their aesthetic view of how code should be written. Additionally, by nature, the code is not an artifact that is managed by a single person: the code is peer-reviewed, in some cases programmed in pairs, or maintained by different people. In this respect, the first impression for the quality of a code is usually a matter of “ reading ” the “ beauty ” of the code and then diving into the details of the actual implementation. This “ first-look ” impression can psychologically bias the software engineers, either positively or negatively and affect their evaluation. In this article we propose a novel code beauty model (accompanied with metrics) and empirically explore: (a) if different software engineers perceive code beauty in the same way; (b) if the proposed code beauty metrics are correlated to the perceived code beauty by individual software engineers; and (c) if code beauty metrics are correlated to software maintainability. The results of the study suggest: (a) that code beauty is highly subjective and different software engineers perceive a code chunk as beautiful or not in an inconsistent way; (b) that some code beauty metrics can be considered as correlated to maintainability; and therefore, the “ first-look ” impression might to some extent be representative of the quality of the reviewed code chunk.

Citations

Discussions

Related