Do code smells hamper novice programming? A controlled experiment on Scratch programs

Do code smells hamper novice programming? A controlled experiment on Scratch programs
复制标题

代码异味会妨碍新手编程吗?

DOI:
10.1109/icpc.2016.7503706
复制
发表时间:
2016
期刊:
2016 IEEE 24th International Conference on Program Comprehension (ICPC)
影响因子:
--
通讯作者:
Efthimia Aivaloglou
Efthimia Aivaloglou
中科院分区:
--
文献类型:
--
作者:
F. Hermans;Efthimia Aivaloglou

文献摘要

被引文献

相似文献

最近,基于块的编程语言,例如爱丽丝,Scratch和Blockly已成为编程教育的流行工具。有大量研究表明,基于块的语言适合早期编程教育。但是,基于块的程序也可以臭吗?这对学习者很重要吗?在本文中,我们探讨了代码在基于块的编程语言刮擦的背景下闻到隐喻。我们对61名新手刮擦程序员进行了对照实验,其中我们将新手分为三组。三分之一获得了一个非熟练程序,而其他小组分别收到一个复制或长度方法闻到的程序。然后,所有受试者在其程序上执行相同的理解任务,然后我们衡量他们的时间和正确性。实验的结果表明,代码的气味确实会影响性能:在程序上表现出代码气味的受试者的表现明显较差,但气味并不影响所需的时间。为了更详细地研究不同类型的任务,我们发现长长的方法主要降低了系统的理解,而重复降低了受试者修改刮擦程序的便捷性。
Recently, block-based programming languages like Alice, Scratch and Blockly have become popular tools for programming education. There is substantial research showing that block-based languages are suitable for early programming education. But can block-based programs be smelly too? And does that matter to learners? In this paper we explore the code smells metaphor in the context of block-based programming language Scratch. We conduct a controlled experiment with 61 novice Scratch programmers, in which we divided the novices into three groups. One third receive a non-smelly program, while the other groups receive a program suffering from the Duplication or the Long Method smell respectively. All subjects then perform the same comprehension tasks on their program, after which we measure their time and correctness. The results of the experiment show that code smell indeed influence performance: subjects working on the program exhibiting code smells perform significantly worse, but the smells did not affect the time subjects needed. Investigating different types of tasks in more detail, we find that Long Method mainly decreases system understanding, while Duplication decreases the ease with which subjects modify Scratch programs.