Slide background

Blog

How To Introduce Coding Into Your Classroom

Written by Anthony Berardi

Coding is a scary word for some people. It invokes visions of computer geeks hunched over dimly lit keyboards madly typing strings of characters into some type of funky code editor.  This Hollywoodesque version of coding makes most people want to run away from anything that has to do with coding.  I am here to help you find a place to start with coding in your classroom.  In this blog, we are going to specifically focus on starting with coding in a K-3 classroom.  

Where To Begin

I like to start by gathering students in a circle and ask them if they have ever coded before.  In most cases, they haven't, but some like to share quasi coding examples (especially in the younger grades). I then ask if anyone has ever baked something with their moms or dads?  Almost every student can relate to this example.  I follow up that question with how they got started when they were baking.  Most say they mixed some ingredients together. I ask them how they knew what ingredients and how much of each ingredient to mix together?  Eventually, we get down to the fact that they started with a recipe. 

I explain to them that a recipe is just a set of instructions to take some raw ingredients and by following the steps you create whatever the recipe's objective is (i.e. muffins, cookies, etc). A recipe is in fact just a set of instructions & coding is just a set of instructions to achieve an outcome. 

I then break out a game I bought on Amazon for about $30 CDN called "Robot Races".  This game includes a mat that has a grid pattern on it.  You have game cards that tell you where to put the "green start circle", the "red stop circle" and any obstacles that may be part of the game card.  I get a student volunteer to be the robot.  The robot stands on the green start circle and the rest of the class uses directional arrows to program/guide the robot to the red stop circle.  Once we have successfully guided the robot from start to finish we count the number of steps it took us to complete the objective.  We then analysis our steps to see if there is a way to reduce the number of steps it took to complete objective.  We remove extra steps and then I reconnect the game to coding by drawing the comparison of the steps to guide the robot to red finish circle are essentially the same as coding to achieve an objective. Coders write instructions to achieve whatever objective they have set.  Once a coder has completed an objective they will go back and look at ways to make their code more efficient.  

Start With Scratch Jr.

In primary grades, I like to start with Scratch Jr. It's a free app available for Apple, Android and ChromeOS.  Scratch Jr. is the primary version of Scratch. Both were developed by MIT to teach kids how to start coding by using blocks of code.  A block of code is like a macro or a function that makes it easier to code for kids.  Make sure you download and install Scratch Jr on all the devices you are going to use prior to introducing coding.  There is nothing worse than waiting for a program to download and install.  I also check installed versions of Scratch Jr. to make sure they still launch and don't need an update or re-install. 

When I introduce Scratch Jr to a primary class I always tell students that their teacher won't be the expert in the room.  They will become experts in the room.  I walk them through the basics of Scratch Jr and then ask them to create a story using the app. I tell them they can collaborate and help each other along the way.  If someone is really stuck I will help them or google an answer to their problem if I don't know the answer.

Scratch is pretty easy to figure out.  Basically there is a programming area, bits of block code (script) that you drop in the programming area, a character area (they are called sprites in Scratch and Scratch Jr), and a stage where all the coded actions happen. You have the ability to add characters and change background scenes.  Here is a PDF download from Scratch that you can use as a cheat sheet.

The Wrap Up

After students have had some time to code a story using Scratch Jr. I show examples of their work on to the rest of the class.  I usually end up using my Sphero Mini to show students that the same type of block coding can be used to program a robot.  The example I use is pretty simple. Spheros will measure the distance they travel.  We guesstimate the width of their classroom and then program the Sphero Mini by setting the speed and duration to have the robot travel the width of the classroom.  Through trial and error, we adjust those factors until we get the robot to travel the width of the classroom and its feedback gives us the width in centimetres. 

Have a suggestion for a topic you would like to see covered on LearnTechGuy.com? Visit our make a suggestion page and we will do our best to honour your request!

Disclaimer: All the opinions are my own and are not the views of any suppliers or manufacturers.