Friday, February 20, 2015

Coding for kids

I've been trying to get my kids interested in coding. I found this nice game called Lightbot, in which one writes simple programs that control the discrete movements of a bot. It's very intuitive and in just one morning my kids learned quite a bit about the idea of an algorithm and the notion of a subroutine or loop. Some of the problems (e.g., involving nested loops) are challenging.

Browser (Flash?) version.

There are Android and iOS versions as well.

Other coding for kids recommendations?


SethTS said...

Hi Steve,

My son might not be typical this way, but I got him started programming with a simple 8086 emulator package. He was intrigued by how the individual instructions would update registers, etc. He got into it to the point that he used a template from the package to build a boot sector that allowed him to write his own 'operating system' -- a few silly DOS-like commands picked from a menu. I was less successful getting him to graduate from that to Linux kernel source code -- maybe in college he'll do that ;) He has since taken up C++, Perl, Objective-C/iOS, and Java, but working with that core understanding of microprocessor architecture has been quite valuable to him. He later worked a summer job teaching middle-schoolers to code in C, and found that easy and fun based on his self-taught programming skills.

There are a lot of visually oriented 'drive stuff on the screen' type learner languages, but I've always found those mildly annoying. They feel more like packages for helping non-programmers gain a little intuition for something they will never do a lot of. Going directly to the real content of computing will more genuinely engage those with actual talent for the subject matter. YMMV of course!

Here's the package we used:

Have fun!

steve hsu said...

Thanks! Great recommendation. Right now my kids are enjoying driving bots around the screen :-)

jrackell said...

Raghuveer Parthasarathy said...

Hi Steve,
Thanks for the tip about lightbot -- both my kids are fascinated by it! Other ideas: K. used to write things in Scratch ( when he was ~8. It's very good -- a graphical language, in which one can program if/then statements, loops, etc., and make sounds, drawings, and motion. He liked it, but not enough to spend lots of time on it. I'm not sure why -- maybe because doing things with a purely graphical language is tedious, maybe because it looks garish, or maybe because (unlike lightbot) there aren't puzzles or challenges built into it.

Occasionally I sketch out how to write some simple program in Matlab (like some sum of an arithmetic or geometric series, or something involving sounds), and he finishes or modifies it and learns how it works. He loves this, and I've long thought that I should do this more consistently or systematically. If I did, I'd probably use Python, and check out this book, which seems very good: ("Hello World," )

steve hsu said...

Somehow the cuteness of the lightbot attracts my kids. The puzzles and solutions have a certain elegance. They can be challenging, esp. with memory/command limits.

The book you recommended looks good!

John Furcean said...

Growing up I messed around with trying to learn to program several different times. I tried learning BASIC from a book that my mom had. What really got me interested was Lego Mindsotrms ( It uses command box program similar to Scratch instead of writing code, but it helps you understand the basic concepts.

Paul Rubin said...

This is vicarious (I don't have kids) (that I know of), but a blogger over in the UK whose judgement I trust has taught some coding to 8- and 9-year old kids using Scratch, and he seems to be less than totally enamored of it:

Also, FWIW, he's a volunteer with the UK's "Code Club", which has branched out worldwide ( You might find some useful projects or suggestions there.

Nicolas said...

Scratch for fun, lua to have stack, or elm in the browser ?

Most important is to teach the concepts, which are only to be found in functional programming. That is, expression as values, denotation and referential transparency..

Imperative programming is a total waste of time as a educational tool

Blog Archive