Experimenting with projects
Objective: enable students to better understand the role of programming constructs.
Students are asked to work with a completed project and experiment with specific blocks (programming constructs) from the code of the program. This experimentation could include changing the position of the blocks, or changing the value of some variables; it enables students to gain a better understanding of the roles of specific constructs. (Kordaki, 2012). This exercise allows for the scaffolding of basic computer programming constructs. It is a good way to start the learning of programming constructs, as the exercise does not require students to build programs or algorithms.
For example:
Dodge ball game:
In the above code example students can experiment with the code as follows:
- Enter different random angles to which the ball can turn. This helps students understand the concepts of direction and randomness.
- Change the number of steps the ball moves. This helps students better understand speed and movement.
- Remove the “if on edge, bounce” block and observe the changes.
- Replace the “Forever” control construct with a “Repeat” construct. Helps students to understand the differences between the constructs “Repeat” and “Forever”.
Modifying projects
Objective: enable students to expand on, or use previously acquired programming knowledge to modify projects.
The idea is to have students use previously acquired knowledge to modify Scratch projects by producing a different result or output. The benefit of this activity is that students can be
“sheltered by the context of the already working project in order to appropriately face the challenges of its modification” (Kordaki M.,2012, p.4).
For example:
Dodge ball game:
In the above example students can modify the dodge ball game so that the game ends when the cat touches the ball as opposed to the ball touching the cat.
The above code modification enables students to:
- Build on, or apply their knowledge of sensing.
- Acquire a better understanding of the importance of coding for specific objects; that is students must move the game over script from the cat to the ball in order to make the modification work.
- Help students understand the concept of duplicate code; that is reducing code repetition. Students will realize that putting the game over script on the cat object as opposed to the ball will result in code repetition whenever a new ball is introduced.
References
Kordaki M.,(2012). Diverse categories of programming learning activities could be performed within Scratch. Procedia -Social and Behavioral Sciences 46, 1162-66.