Re-Use of Programming Patterns or Problem Solving?
Representation of Scratch Programs by TGraphs to support Static Code Analysis
Mike Talbot, Katharina Geldreich, Julia Sommer, Peter Hubwieser
Erstpublikation in: ACM ISBN 978-1-4503-8759-0/20/10. . . $15.00
Diese Seite wurde seit mehr als 7 Monaten inhaltlich nicht mehr aktualisiert. Unter Umständen ist sie nicht mehr aktuell.
Novice programmers seem to learn basic programming skills amazingly fast by using visual programming environments like Scratch or Snap. Yet at a second glance, in many cases, the students’ programming projects make use of pre-learned solution patterns like collision detection. Aiming to investigate how far such pre-learned patterns are used and adapted, we have to analyze the program structure of a substantially large number of Scratch projects, e.g. from the Scratch repository, in a very detailed way. To automate the static code analysis of these projects, we developed a scheme to transform Scratch projects into a common graph format (TGraph), which was used up to now to analyze programs in Java and Haskell as well as UML diagrams and mathematical solutions. In a second step, this representation enabled us to apply a SQL-like query language for graphs (GReQL) to detect programming patterns in students’ Scratch projects. This paper describes the design of our TGraph scheme for Scratch as well as how to query patterns in Scratch code using GReQL, in order to stimulate the use of this methodology by other researchers. As a feasibility study, we report its application on the outcomes of one of our Scratch courses attended by 143 children aged 8-12 years. The study showed that with the presented methodology any code structure can be detected in Scratch projects. To check the validity of the methodology, the programs were additionally checked manually for the occurrence of two patterns - the results were consistent.Von Mike Talbot, Katharina Geldreich, Julia Sommer, Peter Hubwieser im Text Re-Use of Programming Patterns or Problem Solving? (2020)
In this paper, we presented a feasibility study for a methodology to investigate the use of certain solution patterns in a large number of Scratch projects. The first results demonstrate that we were able to detect patterns like collision, directed motion, termination by collision or gliding motion, see Table 1. In addition, we could find out how far advanced programming concepts like nested conditions or nested repetition were used, see Table 2. As part of our feasibility study, we also compared the results of our methodology with those of a manual analysis of the Scratch projects. Since the results were completely consistent, they show the validity of the method. Our method – conducting GReQL queries on TGraph representations of Scratch programs – offers versatile search options for code structures. Not only one-to-one representations but also adapted or extended patterns can be found by a wildcard search. It must be noted though that GReQL is a very powerful SQL-like query language that requires training and can be quite tricky in detail. Compared to other tools that offer static code analysis of Scratch code, the advantage is that any kind of code structure can be queried without having to modify an existing program, as for example in the plugin system of Hairball . Even though our number of projects (n=295) could have been analyzed manually with great effort, the method opens up the possibility to examine larger quantities of projects, such as the Scratch repository or results of MOOCs. In summary, the presented method for querying Scratch block structures on TGraphs offers broad support in the search for any solution patterns. Therefore, it can help to answer the question of how students implement and adapt pre-learned solution patterns. However, further analysis of the existing data is needed, using a mixed-method approach where parts of the projects are qualitatively analyzed manually.Von Mike Talbot, Katharina Geldreich, Julia Sommer, Peter Hubwieser im Konferenz-Band WiPSCE 2020 im Text Re-Use of Programming Patterns or Problem Solving? (2020)
Dieses Kapitel erwähnt ...
KB IB clear
|Tim Bell, Karen Brennan, Caitlin Duncan, Evelyn Eastmond, Brendan Foreman, Yasmin B. Kafai, Maria Kallia, John Maloney, Amon Millner, Andrés Monroy-Hernández, Mitchel Resnick, Eric Rosenbaum, Natalie Rusk, Linda Sandvik, Linda M. Seiter, Cynthia C. Selby, Sue Sentance, Jay Silver, Brian Silverman, Neil Smith, Clare Sutcliffe, David Weintrop, Uri Wilensky, Jeannette M. Wing|
KB IB clear
|Blockbasierte Sprachen verhindern Syntaxfehler|
KB IB clear
|blockbasierte Programmierumgebungenvisual programming language, Kinderchildren, Problemlösefähigkeitproblem solving skills, Programmierenprogramming, Programmiersprachenprogramming languages, Scratch, Snap! (Programmiersprache)|