The drag-and-drop programming environment Scratch can look like a child’s toy – it features little cartoon characters controlled by stacking blocks together. Yet it teaches many important programming concepts such as loops, conditionals, and variables (which we’ve written about before). We recommend that our younger students start with Scratch – they can continue with it to make more and more advanced projects rather than rushing on to a more traditional language like Java.
It can be difficult to communicate the amount of programming complexity that can be introduced in Scratch. There are several advantages to teaching the concepts in Scratch rather than a traditional programming language. First, they don’t have to worry about typing. If typing isn’t second nature, meaning you have to look at the keys, it distracts from the concept they are trying to learn. Then there are syntax requirements like semi-colons to worry about (explored here). A concept learned in Scratch transfers well to a more traditional language later. This is because Scratch still uses scripts that flow from top to bottom.
This is best illustrated with an example. Intermediate students might make a script like this one to make a spaceship move:
Not bad. It uses a repeat until so the loop knows when to stop. It changes the y-position only because gravity makes the spaceship fall straight down. But is this really how the spaceship would move? Does it look realistic?
Gravity should accelerate the spaceship so that it moves faster and faster as it drops. Here is an example of a script that does just that:
Instead of changing the y-position of the spaceship by a constant number, in this script the amount it is changing is changing! That’s exactly what acceleration is. Here is a video of this movement, does it look better?
From there it’s not difficult to add the spaceship’s thrust, which is really another acceleration like gravity:
Now you have fun controls you can turn into a game! This is just one example of how a programming mentor can take the student’s current understanding of a concept and help them take it even further. Please contact us to learn more about how a programming mentor can help!