Bugs in Scratch programs can spoil the fun and inhibit learning success. Many common bugs are the result of recurring patterns of bad code. In this paper we present a collection of common code patterns that typically hint at bugs in Scratch programs, and the LitterBox tool which can automatically detect them. We empirically evaluate how frequently these patterns occur, and how severe their consequences usually are. While fixing bugs inevitably is part of learning, the possibility to identify the bugs automatically provides the potential to support learners. CCS CONCEPTS• Social and professional topics → Software engineering education; K-12 education; • Software and its engineering → Visual languages.
Creating programs with block-based programming languages like Sc r a t c h is easy and fun. Block-based programs can nevertheless contain bugs, in particular when learners have misconceptions about programming. Even when they do not, Sc r a t c h code is often of low quality and contains code smells, further inhibiting understanding, reuse, and fun. To address this problem, in this paper we introduce Lit t e r Bo x , a linter for Sc r a t c h programs. Given a program or its public project ID, Lit t e r Bo x checks the program against patterns of known bugs and code smells. For each issue identified, Lit t e r Bo x provides not only the location in the code, but also a helpful explanation of the underlying reason and possible misconceptions. Learners can access Lit t e r Bo x through an easy to use web interface with visual information about the errors in the block-code, while for researchers Lit t e r Bo x provides a general, open source, and extensible framework for static analysis of Sc r a t c h programs.
Creating programs with block-based programming languages like SCRATCH is easy and fun. Block-based programs can nevertheless contain bugs, in particular when learners have misconceptions about programming. Even when they do not, SCRATCH code is often of low quality and contains code smells, further inhibiting understanding, reuse, and fun. To address this problem, in this paper we introduce LITTERBOX, a linter for SCRATCH programs. Given a program or its public project ID, LITTERBOX checks the program against patterns of known bugs and code smells. For each issue identified, LITTERBOX provides not only the location in the code, but also a helpful explanation of the underlying reason and possible misconceptions. Learners can access LITTERBOX through an easy to use web interface with visual information about the errors in the block-code, while for researchers LITTERBOX provides a general, open source, and extensible framework for static analysis of SCRATCH programs.
Bugs in learners' programs are often the result of fundamental misconceptions. Teachers frequently face the challenge of first having to understand such bugs, and then suggest ways to fix them. In order to enable teachers to do so effectively and efficiently, it is desirable to support them in recognising and fixing bugs. Misconceptions often lead to recurring patterns of similar bugs, enabling automated tools to provide this support in terms of hints on occurrences of common bug patterns. In this paper, we investigate to what extent the hints improve the effectiveness and efficiency of teachers in debugging learners' programs using a cohort of 163 primary school teachers in training, tasked to correct buggy Scratch programs, with and without hints on bug patterns. Our experiment suggests that automatically generated hints can reduce the effort of finding and fixing bugs from 8.66 to 5.24 minutes, while increasing the effectiveness by 34% more correct solutions. While this improvement is convincing, arguably teachers in training might first need to learn debugging "the hard way" to not miss the opportunity to learn by relying on tools. We therefore investigate whether the use of hints during training affects their ability to recognise and fix bugs without hints. Our experiment provides no significant evidence that either learning to debug with hints or learning to debug "the hard way" leads to better learning effects. Overall, this suggests that bug patterns might be a useful concept to include in the curriculum for teachers in training, while tool-support to recognise these patterns is desirable for teachers in practice.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.