Automatic detection of bad programming habits in scratch: A preliminary study

Using the Scratch environment as a tool to teach programming skills or develop computational thinking is increasingly common in all levels of education, well-documented case studies from primary school to university can be found. However, there are reports that indicate that students learning to program in this environment show certain habits that are contrary to the basic programming recommendations. In our work as instructors with high school students, we have detected these and other bad practices, such as the repetition of code and object naming, on a regular basis. This paper focuses on verifying whether these issues can generally be found in the Scratch community, by analyzing a large number of projects available on the Scratch community website. To test this hypothesis, we downloaded 100 projects and analyzed them with two plug-ins we developed to automatically detect these bad practices. The plug-ins extend the functionality of the Hairball tool, a static code analyzer for Scratch projects. The results obtained show that, in general, projects in the repository also incur in the investigated malpractices. Along with suggestions for future work, some ideas that might assist to address such situations are proposed in the conclusions of the paper.

[1]  Eric Rosenbaum,et al.  Scratch: programming for all , 2009, Commun. ACM.

[2]  Diana Franklin,et al.  Hairball: lint-inspired static analysis of scratch projects , 2013, SIGCSE '13.

[3]  John Maloney,et al.  The Scratch Programming Language and Environment , 2010, TOCE.

[4]  Deborah A. Fields,et al.  Entering the Clubhouse: Case Studies of Young Programmers Joining the Online Scratch Communities , 2010, J. Organ. End User Comput..

[5]  Jeannette M. Wing Computational thinking and thinking about computing , 2008, Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences.

[6]  Thomas Connolly,et al.  Evaluation of Computer Games Developed by Primary School Children to Gauge Understanding of Programming Concepts , 2012 .

[7]  Mordechai Ben-Ari,et al.  Habits of programming in scratch , 2011, ITiCSE '11.

[8]  Mitchel Resnick,et al.  Programming by choice: urban youth learning programming with scratch , 2008, SIGCSE '08.

[9]  John Maloney,et al.  Starting with scratch in CS 1 , 2009, SIGCSE '09.

[10]  Joel C. Adams Scratching middle schoolers' creative itch , 2010, SIGCSE.

[11]  Diana Franklin,et al.  Assessment of computer science learning in a scratch-based outreach program , 2013, SIGCSE '13.

[12]  Mordechai Ben-Ari,et al.  Learning computer science concepts with scratch , 2010, ICER '10.

[13]  Linda M. Seiter,et al.  Modeling the learning progressions of computational thinking of primary grade students , 2013, ICER.

[14]  Christopher Scaffidi,et al.  Skill Progression Demonstrated by Users in the Scratch Animation Environment , 2012, Int. J. Hum. Comput. Interact..

[15]  David J. Malan,et al.  Scratch for budding computer scientists , 2007, SIGCSE.