Teaching Kids Programming with Khan Academy
Patrick Reagan, Former Development Director
Like many other programmers with children I'm interested in passing my skills on to them. If you've ever had the opportunity to work with me, this may or may not be a horrifying proposition — I'll let you be the judge.
My two oldest (9 and 7) are now at a good age to start learning the basics, so I've been spending every Wednesday morning before work teaching them with the help of Khan Academy. Since I'm new to this, there's definitely a lot of trial and error to figure out the intersection between their interests and capabilities. In the process I've discovered a few things that work and a few that don't. These lessons are specific to me, but you may find them helpful.
A False Start
My initial approach combined a general introduction to computing with basic programming concepts in Ruby. I spent a couple of Wednesday mornings talking to my son about the basics of computing answering his questions, researching answers with him, and working on basic programming concepts in IRB.
This was fun for the both of us and his questions were really awesome, but I found that it didn't hold his interest for long. While the programming exercises I came up with were basic, they weren't all that compelling for a child his age. The positive feedback was there — seeing
1 + 1 output
2 when typed in to an IRB prompt showed that something was happening, but it wasn't as exciting as I thought an introduction to programming should be.
Play on Their Interests
While my son may not have been excited about our forays into IRB, I knew there was one thing he was excited about. For the last 2 years, we've been teaching him math at home with the help of Khan Academy. He's enjoyed it for the most part, but it seems that every moment I left him unsupervised he would jump over to the programming section and explore the other students' creations. To be fair, there's some really impressive stuff there — he's particular to Minecraft while I've enjoyed playing Falling Pixel.
At first his lack of focus frustrated me, but rather than fighting to keep him focused on math I thought I could instead use his interest in games to my advantage. At the time Khan Academy introduced the programming curriculum I thought that he wasn't quite ready, but now I was motivated to give it a shot.
A few days before introducing the curriculum to him, I went through it myself. I watched the videos, worked through the sample exercises, and created some simple programs of my own. Between the quality of the walk-through videos and the immediate feedback of seeing my drawing appear right after I typed my code, I knew this approach would be a hit.
I quickly printed off a few grid worksheets and a cheat sheet to prepare for that Wednesday's class. The next morning, at breakfast, I presented the idea to him. I knew he would be excited, but I wasn't prepared for what came next — my daughter wanted to join in as well!
Now that I had two students in my class, I had to figure out a way to work with both of them at an appropriate pace. For our first lesson, I decided to have both kids share a laptop and watch the videos together. When it was time to do the first exercise, they took turns typing in
rect, the appropriate coordinates, and adjusting the values as necessary.
After this first class, I had a little bit of "homework" for them — I presented both with a few of the grid worksheets and a quick pixel drawing I did of some Space Invaders and asked them to come up with their own versions.
I demonstrated the basic technique, told them that we would spend the next class creating them on Khan Academy, and then set them loose on their own creations. To my surprise, my daughter made a rather detailed drawing of a red-haired girl that she planned to turn into a video game.
During the next class, we re-familiarized ourselves with the basic drawing functions and set out to recreate her sketch. Looking at the graph paper, I helped her come up with the coordinates, and she typed in the commands to make her drawing come to life.
Since my son had been learning how to add color to drawings, he jumped in later in the day to help improve what she and I had done earlier that morning.
The kids were really excited to see their drawings come to "life" — the feedback that they got from seeing their creations appear immediately after they typed in a valid function was a big motivator.
The Khan Academy program takes a progressive approach to teaching programming in a way that keeps my kids engaged. We will continue working through some basic drawing programs and then move on to variables and animation. As you can imagine, they are both excited about the idea of building a video game — I'm excited to see what they come up with.