arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2108.06289cs.SE
收藏

代码香水:报告好代码以鼓励学习者

Code Perfumes: Reporting Good Code to Encourage Learners

Florian Obermüller, Lena Bloch, Luisa Greifenstein, Ute Heuer, Gordon Fraser

摘要:

像Scratch这样的基于块的程序设计语言使孩子们在学习编程的同时能够发挥创造力。尽管基于块的方法简化了程序的创建,但学习编程仍然具有挑战性。因此,自动化工具(如linter)通过提供有关程序中潜在错误或代码气味的反馈来支持学习者。即使这种反馈是精心设计和建设性的,它仍然代表纯粹的负面批评,并通过建设忽略了学习者在他们的计划中做得正确。在本文中,我们介绍了一个正交的方法来linting:我们补充的批评产生的linter与正反馈。我们引入代码香味的概念,作为代码气味的对应物,表明正确应用被认为是好的编程实践。通过分析学习者做错了什么,以及他们做对了什么,我们希望鼓励学习者,让教师和学生更好地了解学习者的进步,并支持采用自动反馈工具。使用一个目录的25个代码香水的Scratch,我们凭经验证明,这些代表频繁的做法在Scratch,我们发现,更好的程序确实包含更多的代码香水。

英文摘要:

Block-based programming languages like Scratch enable children to be creative while learning to program. Even though the block-based approach simplifies the creation of programs, learning to program can nevertheless be challenging. Automated tools such as linters therefore support learners by providing feedback about potential bugs or code smells in their programs. Even when this feedback is elaborate and constructive, it still represents purely negative criticism and by construction ignores what learners have done correctly in their programs. In this paper we introduce an orthogonal approach to linting: We complement the criticism produced by a linter with positive feedback. We introduce the concept of code perfumes as the counterpart to code smells, indicating the correct application of programming practices considered to be good. By analysing not only what learners did wrong but also what they did right we hope to encourage learners, to provide teachers and students a better understanding of learners' progress, and to support the adoption of automated feedback tools. Using a catalogue of 25 code perfumes for Scratch, we empirically demonstrate that these represent frequent practices in Scratch, and we find that better programs indeed contain more code perfumes.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