How to run a code club – without computers!
By: Martin Gale and Sam Garforth, Salesforce
OK so here’s the challenge. Over twenty enthusiastic eight to ten year olds who love to learn and make things, two equally enthusiastic local Salesforce guys who are passionate about code and love to teach, yet only two laptops between them all.
What to do?
Winchester Young Carers (WYC) are a UK-based charity that supports the emotional and physical development of children with caring responsibilities. WYC provide weekly clubs where children meet up and take part in group learning and activities. These are fun events that provide a safe environment for the children to relax, have fun and meet their friends. They hadn’t had a club on learning code before, and so as part of our volunteer time we took up the challenge to put together a session that would be fun and inspire the children to look at coding more closely. The responsibility borne by the children at such a young age means that this time is precious, so we both felt honoured to have this opportunity.
The WYC clubs take place at an activity centre that doesn’t have IT facilities but does have a great sports hall and enclosed garden so the good news was that space to work in would be in plentiful supply. The weather was beautiful on the day, so we chose to run the majority of the session outside in the warmth of the sunshine.
Here’s what we did.
The importance of circle time
Club evenings normally begin with “circle time” where all the children get together in a group, and discuss the focus of that evening’s club. For our session, we used this first ten minutes or so to find out how much they knew about the world of code, and generally get them talking about the topic. To spark discussion, we sat round in a circle and asked them some open questions, such as:
- What’s the most useful thing you do with a computer?
- Can anyone describe what code is?
- Why is knowing how to code useful?
The children were very eager to tell us what they knew and encouragingly a number of the group had experimented with some kind of code before at their schools. So far so good.
Programming with people!
Ordinarily code clubs work on the basis that each child has a PC (or a small number share) and complete hands-on activities. We didn’t have that luxury so what we decided to do was get the children to take part in a physical activity to illustrate coding concepts, followed by a short demonstration from us of those concepts made real in code. This would allow the majority of the session to be interactive with us only in presenter-mode in small groups at the end.
To provide focus, we had prepared the session by creating a simple game in Scratch that was a race between two characters to a finish line with each sprite controlled by a player using the keyboard. This would be simple enough for the children to understand and even extend afterwards, yet contain some core programming elements, such as sprites, events and user input.
So, for the next fifteen minutes or so of the session we would have the children play the game in real life, with the sprites being the children themselves “programmed” in the same way we had programmed Scratch!
We split the group into fives:
- Two children lined up on a start line playing the role of the contestant sprites.
- A child standing with arms outstretched playing the role of the finish line sprite a few metres away.
- Two players each controlling a contestant.
With everyone in position, we then “programmed” each of the contestants, testing out our “code” at each step for some fun. First of all, we instructed each contestant to respond to their player saying different letters to represent a step forward and a step backward. We made these letters the same letters as we had used in our Scratch game – e.g. “P” and “O”, “Q” and “W”. For fun, we tested out our first lines of “code” by moving our contestants around, and giving ourselves a round of applause for writing something that worked!
Next, we programmed each contestant to shout “Yay I won!” when they touched the finish line, or “Boooo!” if the other contestant got there first, just as we had done in Scratch. Throughout this process, we asked the children questions about what we were doing to reinforce their understanding of what we were doing. For example, we asked what “code” would be needed for a contestant to win having programmed the forward/backwards movement.
With all our code in place, we were ready for a full game. On the count of three, each of the groups played their game, which got pretty competitive! We had a couple of runs of the game, with the children swapping roles so each could play a different role. At children’s request, we even added some more “code” to make the race finish after the contestants had returned to the finish line.
We then asked a few more questions to help reinforce the concepts, such as:
- What advantages does a computer give us for making games?
- How do you think playing the same game on a computer would differ?
- What was difficult about being a computer?
Applying it back to real code
Having had some fun and got everyone participating, we then took each group of five through the Scratch game on our laptops, stepping through the structure of the sprites and the code scripts. We were able to show, for example, how listening to the voice of their player mapped onto a keystroke, and how the event of one sprite winning triggered the response of the other sprite losing. Some had used Scratch before and some hadn’t so we took a minute or two to introduce it, and its possibilities. We finished by showing them a much more advanced game by exploring other Scratch projects to show how even very complex gameplay was all built up from the same simple building blocks. This section of the session took only five minutes so we didn’t keep the children sitting around too long.
Don’t let lack of IT be a barrier
The challenge with trying to teach something like code is that at some level, a computer is always required and many charities simply don’t have the luxury of such facilities. Hopefully what we did here has shown that this needn’t be a barrier though to at least getting started, and having good fun into the bargain.
You Might Also Like
As another Pro Bono Week winds down, take a moment to learn about the incredible work of our volunteers.
Read about four ways pro bono volunteering impacts volunteers, companies, nonprofits, and educational institutions alike.
Sarah Balcazar from Reading Partners offers six impactful ways to celebrate International Literacy Day by helping kids learn to read.