Teaching Algorithms to First Graders

Earlier in the school year, my son's Grade 1 class requested that parents handle teaching duties one day, while the teachers were out for professional development. I volunteered and decided to teach something about what I know...

"Kids, keep in mind, Drupal 8 modules have replaced the .info file with the .info.yml file."

...hmmm, on second thought, maybe I'll leave Drupal for my next lesson.

I thought I'd talk about online safety - we teach our children to look both ways before crossing the street, so should we teach them safe online habits. As a parent of primary school kids, limiting and protecting their online exposure is a real issue. I can't keep track of everything they touch online and depending solely on built-in parental controls is a bit like equipping your child with elbow pads to jump her bike over the Grand Canyon. I began planning my "online safety" lesson but quickly scrapped it. I concluded that standing at the front of the class talking about the do's and don'ts of web surfing will capture the class's attention for no more than the eight seconds it takes to introduce myself. I needed something interactive.

To Computer or not to Computer

My son's class has about twenty kids and two computers, so I couldn't plan my lesson around actual screen time. Instead, I thought that teaching some simple programming concepts would be useful and I had the good fortune of coming across code.org; a site with a treasure trove of age-specific lessons, many that do not require computers. Specifically, there's a lesson for teaching algorithms with the help of paper airplanes! You mean I can "teach" and the kids get to build paper airplanes? Done deal.

Cleared for Take-off

The lesson began and after introducing myself to the class, I introduced the word "algorithm" and explained it as:

A list of steps that you can follow to finish a task.

Following the code.org lesson plan, I pointed out that we use algorithms every day without knowing it: brushing our teeth, putting on our clothes etc. Then I veered from the lesson plan and revealed this little secret:

"Computers are actually really stupid."

There were looks of disbelief and some laughter, so I explained that we use algorithms to tell computers what to do, and without those instructions, the computers themselves are useless. With the kids sufficiently bemused and confused, we moved on to our warm-up game.

To warm up, I took inspiration from the beginner levels of Swift Playgrounds, where the user can choose from a limited set of instructions to complete each task. I did a real-life version, wherein I took on the role of a robot that needed to cross the classroom and grab a stapler. To control my movements, the kids had these instructions to choose from:

  • Move Forward
  • Turn Left
  • Bend Down
  • Reach
  • Grab

One-by-one, each child gave an instruction to get me to where I needed to go. At first some didn't understand what was going on and others whispered to them what I should do next. The most complicated thing was getting me to turn right, when the instructions only allowed for turning left. It took a few tries for them to figure out that I would have to turn left three times to simulate a turn to the right! Naturally, after figuring out how it all works, some rascals intentionally sabotaged the instruction set and wanted to walk me into a wall. I figured that was useful too, demonstrating that bad instructions lead to bad results.

Come Fly with Me

With the introduction and warm-up out of the way, it was time to build paper airplanes!

I handed out worksheets with pictorial representations of the steps to build the paper airplane.

Instructions to create a paper airplane

You see that it's actually a bit tricky - some of the choices are bogus and to be avoided. (Ex. "Cut center out of paper") So the kids had to figure out which steps were needed to make a paper airplane, cut them out from the worksheet and then paste them in the correct order, on a sheet of blank paper. (The lesson incorporated arts & crafts too!)

Once a child had finished pasting the steps in order, she had to give her sheet to another child, who would then have to follow those instructions to build the actual paper airplane. Naturally, if the steps were pasted in the wrong order, then the algorithm was off and the paper airplane wouldn't fly. Cue the rascals that purposefully messed up the steps and left some of their classmates building paper garbage.

By the end of the class, both paper airplanes and balls of crumpled paper were being thrown throughout the classroom. There were more smiles than tears, so I consider that a smashing success.

Lessons Learned

If the kids clamor for my return, I'll make sure to get each child to sign his instruction sheet and offer modest prizes to all instructions resulting in a successfully built airplane. That way, everyone has skin in the game and the rascals won't be so cavalier about sabotaging the outcome for others. Though it was lots of fun for the kids, I’m not sure how much the paper airplane algorithm lesson really sank in for them because the focus became the throwing of airplanes across the classroom rather than the process of making them. However, to my great surprise and pleasure, the “move Forward”, “turn Left” robot exercise seemed to stick; I later learned from one mother that her daughter had started giving her "move forward", "turn left" instructions at home!