How To Teach Programming To Kids

Geek!This is R. L. Shanker’s submission for the HP Magic Giveaway. Feel free to leave comments for this article as you see fit – your feedback is certainly welcomed! If you’d like to submit your own how-to, what-is, or top-five list, you can send it to me. Views and opinions of this writer are not necessarily my own:

You probably know a kid who is bitten by the computer bug – could be your son or your nephew or your friend’s kid. Since you are the resident uber-geek, you have been given the responsibility of initiating him into the wonderful world of computers. One fine day, you gather the kid, roll up your sleeves and sit down in front of the computer. And then it hits you: What do you teach him – Java? C++? VB.NET? The guy has a concentration span of exactly ninety-six seconds. You start scratching your head. If this sounds familiar, this tutorial is for you.

In this how-to, I review two tools that have been tested successfully in homes/schools across the world. Like any other discussion on “which software to use”, there are unlimited options and fanatic supporters for each one of them. So, kindly use this tutorial as a starting point and do your own research; there are a lot of pointers that I have included for your reference. Before getting down to details, let me clarify one thing: while none of us would want to force programming as a career choice on our kids, all of us would agree on the importance of making kids comfortable with what is unarguably the most powerful tool at our disposal. There, done. Now, let us move on to the details.

Age 6-9 years

Scratch: A product of the Lifelong Kindergarten Group at MIT, Scratch provides kids with an exciting environment to create and share computer applications. Applications in Scratch are built around what are referred to as Sprites; these could be animals, objects, people etc. Using simple drag-and-drop programming, students can control their actions and interactions. In the process, they are subtly exposed to basic programming concepts such as conditional statements, iteration, variables, and event triggers. It is easy to be misled by the overt simplicity of the application; however, the scope of Scratch is not restricted to just creating dummy games. One look at the online Scratch gallery is sufficient to dispel all such notions. I even came across an application that illustrates wave harmonics in the most intuitive way.

This brings me to the other great feature about Scratch – it has a terrific online presence. Currently, more than 200,000 applications are shared online. Your kid can get immediate feedback from his peers and they can even work on a collaborative project. Scratch’s online presence, combined with its highly accessible interface, puts it way ahead of its competitors such as Logo, Squeak, Alice , Toontalk, and Gamemaker.

Age: 10-14 years

Phrogram. The most frustrating aspect about dealing with kids is the pace at which they outgrow their interests. As a mentor, it is imperative that you find ways of keeping their passion alive. Enter KPL, Kids Programming Language. KPL was launched in 2005 as a freeware programming language and has since been replaced by its commercial successor, Phrogram. While the focus of Scratch is on designing applications, the focus of Phrogram is on programming applications – a logical next-step. Phrogram supports object-oriented programming and provides an excellent stepping stone for “serious programming”. In order to make the task more appealing, Phrogram provides a range of in-built libraries. You can find details about a course offered in Ohio State University that uses Phrogram exclusively here. Wait, it keeps getting better – you can even write XBOX applications on Phrogram. Talk about getting a kid excited – his own application on XBOX!

The only downside is that Phrogram is not a freeware. However, the basic version is pretty cheap; it is actually cheaper than most popular video games. If cost is still a concern, you can check out Greenfoot. Greenfoot is based on Java and is equally accessible to kids in this age-group. Here, a parent provides a lively account of a game-building exercise he did with his 9-year old daughter using Greenfoot.

Age: 15+ years

The kid is now ready for the big league; it is time to respect his intellect and let him take the deep plunge. We are talking Python, C, C++, Java, etc. Since the questions are going to come thick and fast, I would recommend that you pick a language that you are comfortable with. For instance, I have been working with C++ for a very long time and it would be my natural choice.

Final thoughts

Engage, engage and engage.

The actual choice of software or platform is a subjective one – it depends on the student and the tutor. Whichever software you choose, for the endeavour to be successful, the kid must be actively engaged. What excites you as an adult doesn’t have to (and in all likelihood, will not) excite the young mind. Put yourself in his shoes. Fit in.

Be the inspiration.

The final onus is on you to convince the kid that there is no end to this wonderful experience. You need to tease him, tantalize him, and then cut him loose. Let him experiment. Support him if he fails. Challenge him if he succeeds.

15 thoughts on “How To Teach Programming To Kids”

  1. They dont do BASIC anymore? I remember learning it in my high school. “10 PRINT hello world” – awesome!

  2. when you said you had submitted an entry on programming for kids, i was immensely worried …. i was expecting you to go on and on about how c++ can and should be taught for toddlers :-) but frankly, i can understand teaching C for a 15 yr old, it being procedural and all. but c++? can a 15yr old really understand oops?

  3. Alice is great if your kid doesn’t get put off by all that 3D; the idea of storytelling is sheer magic though. Incidentally, Randy Pausch, who became very famous for his Last Lecture, was the director of CMU’s Alice research group.

  4. Why not HTML? Couple of tags and you already have a web-page! The kids are anyway all over the net these days. Might as well leverage that. If you want to get serious, you can migrate to Javascript.

  5. logo, logo and logo – dats all that i have used. making those turtles move is instant gratification – gr8 wow factor for the kid. you saying scratch is better?

  6. Shan, you should mention that Phrogram uses .NET framework. There are many who would give it a miss because of the Microsoft association. Even the earlier free KPL was based on .NET. I guess there is some MS funding thats happening!

  7. I disagree; python can be used even for younger kids. The trick is to creatively employ a good library such as PyGame; your son wont feel cheated about being introduced to something limited.

  8. Hmmm…. scratch seems interesting. but the online stuff is actually getting me worried. i give my kid just thirty minutes of internet time a day. if he gets all excited, then i might have a probelm in my hand :-)

  9. My teacher has used Greenfoot in his Intro to Programming classes. I’m personally not a fan of that kind of thing and it looks like the class reacted to it well. It has a much smaller learning curve that Robocode.

    I started learning real programming languages in 7th grade, but I started learning HTML in 6th grade and went on from there. Basic html/css provides a foundation.

  10. I’m glad Rachel commented. I’ve just been asked by my 8 yr old if I could teach her how to make a web page/site. I’m torn between using iWeb so she can lay it out or teaching her the code so that she knows what’s going on. The “knowledge is power” dad says try to teach her the code. The “just let her create” dad says iWeb. I’ve been looking all over for other intro to HTML sites, some are ok, some are horrible.

    Only other comment – maybe edit this post to make it more gender-neutral. I have to admit to bristling a little when seeing all the male references in the text.

  11. Great post–I’ve got to look around your site.

    I started my 8 year old daughter and 10 year old son (equal opportunity Sam!) with Stagecast Creator a year ago. I can’t recommend that enough, covers a lot of basics of object oriented programming and has an awesome tutorial that an 8 year old can follow with or without the parent around. About $50.

    That said, my son is ready to move on, hence I found this post. I didn’t like Scratch, I found it to be the same level as Stagecast and wasn’t adding anything. Considering Phrogram, Logo or Python, but he’s interested in putting his games on his Web site (which we can with Stagecast), so I have to see what works here.

    And I didn’t want to go into HTML and CSS with the kids just yet since they want to work on other programming languages, so I got them domain names (my son is and just installed WordPress and taught them to use that. They can easily create posts and I can introduce the to HTML as they want to do fancier stuff.

  12. actually im 17 and i dont know anything about programming and i want ask that . where can i learn about programming and be a hacker???? i really interested about it i hope somone can send me email and help mee : )

Leave a Reply

Your email address will not be published. Required fields are marked *