Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3556787.3556859acmotherconferencesArticle/Chapter ViewAbstractPublication PageswipsceConference Proceedingsconference-collections
research-article

Common Patterns in Block-Based Robot Programs

Published: 31 October 2022 Publication History

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.

References

[1]
David Bau, Jeff Gray, Caitlin Kelleher, Josh Sheldon, and Franklyn Turbak. 2017. Learnable Programming: Blocks and Beyond. Commun. ACM 60, 6 (May 2017), 72–80. https://doi.org/10.1145/3015455
[2]
Bryce Boe, Charlotte Hill, Michelle Len, Greg Dreschler, Phillip Conrad, and Diana Franklin. 2013. Hairball: Lint-inspired static analysis of scratch projects. SIGCSE 2013 - Proceedings of the 44th ACM Technical Symposium on Computer Science Education, 215–220. https://doi.org/10.1145/2445196.2445265
[3]
Martin Fowler. 1999. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA.
[4]
Gordon Fraser, Ute Heuer, Nina Körber, Florian Obermüller, and Ewald Wasmeier. 2021. LitterBox: A Linter for Scratch Programs. In 2021 IEEE/ACM 43rd International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET). 183–188. https://doi.org/10.1109/ICSE-SEET52601.2021.00028
[5]
Christoph Frädrich, Florian Obermüller, Nina Körber, Ute Heuer, and Gordon Fraser. 2020. Common Bugs in Scratch Programs. In Proceedings of the 2020 ACM Conference on Innovation and Technology in Computer Science Education (Trondheim, Norway) (ITiCSE ’20). 89–95. https://doi.org/10.1145/3341525.3387389
[6]
Felienne Hermans and Efthimia Aivaloglou. 2016. Do code smells hamper novice programming? A controlled experiment on Scratch programs. In IEEE International Conference on Program Comprehension (ICPC). 1–10. https://doi.org/10.1109/ICPC.2016.7503706
[7]
Felienne Hermans, Kathryn T. Stolee, and David Hoepelman. 2016. Smells in Block-Based Programming Languages. In 2016 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC) (Cambridge, United Kingdom, 2016-09). IEEE, 68–72. https://doi.org/10.1109/VLHCC.2016.7739666
[8]
David Hovemeyer and William Pugh. 2004. Finding Bugs is Easy. SIGPLAN Not. 39, 12 (Dec. 2004), 92–106. https://doi.org/10.1145/1052883.1052895
[9]
David E Johnson. 2016. ITCH: Individual Testing of Computer Homework for Scratch Assignments. In Proceedings of the 47th ACM Technical Symposium on Computing Science Education. ACM, 223–227.
[10]
Sung Eun Jung and Eun-sok Won. 2018. Systematic Review of Research Trends in Robotics Education for Young Children. Sustainability 10, 4 (2018).
[11]
Nina Körber, Lisa Bailey, Luisa Greifenstein, Gordon Fraser, Barbara Sabitzer, and Marina Rottenhofer. 2021. An Experience of Introducing Primary School Children to Programming Using Ozobots (Practical Report). Association for Computing Machinery, New York, NY, USA. https://doi.org/10.1145/3481312.3481347
[12]
P. Louridas. 2006. Static code analysis. IEEE Software 23, 4 (2006), 58–61. https://doi.org/10.1109/MS.2006.114
[13]
John Maloney, Mitchel Resnick, Natalie Rusk, Brian Silverman, and Evelyn Eastmond. 2010. The Scratch Programming Language and Environment. ACM Transactions on Computing Education (TOCE) 10 (11 2010), 16.
[14]
Henry B. Mann and Donald R. Whitney. 1947. On a Test of Whether one of Two Random Variables is Stochastically Larger than the Other. The Annals of Mathematical Statistics 18, 1 (1947), 50 – 60. https://doi.org/10.1214/aoms/1177730491
[15]
Monica M. McGill and Adrienne Decker. 2020. Tools, Languages, and Environments Used in Primary and Secondary Computing Education. In Proceedings of the 2020 ACM Conference on Innovation and Technology in Computer Science Education (Trondheim, Norway) (ITiCSE ’20). Association for Computing Machinery, New York, NY, USA, 103–109. https://doi.org/10.1145/3341525.3387365
[16]
Jesús Moreno-León and Gregorio Robles. 2014. Automatic detection of bad programming habits in scratch: A preliminary study. In IEEE Frontiers in Education Conference (FIE) Proceedings. 1–4. https://doi.org/10.1109/FIE.2014.7044055
[17]
J. Novak, A. Krajnc, and R. Žontar. 2010. Taxonomy of static code analysis tools. In The 33rd International Convention MIPRO. 418–422.
[18]
Florian Obermüller, Lena Bloch, Luisa Greifenstein, Ute Heuer, and Gordon Fraser. 2021. Code Perfumes: Reporting Good Code to Encourage Learners. Association for Computing Machinery. https://doi.org/10.1145/3481312.3481346
[19]
LH Peng, MH Bai, and I Siswanto. 2020. A study of learning motivation of senior high schools by applying unity and mblock on programming languages courses. In Journal of Physics: Conference Series, Vol. 1456. IOP Publishing, 012037.
[20]
Juha Sorva. 2018. Misconceptions and the Beginner Programmer.
[21]
Andreas Stahlbauer, Christoph Frädrich, and Gordon Fraser. 2020. Verified from Scratch: Program Analysis for Learners’ Programs. In In Proceedings of the International Conference on Automated Software Engineering (ASE). IEEE.
[22]
Andreas Stahlbauer, Marvin Kreis, and Gordon Fraser. 2019. Testing scratch programs automatically. In Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 165–175.
[23]
Amanda Sullivan and Marina Umaschi Bers. 2016. Robotics in the early childhood classroom: learning outcomes from an 8-week robotics curriculum in pre-kindergarten through second grade. International Journal of Technology and Design Education 26, 1(2016), 3–20.
[24]
Alaaeddin Swidan, Felienne Hermans, and Marileen Smit. 2018. Programming Misconceptions for School Students. In Proceedings of the 2018 ACM Conference on International Computing Education Research (Espoo, Finland) (ICER ’18). Association for Computing Machinery, New York, NY, USA, 151–159. https://doi.org/10.1145/3230977.3230995
[25]
Peeratham Techapalokul and Eli Tilevich. 2017. Quality Hound — An online code smell analyzer for scratch programs. In IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). 337–338.
[26]
Peeratham Techapalokul and Eli Tilevich. 2017. Understanding Recurring Quality Problems and Their Impact on Code Sharing in Block-Based Software. In IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). IEEE, 43–51.
[27]
Andras Vargha and Harold Delaney. 2000. A Critique and Improvement of the ”CL” Common Language Effect Size Statistics of McGraw and Wong. Journal of Educational and Behavioral Statistics - J EDUC BEHAV STAT 25 (06 2000). https://doi.org/10.2307/1165329

