利用基于游戏的平台教授代码重构:Refactoria 的经验
Leveraging Game-Based Platform to Teach Code Refactoring: An Experience with Refactoria
查看机构详情
- Stevens Institute of Technology(史蒂文斯理工学院)
机构由 AI 辅助整理,请以论文原文为准。
浏览论文内容
中文总结 AI 辅助
本文通过课堂实验评估了基于游戏的工具 Refactoria 在教授代码重构和代码异味识别方面的效果,结果显示其感知有用性高,并能有效促进学生对重构概念的理解。
中文摘要 AI 辅助
重构是在不改变代码外部行为的情况下改善其内部结构的艺术。由于该主题的重要性,文献中已经提出了多种教学方法和策略。然而,识别和重构代码异味的能力来自训练和经验,而缺乏动力可能会阻碍开发者采用重构工具。在本文中,我们讨论了在课堂上进行的一项实验的结果,该实验涉及使用 Refactoria(一种支持获取代码异味和重构概念的创新性基于游戏的工具)执行各种重构活动以消除反模式。玩家扮演专家厨师,与他们的助手 Watson the Whiskbot 一起,将 Watson 的指令重构为高效、可读且易于维护的代码。我们展示了一项涉及 30 名学生开发者的实验。特别是,我们研究了游戏化在吸引开发者参与代码异味识别和重构方面的感知、有效性和有用性。我们的评估表明,学生中感知有用性较高,参与者报告称 Refactoria 促进了他们对重构概念的理解。
英文摘要
Refactoring is the art of improving the internal structure of the code without altering its external behavior. Because of the topic's significance, several teaching methods and strategies have been proposed in the literature. However, skills in identifying and refac- toring code smells come from training and experience, and a lack of motivation may hinder developers' adoption of refactoring tools. In this paper, we discuss the results of an experiment in the classroom that involved performing various refactoring activities to remove antipatterns using Refactoria, an innovative game-based tool that supports the acquisition of code smell and refactoring concepts. The players play as an expert chef with their sidekick Watson the Whiskbot to refactor Watson's instructions into efficient, readable, and easily maintainable code. We present an experiment with 30 student developers. In particular, we study the perception, effectiveness, and usefulness of gamification for engaging developers in code smell identification and refactoring. Our evaluation indicates a high perceived usefulness among students, and participants reported that Refactoria facilitated their understanding of the refactoring concepts.