Common Patterns in Block-Based Robot Programs

Florian Obermüller, Robert Pernerstorfer, Lisa Bailey, Ute Heuer, G. Fraser
{"title":"Common Patterns in Block-Based Robot Programs","authors":"Florian Obermüller, Robert Pernerstorfer, Lisa Bailey, Ute Heuer, G. Fraser","doi":"10.1145/3556787.3556859","DOIUrl":null,"url":null,"abstract":"Programmable robots are engaging and fun to play with, interact with the real world, and are therefore well suited to introduce young learners to programming. Introductory robot programming languages often extend existing block-based languages such as Scratch. While teaching programming with such languages is well established, the interaction with the real world in robot programs leads to specific challenges, for which learners and educators may require assistance and feedback. A practical approach to provide this feedback is by identifying and pointing out patterns in the code that are indicative of good or bad solutions. While such patterns have been defined for regular block-based programs, robot-specific programming aspects have not been considered so far. The aim of this paper is therefore to identify patterns specific to robot programming for the Scratch-based mBlock programming language, which is used for the popular mBot and Codey Rocky robots. We identify: (1) 26 bug patterns, which indicate erroneous code; (2) three code smells, which indicate code that may work but is written in a confusing or difficult to understand way; and (3) 18 code perfumes, which indicate aspects of code that are likely good. We extend the LitterBox analysis framework to automatically identify these patterns in mBlock programs. Evaluated on a dataset of 3,540 mBlock programs, we find a total of 6,129 instances of bug patterns, 592 code smells and 14,495 code perfumes. This demonstrates the potential of our approach to provide feedback and assistance to learners and educators alike for their mBlock robot programs.","PeriodicalId":136039,"journal":{"name":"Proceedings of the 17th Workshop in Primary and Secondary Computing Education","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2022-08-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 17th Workshop in Primary and Secondary Computing Education","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3556787.3556859","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Programmable robots are engaging and fun to play with, interact with the real world, and are therefore well suited to introduce young learners to programming. Introductory robot programming languages often extend existing block-based languages such as Scratch. While teaching programming with such languages is well established, the interaction with the real world in robot programs leads to specific challenges, for which learners and educators may require assistance and feedback. A practical approach to provide this feedback is by identifying and pointing out patterns in the code that are indicative of good or bad solutions. While such patterns have been defined for regular block-based programs, robot-specific programming aspects have not been considered so far. The aim of this paper is therefore to identify patterns specific to robot programming for the Scratch-based mBlock programming language, which is used for the popular mBot and Codey Rocky robots. We identify: (1) 26 bug patterns, which indicate erroneous code; (2) three code smells, which indicate code that may work but is written in a confusing or difficult to understand way; and (3) 18 code perfumes, which indicate aspects of code that are likely good. We extend the LitterBox analysis framework to automatically identify these patterns in mBlock programs. Evaluated on a dataset of 3,540 mBlock programs, we find a total of 6,129 instances of bug patterns, 592 code smells and 14,495 code perfumes. This demonstrates the potential of our approach to provide feedback and assistance to learners and educators alike for their mBlock robot programs.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
基于块的机器人程序中的常见模式
可编程机器人很吸引人,玩起来很有趣,与现实世界互动,因此非常适合向年轻学习者介绍编程。介绍性机器人编程语言通常扩展现有的基于块的语言,如Scratch。虽然用这些语言教授编程已经很成熟,但机器人程序与现实世界的互动会带来一些具体的挑战,学习者和教育者可能需要帮助和反馈。提供这种反馈的一种实用方法是识别并指出代码中指示好的或坏的解决方案的模式。虽然已经为常规的基于块的程序定义了这种模式,但到目前为止还没有考虑到特定于机器人的编程方面。因此,本文的目的是为基于scratch的mBlock编程语言识别特定于机器人编程的模式,该语言用于流行的mBot和cody Rocky机器人。我们确定:(1)26个错误模式,这表明错误的代码;(2)三种代码气味,这表明代码可以工作,但以令人困惑或难以理解的方式编写;(3) 18种代码香味,表示代码中可能好的方面。我们扩展了LitterBox分析框架,以自动识别mBlock程序中的这些模式。对3540个mBlock程序的数据集进行评估,我们发现总共有6129个错误模式实例,592个代码气味和14495个代码香味。这证明了我们的方法为学习者和教育工作者提供反馈和帮助的潜力。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Investigating Teachers’ Diagnostic and Intervention Skills in Debugging ”Roteco” - a Swiss teacher community for educational robotics Designing a Research Approach to Investigate Computer Science Student Teachers’ Beliefs on AI in School An Experience in Explicitly Training Pre-Service Early Childhood Teachers in Programming Concepts with ScratchJr Video Analysis of a Teacher’s Use of Notional Machines in an Introductory High School Electronic Textile Unit: A three-tier framework to capture notional machines in practice
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1