Cited By

View all
  • (2024)Interaction Patterns During Block-based Programming Activities Predict Computational Thinking: Analysis of the Differences in Gender, Cognitive Load, Spatial Ability, and Programming ProficiencyAI, Computer Science and Robotics Technology10.5772/acrt.363Online publication date: 26-Jul-2024
  • (2024)Gelingensbedingungen für die affektive Förderung von Kindern durch einen Robotik-Making-KursPromoting Affective Components of Children by a Maker Course on RoboticsMedienPädagogik: Zeitschrift für Theorie und Praxis der Medienbildung10.21240/mpaed/56/2024.03.15.X56(429-456)Online publication date: 15-Mar-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
WiPSCE '22: Proceedings of the 17th Workshop in Primary and Secondary Computing Education
October 2022
130 pages
ISBN:9781450398534
DOI:10.1145/3556787
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 October 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Block-based programming
  2. Code quality
  3. Linting
  4. Robot
  5. mBlock

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

  • 01JA1924

Conference

WiPSCE '22
WiPSCE '22: The 17th Workshop in Primary and Secondary Computing Education
October 31 - November 2, 2022
Morschach, Switzerland

Acceptance Rates

WiPSCE '22 Paper Acceptance Rate 14 of 41 submissions, 34%;
Overall Acceptance Rate 104 of 279 submissions, 37%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)26
  • Downloads (Last 6 weeks)3
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Interaction Patterns During Block-based Programming Activities Predict Computational Thinking: Analysis of the Differences in Gender, Cognitive Load, Spatial Ability, and Programming ProficiencyAI, Computer Science and Robotics Technology10.5772/acrt.363Online publication date: 26-Jul-2024
  • (2024)Gelingensbedingungen für die affektive Förderung von Kindern durch einen Robotik-Making-KursPromoting Affective Components of Children by a Maker Course on RoboticsMedienPädagogik: Zeitschrift für Theorie und Praxis der Medienbildung10.21240/mpaed/56/2024.03.15.X56(429-456)Online publication date: 15-Mar-2024

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media