Well structured and readable source code is a pre-requisite for maintainable software and successful collaboration among developers. Static analysis enables the automated extraction of code complexity and readability metrics which can be leveraged to highlight potential improvements in code to both attain software of high quality and reinforce good practices for developers as an educational tool. This assumes reliable readability metrics which are not trivial to obtain since code readability is somewhat subjective. Recent research has resulted in increasingly sophisticated models for predicting readability as perceived by humans primarily with a procedural and object oriented focus, while functional and declarative languages and language extensions advance as they often are said to lead to more concise and readable code. In this paper, we investigate whether the existing complexity and readability metrics reflect that wisdom or whether the notion of readability and its constituents requires overhaul in the light of programming language changes. We therefore compare traditional object oriented and reactive programming in terms of code complexity and readability in a case study. Reactive programming is claimed to increase code quality but few studies have substantiated these claims empirically. We refactored an object oriented open source project into a reactive candidate and compare readability with the original using cyclomatic complexity and two state-of-the-art readability metrics. More elaborate investigations are required, but our findings suggest that both cyclomatic complexity and readability decrease significantly at the same time in the reactive candidate, which seems counter-intuitive. We exemplify and substantiate why readability metrics may require adjustment to better suit popular programming styles other than imperative and object-oriented to better match human expectations.


翻译:良好的结构化和可读源码是开发者之间可维护的软件和成功合作的先决条件。 静态分析能够自动提取代码复杂度和可读度衡量标准,可以用来突出代码方面的潜在改进,既能达到高质量软件,又能加强开发者作为教育工具的良好做法。这假定可靠的可读性衡量标准,这些衡量标准并非微不足道,因为代码可读性是比较主观的。最近的研究产生了预测可读性越来越复杂的模型,主要以程序和目标为重点,而功能性和宣示性语言和语言扩展推进,因为人们常说它们会导致更简洁和可读性代码。在本文件中,我们调查现有的复杂度和可读性衡量度衡量标准是否反映了这种智慧,或读性概念及其组成部分是否需要根据方案语言的变化加以修改。因此,我们在案例研究中将传统的面向对象和反应性方案编制方法在代码复杂性和可读性方面进行了比较。 重新编程要求提高代码质量,但从经验上证实这些说法的研究很少。我们将目标导向的开放源项目重新定位为可反应的可读性候选人,并且将原始的易读性比原始的易读性更难理解性指标性更难理解性调查。我们看来要求的复杂性和更难理解性更难于预测性。

0
下载
关闭预览

相关内容

一个旨在提升互联网阅读体验的工具。 readability.com/
专知会员服务
38+阅读 · 2020年9月6日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
计算机 | 入门级EI会议ICVRIS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年6月24日
IEEE | DSC 2019诚邀稿件 (EI检索)
Call4Papers
10+阅读 · 2019年2月25日
人工智能 | SCI期刊专刊信息3条
Call4Papers
5+阅读 · 2019年1月10日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
CCF B类期刊IPM专刊截稿信息1条
Call4Papers
3+阅读 · 2018年10月11日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
视觉机械臂 visual-pushing-grasping
CreateAMind
3+阅读 · 2018年5月25日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
On Memorization in Probabilistic Deep Generative Models
Arxiv
3+阅读 · 2021年2月24日
Arxiv
7+阅读 · 2020年6月29日
Metrics for Explainable AI: Challenges and Prospects
Arxiv
4+阅读 · 2018年12月11日
Arxiv
3+阅读 · 2018年4月5日
VIP会员
相关资讯
计算机 | 入门级EI会议ICVRIS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年6月24日
IEEE | DSC 2019诚邀稿件 (EI检索)
Call4Papers
10+阅读 · 2019年2月25日
人工智能 | SCI期刊专刊信息3条
Call4Papers
5+阅读 · 2019年1月10日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
CCF B类期刊IPM专刊截稿信息1条
Call4Papers
3+阅读 · 2018年10月11日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
视觉机械臂 visual-pushing-grasping
CreateAMind
3+阅读 · 2018年5月25日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
Top
微信扫码咨询专知VIP会员