an example of scratch coding
I was very lucky to attend a full day course looking at Scratch programming with Phil Bagge today (29 September 2014).
Slides from Phil’s session are available at http://code-it.co.uk/smc.pdf and all his planning resources are available on his website.
We started by understanding what computational thinking was and some useful definitions of the trickier terms in the new curriculum. Algorithms and abstraction (I loved the example that abstraction is precisely demonstrated by the London tube map), generalisation, decomposition and logical reasoning. Interestingly, our staff had missed out logical reasoning when dividing up the curriculum as they did not understand it all. We discussed this and they saw that actually this was about questioning the children, getting them to predict and evaluate what they do. Once we started talking about it, they realised that actually this was something they, as teachers, would do naturally through their questioning. This is exactly the definition that Phil gave us! It is a skill that needs to be a taught so that children can do it alone as they progress through the school.
A great article on computational thinking By David Barr, John Harrison, and Leslie Conery.
Some lovely posters to display in the ICT suite to illustrate those tricky computing terms.
One of the best things that Phil did was point out the common mistakes and misconceptions children have when he has taught these lessons. To me this was massively valuable, if you know what sorts of mistakes children are likely to make, it helps you deal with them when or before they arise. It also draws your attention to key teaching points. He was also fantastic at modelling exactly how to do things with the children, including silly voices, physical demonstrations and explaining why some of his modelling was so important. Proper meta-teaching!
For KS1 Phil recommends using the Scratch Junior app on iPads. It is free and does sequencing and repeat really well with very little written language and is highly visual.
For younger children, start with scratch 1.4 (drawing is easier for the younger children), then can graduate to scratch 2.0. Lego WeDo is a nice way to integrate physical control with scratch.
We were working with Scratch (we used version 1.4 but you could just as easily use scratch 2.0)
The Scratch projects we worked through from his computer science planning ideas.
1. Smoking car
Top tips for getting started:
- Always get into the habit of renaming the sprites – so car, not sprite1.
- Always model moving the blocks carefully to get them to snap together securely, making a big show of the white snap together line that appears under the blocks. It will pay off later when programmes are more complex and make children think more carefully.
- When selecting a key – make the class read it aloud together, so that chn understand the action. Point out very carefully that the ‘1’ key is on their keyboard! Make a big point of showing the snap together line. Encourage the children to think what they putting together.
- 10 steps = 10 pixels
- Always get children to test what they have done.
- Use extension tasks for those children who want to experiment and challenge themselves.
- Steering – use point blocks because they are always up, down, right left (see the drop down arrow to get degrees for angles for left, right etc).
- Use zoom feature on your data projector to show the elements to the children.
- Stage – allows you to programme the background. Makes sprite code disappear – it is not lost!
- Use whiteboards for children to think through their actions – planning a route for a child to draw out how the car can get along the road (arrows and write down the directions – worked much better!).
2. Music Machine
Super way to introduce loops and repeats – fits with music really well and children can see the point of introducing loops to repeat sections of their music. Put one repeat inside another and ask children to explain to a partner what they will hear before they test it. Can they predict what will happen?
- Add the random number chooser in to the select instrument and the sounds will change on each play.
- Import some loop sounds to show how they can be running underneath any other loops you are using.
- Programme a button that you have drawn to play notes for a set number of beats, including decimals. Great for demonstrating that two tenths are smaller than five tenths! It sounds shorter – relate to a decimal number line.
- Take actual music notation and provide a code so that children can convert notes to the numbers, show children that there is a difference between crochet and minims. Music notation is the algorithm that you can convert into a programme by decomposing the notation into pitch and timing and finding repeats.
3. Maths quiz
Uses sensing and selection. Make sure children understand the if/=/then/ else. Show some real life examples (if I get a cold then I will start sneezing).
Use variable to create the score. Then model how the score changes (how the variable changes) by having a child hold a pot and put pens inside to represent the score. At the end the child says what the final score is by looking in the pot and counting the pens.
4. Counting machine
A nice way to look using variables in a real life situation. Extensions – can you make it count faster? Count in 2s? Count backwards from 1000? Count in tenths?
Can you make it count to any number you input?
Make a thirty second count down timer to use in the classroom for our tidy up time! Can you make the timer count down from a time chosen by the teacher?
5. Working with variables (perimeter lesson)
Explain what variables are – moods are variable, the weather is variable (changes). Introduce the idea for what might vary in science (temperature).
Teach children that in a multiplication sum a different symbol is needed to replace the ‘x’ (*).
Create a menu that children can choose 1 for a triangle, 2 for a square using if/then and loops.
6. Games – Slug trail
Use the forever loop to keep the slug moving permanently. Make it move more slowly by decreasing the number of steps it travels within the loop. Again, it is a great idea to model this physically with the children by reading out the blocks and moving across the floor.
A handy hint, to get the slug back off the edge of the screen, right-click on the sprite on the bottom of the screen and use ‘show’.
Draw lines using pen down – point out to children that it is more efficient to put the pen down before the loop starts. Ask chn to draw a background with a path for the slug to move along, code the slug so that it if touches the background colour (goes off the path) it makes a horrid noise and says ‘uh oh!’.
Overall, it was a super day. lots of information and practical hands on activities packed in. Clear ideas on progression and really clear modelling of exactly how to teach programming to children.