skip to main content
10.1145/3644384.3644474acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

What you See is What you Get: Exploring the Relation between Code Aesthetics and Code Quality

Published: 07 June 2024 Publication History

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 developers' 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 aesthetics of the code and then, diving into the details of the actual implementation. This "first-look" impression can psychologically bias the software engineer, either positively or negatively and affect his/her evaluation. In this article we investigate whether code beauty (or code aesthetics) must be valued in software programs, as a proxy to the quality of the code. Specifically, we attempt to relate the notion of code beauty with code quality metrics. For this purpose, we catalogued existing beauty measures (assessing the aesthetics of images, objects, and alphanumeric displays), tailored them to match code beauty, and correlated them to structural properties that are related to Technical Debt Interest (such as coupling, cohesion, etc.). The results of the study suggest that some code beauty metrics can be considered as correlated to TD Interest; and therefore, the "first-look" impression might to some extent be representative of the quality of the reviewed code chunk.

References

[1]
Begel, A., & Nagappan, N. (2008, October). Pair programming: what's in it for me? In Proceedings of the Second ACM-IEEE international symposium on Empirical software engineering and measurement (pp. 120--128).
[2]
Bacchelli, A., & Bird, C. (2013, May). Expectations, outcomes, and challenges of modern code review. In 2013 35th International Conference on Software Engineering (ICSE) (pp. 712--721). IEEE.
[3]
K. K. Aggarwal, Y. Singh, and J. K. Chhabra, "An integrated measure of software maintainability," Annual Reliability and Maintainability Symposium. 2002 Proceedings, Seattle, WA, USA, 2002, pp. 235--241.
[4]
N. A. Al-Saiyd, "Source code comprehension analysis in software maintenance," 2017 2nd International Conference on Computer and Communication Systems (ICCCS), Krakow, Poland, 2017, pp. 1--5.
[5]
K. K. Aggarwal, Y. Singh, and J. K. Chhabra, "An integrated measure of software maintainability," Annual Reliability and Maintainability Symposium. 2002 Proceedings, Seattle, WA, USA, 2002, pp. 235--241.
[6]
N. A. Al-Saiyd, "Source code comprehension analysis in software maintenance," 2017 2nd International Conference on Computer and Communication Systems (ICCCS), Krakow, Poland, 2017, pp. 1--5.
[7]
T. Duchess, Molly Bawn. Dodo Press, 2008.
[8]
S. Zeki, J. P. Romaya, D. M. T. Benincasa, and M. F. Atiyah, "The experience of mathematical beauty and its neural correlates," Front. Hum. Neurosci., vol. 8, p. 68, 2014.
[9]
Oram, A. and Wilson, G. (2007). Beautiful Code. Newton: O' Reily.
[10]
R. Coleman, "Beauty and Maintainability of Code," 2018 International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, NV, USA, 2018, pp. 825--828.
[11]
H. Eichelberger. 2003. Nice class diagrams admit good design? In Proceedings of the 2003 ACM symposium on Software visualization (SoftVis '03). Association for Computing Machinery, New York, NY, USA.
[12]
C. M. Aldenhoven and R. S. Engelschall, "The beauty of software architecture," 2023 IEEE 20th International Conference on Software Architecture (ICSA), L'Aquila, Italy, 2023, pp. 117--128.
[13]
Santayana G. (1955). The Sense of Beauty. New York: Dover Publications
[14]
Loukaki, A. (2008). Living Ruins. Value Conflict. Farnham: Ashgate.
[15]
Zeki S., Romaya J. P., Benincasa D. M. T. and Atiyah M. F. (2014). The experience of mathematical beauty and its neural correlates, Frontiers in Human Neuroscience, vol. 8, article 68.
[16]
Wertheimer M, Riezler K. (1994). Gestalt Theory, Social Research, vol. 11, no. 1, pp 78--99
[17]
Ngo D. C. L., Teo L. S. and Byrne J. G. (2002). Evaluating Interface Esthetics, Knowledge and Information Systems, vol. 4, no. 1, pp. 46--79
[18]
Khan Academy. What is the center of mass? [Accessed June 2023] https://www.khanacademy.org/science/physics/linear-momentum/center-of-mass/a/what-is-center-of-mass
[19]
Danielsson, P. E. (1980). Euclidean distance mapping. Computer Graphics and image processing, 14(3), 227--248.
[20]
Tullis, T. (1984). Predicting the Usability of Alphanumeric displays. (Ph.D.). Rice University, Houston
[21]
Runeson, P., Host, M., Rainer, A., & Regnell, B. (2012). Case study research in software engineering: Guidelines and examples. Wiley & Sons.
[22]
Nikolaidis, N., Mittas, N., Ampatzoglou, A., Arvanitou, E. M., & Chatzigeorgiou, A. (2023). Assessing TD Macro-Management: A Nested Modeling Statistical Approach. IEEE Transactions on Software Engineering, 49(4), 2996--3007.
[23]
E. M. Arvanitou, P. Argyriadou, G. Koutsou, A. Ampatzoglou, and A. Chatzigeorgiou, "Quantifying TD Interest: Are we Getting Closer, or Not Even That?", 48th Euromicro Conference on Software Engineering and Advanced Applications (SEAA' 22), IEEE Computer Society, August 2020, Gran Canaria, Spain
[24]
Ampatzoglou, A., Mittas, N., Tsintzira, A. A., Ampatzoglou, A., Arvanitou, E. M., Chatzigeorgiou, A., ... & Angelis, L. (2020). Exploring the relation between technical debt principal and interest: An empirical approach. Information and Software Technology, 128, 106391.
[25]
Riaz, M., Mendes, E., & Tempero, E. (2009, October). A systematic review of software maintainability prediction and metrics. In 2009 3rd international symposium on empirical software engineering and measurement (pp. 367--377). IEEE.
[26]
Van Koten, C., & Gray, A. R. (2006). An application of Bayesian network for predicting object-oriented software maintainability. Information and Software Technology, 48(1), 59--67.
[27]
Zhou, Y., & Leung, H. (2007). Predicting object-oriented software maintainability using multivariate adaptive regression splines. Journal of systems and software, 80(8), 1349--1361.
[28]
Li, W., & Henry, S. (1993). Object-oriented metrics that predict maintainability. Journal of systems and software, 23(2), 111--122.
[29]
Chidamber, S. R., & Kemerer, C. F. (1994). A metrics suite for object-oriented design. IEEE Transactions on software engineering, 20(6).
[30]
De Winter, J. C., Gosling, S. D., & Potter, J. (2016). Comparing the Pearson and Spearman correlation coefficients across distributions and sample sizes: A tutorial using simulations and empirical data. Psychological methods, 21(3), 273.
[31]
Thiese, M. S., Ronna, B., & Ott, U. (2016). P value interpretations and considerations. Journal of thoracic disease, 8(9), E928.
[32]
Hinkle D.E., Wiersma W., Jurs S.G. (2003). Applied Statistics for the Behavioral Sciences 5th ed. Boston: Houghton Mifflin.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
TechDebt '24: Proceedings of the 7th ACM/IEEE International Conference on Technical Debt
April 2024
55 pages
ISBN:9798400705908
DOI:10.1145/3644384
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 07 June 2024

Check for updates

Author Tags

  1. code beauty
  2. code aesthetics
  3. code quality
  4. TD interest

Qualifiers

  • Research-article

Funding Sources

Conference

TechDebt '24
Sponsor:

Acceptance Rates

Overall Acceptance Rate 14 of 31 submissions, 45%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 60
    Total Downloads
  • Downloads (Last 12 months)60
  • Downloads (Last 6 weeks)4
Reflects downloads up to 15 Feb 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media