首页    期刊浏览 2026年01月03日 星期六
登录注册

文章基本信息

  • 标题:Aesthetics Versus Readability of Source Code
  • 作者:Ron Coleman
  • 期刊名称:International Journal of Advanced Computer Science and Applications(IJACSA)
  • 印刷版ISSN:2158-107X
  • 电子版ISSN:2156-5570
  • 出版年度:2018
  • 卷号:9
  • 期号:9
  • DOI:10.14569/IJACSA.2018.090902
  • 出版社:Science and Information Society (SAI)
  • 摘要:The relationship between programming style and program readability has never been examined empirically, although the association has substantial importance for both pedagogical and industry best practices. This paper studies a fractal, relativistic measure of programming style called the beauty factor or “beauty” and puts forward two new hypotheses of beauty. First, code with increasing beauty tends to be more readable. Second, beauty measures a unique property in code called aesthetic value distinct from readability. These hypotheses are tested on a corpus of 53,000 lines of open source system codes written by experienced Linux programmers. Statistical correlation analysis is used on 11 different beauty factors versus eight different readability models (i.e., 88 experiments total). As the primary finding, the data show the maximum absolute statistically significant correlation is |p|=0.59 whereas the absolute median correlation is |p|=0.33. In other words, at least 65% of statistically significant variations in beauty cannot be explained by variations in readability; approximately 90% of statistically significant variations in beauty cannot be explained typically by variations in readability. These results lend support to both hypotheses. The data further shows indentation is more reliably correlated with readability than mnemonics or comments and GNU style is more correlated with readability than K&R, BSD, or Linux styles.
  • 关键词:Programming style; fractal geometry; readability
Loading...
联系我们|关于我们|网站声明
国家哲学社会科学文献中心版权所有