Software clones in scratch projects: on the presence of copy-and-paste in computational thinking learning

Computer programming is being introduced in schools worldwide as part of a movement that promotes Computational Thinking (CT) skills among young learners. In general, learners use visual, block-based programming languages to acquire these skills, with Scratch being one of the most popular ones. Similar to professional developers, learners also copy and paste their code, resulting in duplication. In this paper we present the findings of correlating the assessment of the CT skills of learners with the presence of software clones in over 230,000 projects obtained from the Scratch platform. Specifically, we investigate i) if software cloning is an extended practice in Scratch projects, ii) if the presence of code cloning is independent of the programming mastery of learners, iii) if code cloning can be found more frequently in Scratch projects that require specific skills (as parallelism or logical thinking), and iv) if learners who have the skills to avoid software cloning really do so. The results show that i) software cloning can be commonly found in Scratch projects, that ii) it becomes more frequent as learners work on projects that require advanced skills, that iii) no CT dimension is to be found more related to the absence of software clones than others, and iv) that learners -even if they potentially know how to avoid cloning- still copy and paste frequently. The insights from this paper could be used by educators and learners to determine when it is pedagogically more effective to address software cloning, by educational programming platform developers to adapt their systems, and by learning assessment tools to provide better evaluations.

[1]  Randy Pausch,et al.  Alice: a 3-D tool for introductory programming concepts , 2000 .

[2]  Seymour Papert,et al.  Mindstorms: Children, Computers, and Powerful Ideas , 1981 .

[3]  Sayamindu Dasgupta,et al.  Remixing as a Pathway to Computational Thinking , 2016, CSCW.

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

[5]  Majed Marji Learn to Program with Scratch: A Visual Introduction to Programming with Games, Art, Science, and Math , 2014 .

[6]  Felienne Hermans,et al.  How Kids Code and How We Know: An Exploratory Study on the Scratch Repository , 2016, ICER.

[7]  Aditya Johri,et al.  Uncovering Trajectories of Informal Learning in Large Online Communities of Creators , 2015, L@S.

[8]  Chanchal Kumar Roy,et al.  Comparison and evaluation of code clone detection techniques and tools: A qualitative approach , 2009, Sci. Comput. Program..

[9]  Giuliano Antoniol,et al.  Comparison and Evaluation of Clone Detection Tools , 2007, IEEE Transactions on Software Engineering.

[10]  Michael W. Godfrey,et al.  “Cloning considered harmful” considered harmful: patterns of cloning in software , 2008, Empirical Software Engineering.

[11]  Gregorio Robles,et al.  Dr. Scratch: a Web Tool to Automatically Evaluate Scratch Projects , 2015, WiPSCE.

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

[13]  Felienne Hermans,et al.  Do code smells hamper novice programming? A controlled experiment on Scratch programs , 2016, 2016 IEEE 24th International Conference on Program Comprehension (ICPC).

[14]  Yasmin B. Kafai,et al.  Programming in the wild: trends in youth computational participation in the online scratch community , 2014, WiPSCE.

[15]  Gregorio Robles,et al.  Dr. Scratch: Automatic Analysis of Scratch Projects to Assess and Foster Computational Thinking , 2015 .

[16]  Jeannette M. Wing An introduction to computer science for non-majors using principles of computation , 2007, SIGCSE.

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

[18]  Matt MacLaurin,et al.  Kodu: end-user programming and design for games , 2009, FDG.

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

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