Don Box: Teaching my kids to program

I think Box should get some input from the LtU community...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


I think the advice he got re: DrScheme was pretty sound. Squeak could be a fun choice also. I personally would probably go with Python, just because of the comfort factor (for me, that is). But both my two are still way too young anyway.

Ruby should learn to program in Ruby, I guess...

The way I learned (BASIC on a Sharp MZ80K, Sinclair ZX Spectrum, BBC Micro and Acorn Archimedes in that order, mixed with 6502 and ARM assembler on the Acorn machines) was not a good way.

For literate, imaginative children, I think Inform has potential. Play the games, then think about how to implement them. I learned OOP from Inform initially.

What age is too young?

Dijkstra would have considered me warped too, I learned BASIC on TRS-80 CoCo II. In response to the age question, what age is too young? I myself learned when I was 8 and have programmed pretty continously ever since(not meant as a brag, I did nothing useful with it until I was around 16, nothing worth talking about until I was 18-19).

I will second the notion that games seem to be the universal drawing factor for kids, although, I got a huge kick of interest from demos as well(watching Second Reality for the first time back in 1995 still rates as one of my all-time life-changing experiences with a computer, when I realized something like that was possible on a computer there was no turning back). In case anyone else is a closet demo junkie, the Demo DVD is a worthwhile investment if you can no longer run some oldies-but-goodies. Now that I'm totally offtopic, I suppose I should really stop talking now :).

What about robots?

Lego mindstorms are 680x inside, iirc. There are lisps or schemes for it. The first one I found was XS Lisp (a project presented at ILC) Dubé has implemented a r4rs (?) for PIC, a much less pwoerful platform, so I have no doubt that at least an R$RS implementation is possible for RCX. Interacting with the real world is even cooler than making games, and, while kids tend to get bored of text-based games after a while, the IO capabilities of a robot will always beat that of a screen and keyboard/mouse :)

Transterpreter for Mindstorms

You might also want to look at the Transterpreter, a transputer virtual machine for Mindstorms. Writing occam programs is simple, and the concurrency model is powerful and intuitive.

fixed transterpreter url seems to be the correct url. This is quite nifty, thanks for the pointer.

--Shae Erisson -


Thanks for catching that! It's amazing how one little misplaced quote can completely screw you up :(

About 9 (I hope)

I'm about to start teaching Scratch from MIT at my local school and I've offered the course to kids 9 and up.

I've put down the notes for my first few modules on if anyone has any comments or ideas!

DrScheme + HtDP

I concur with DrScheme, and would strongly recommend the How to Design Programs book ( as the supporting material

Why must games be the draw?

In my case it was initially just to have a tool to do numerical computation (at the tender age of 15) though it has quickly shifted to the really fascinating problems in the general area of programming langauges in the almost two years since then. (Initially attributable to a deep disatisfaction with vast bulk of mainstream programming languages such as C/C++, Perl, and eventually even Python)

Granted, I'm not exactly representative of the bulk of high schoolers, but that doesn't mean its appropriate to pidgeon hole what sort of motivations for teaching programming to teenagers and younger children are suitable. I would think that anyone who was interested programming and capable of the intellectual task teaching themselves once they have been introduced to the rudiments would be more mature than the simplistic motivation of making games, especially now that the task of making a truly modern game is such a monumental endevour.


Given the stated aims To that end, I want my kids to have sound intuition on things like logic, predicates, sets, and functions, including how they manifest in computers, Prolog seems an obvious choice. To enumerate pros and cons:

  1. + Close, well-motivated, relationship to logical fundamentals;
  2. + The PL that most feels like, when things go well, molding plasticene;
  3. + Really, really, lovely metaprogramming facilities, one of the better kept open secrets of PL design;
  4. - One of the most nightmarish languages to try to performance-optimise.
  5. - Little momentum.


... but for almost identical reasons, I recommended CTM and Oz, assuming that the kids are teenagers!

Prolog / Oz

I have to confess to neither having read CTM (Ehud will probably revoke my editorship...) nor having used Oz, but if I were to advance pros and cons between Prolog & Oz, I guess they would go something like:

  1. +PL: Tighter relationship to predicate calculus;

  2. +Oz: Natural expression of many fundamental POPL ideas;
  3. +PL: Better understood technology;
  4. -PL: Too much of that tech is ugly hackery;
  5. +Oz: Momentum, not a dying language.

Is the above about right?

Teaching programming

If I were teaching programming I would want a good tutorial and reference by my elbow. For example, Ruby has the "Pickaxe" book of Hunt and Thomas. As far as I know there is no contender for Oz. CTM is a great book for the Big Ideas but of course is not intended as a textbook on Oz.

Texts matter...

... but in this context, I looked at an LtU-meister being the source of instruction...

Topic Choice

Carter T Schonwald: I would think that anyone who was interested programming and capable of the intellectual task teaching themselves once they have been introduced to the rudiments would be more mature than the simplistic motivation of making games, especially now that the task of making a truly modern game is such a monumental endevour.

That last observation might motivate investigation into why game programming is a momumental endeavor, and why most commercial games either embed an existing scripting language or create a new one from scratch. On that latter point, perhaps LtU's own Tim Sweeney, author of Unreal and UnrealScript, can weigh in.

Having been a professional game developer myself, I can tell you two things:

  1. Games reflect a lot of requirements that show up in other domains: concurrency, responsiveness, ease of use, an extreme emphasis on modularity and expandability...
  2. Games present a great opportunity to learn about applicable paradigms and patterns. For example, almost all games benefit from applying the Active Object pattern, and almost all games provide an opportunity to learn about various approaches to concurrency.

Add to this the obvious motivational factor for kids, and I see lots of possibilities to mix good computer science, good software engineering, and good fun.


LOGO was created for the express purpose of teaching kids to program, though it has largely been forgotten. It has a nice functional style, and the turtle graphics give instant gratification to the user.

One guy wanted to teach his son's second grade class some LOGO, and he made his materials available online.

You beat me to it. But I'd NEVER do that ... priorities, I gues

I seem to recall (early 80s?) reading about six year olds learning very basic programming with LOGO.

I don't know what else Box is doing (he may already be teaching them 10 languages), but I'd much rather first teach/have them learn a 2nd or third human language than programming.

Although I suppose that without an immersive program they'll never pick up the right morphemes.

Language matter less than good feedback

I started to learn programming by using BASIC a bad language, yes, but which allowed you easily to make drawings and I was hooked..

Whatever the language you use, make sure that you have modules allowing to draw, to open windows, to play games.
For childs, what matters is having a quick feedback so that they become interested in programming, I'd say that ruby would be good, but I don't know exactly if it is easy to open a window to draw lines, boxes in it..

Get Your Infinate Paper Tape Ready

An idea that popped in my head while thinking about kids and programming:

Get ahold of an old hand-held scanner (eBay is your friend). Associate a series of colors with a given character in Brainf*ck. Have the kids draw the colors down a strip of paper to make a program. Scan it, then have another program which translates the colors down to BF and run it. This, of course, isn't too far from having a raw Turing Machine.

I'm thinking you might be able to make a Mindstorms project out of this.

Nice idea!

I like the concept of teaching kids to create programs on paper tape -- it's very interactive and a nice link to the history of computing, too.

For more robotics, Parallax have various educational-oriented robots, include walkers, crawlers, and wheeled models. One of their models, the Boe Bot, is supposed to be available at Radio Shack stores, and has an associated tutorial, Robotics with the Boe Bot (4.4MB PDF). I believe the robots are mostly based on the BASIC Stamp chip, a PIC chip that run a BASIC interpreter, so if you're looking for fancier languages, these may not be the best choice.

They also have a series of instructional kits/experiments called Stamps in Class.

A friend of mine got one of these kits for his daughter to present at her school science fair, and they were both very happy with how it turned out.

Don is on the right track

I am glad Don's runner ups are Logo and Scheme.

I started with Logo (I was ten at the time), and I still think it's great. Papert's Mindstorm is really a must if you are interested in kids and computers.

I am not sure how the new Logos (with multiple turtles, concurrency, sensor etc.) compare as far as learning programming goes, but the little I saw looks promising.

Link needs fixing

Why can't I have a blank comment? :-)

Fixed, thanks.

Fixed, thanks.


Ehud wrote: I am glad Don's runner ups are Logo and Scheme.

I'm less happy. Logo has the advantage of being well-throught through pedagogically, but as a language I don't find it particularly enlightened. And he didn't look at any logic programming or highly declarative languages, which I think might have been just what the doctor ordered.

Where to Begin?

cas: And he didn't look at any logic programming or highly declarative languages, which I think might have been just what the doctor ordered.

It's a shame there isn't a "Little Schemer" or "How to Design Programs" for Oz; I really do think that would be an amazing thing. I'm firmly with those who maintain that in the modern era, teaching programming without treating at least concurrency, and ideally distribution, from the outset only causes unnecessary pain later. Unfortunately, Oz is really the only language I can think of that's suitable for teaching both concurrent and distributed programming in an introductory setting. Well, perhaps Erlang, but then you couldn't start talking about logic programming, or object-oriented programming, in the same context.

So short of that, I'm afraid that DrScheme still wins: you have the rich basis of Scheme, the great environment and supporting tools and documentaiton, and at least an implementation with threads and TCP/IP support. It's possible to not fall into the trap of launching right into shared-state concurrency with the tools, just probably harder than it would be with Oz.

Wouter Van Oortmerssen's visual languages.

Programming with shapes and colors still fascinates me. I'd like to try teaching kids to program with something like Wouter Van Oortmerssen's Sauerkraut.

Or maybe Wouter's language Aardappel for older students.

(The picture below is the original Boerenkool interface that was later integrated into Aardappel for the UI.)

Most kids I know would start clicking and dragging immediately upon seeing the first interface above. You have any kids handy? Want to ask them what they think about these pictures?

--Shae Erisson -

The Goal?

And he didn't look at any logic programming or highly declarative languages, which I think might have been just what the doctor ordered.

I guess we should have started out by asking why teach kids to program in the first place? What do you want to achieve?

Can you be more specific about highly declarative languages? Which do you have in mind?

The Goal!

I missed Ehud's request at the time, but stumbled upon it through googledipidity.

Given Don wanted his kids to aquire a sound intuition on things like logic, predicates, sets, and functions, including how they manifest in computers, I don't find either scheme or logo to be remarkably compelling (scheme does have a respectable history of connections with logic etc., but many people learn scheme without acquiring much in the way of good intuitions here).

The kind of highly declarative language I was thinking of I guess would have been along the lines of APL, Haskell or Mathematica.

APL ?!

Ouch! Do you really think that you can teach normal kids APL as a programming language? I think you could do that only if you prtended it is a puzzle, not a programming language... Kids love ciphers (at least some of them do!)

More seriously, I think that APL is not the best way to teach about functions and even logic. Haskell can be a good idea. I am not sure why you dismiss Scheme. Maybe the logic angle is a bit weak, but you learn quite a lot about functions...

I am sure Wadler thought about Haskell first. Don't you?


APL isn't the easiest case to make, but I think one could put together an attractive tutorial that teaches these logic/set-theoretic ideas side by side with geometric ideas. Doubt it's been done at an accessible enough level though, so I guess it's moot.

It was Don Box's request originally: did he get in touch with Wadler?

I don't know.

I don't know.

The closest thing I can think of (regarding APL, sets and geometry) is the J dictionary. But it is not for kids. And too deep even for many adults...

Another good LOGO & Kid Book

If you liked Mindstorms, I would also recommend this.

Teaching Math with Logo

I think Mr. Box can hit two birds with one stone.

This book only requires middle-school mathematics and teaches some atypical mathematical concepts in an unconventional way.

I haven't seen this book.

I haven't seen this book. From the google previes it sure looks nice.

Another vote for Squeak

RE: Teaching my kids to program

My team is developing a new language and IDE just for the purpose of teaching children to program.

The language is visually similar to BASIC, so it's easy for programming parents and non-programming kids to read and learn, but has some very important differences.

One way that this product is targeted at kids is by making it easy for them to get visual results without having to learn how to create a window, a graphics device, etc.

It supports typed variables, decisions with if-then-else, loops, methods, functions, structures, arrays, and other important basic programming concepts.

It's not complete, being at Technological Preview stage, and development is still ocurring on this product.

We would love it if people would give it a look-see and maybe provide feedback, especially those in the development community.

Obviously, we hope that you love it, but if you don't we'd really like to know why.

You can find it at:

Re: Teaching my kids to program

I think this community could try out ToonTalk.

This is, AFAIK, the only animated programming language. This doesn't mean it is a set of animated symbols or an animated execution graph: the code is an animation itself.
You program by moving cartoons in a pseudo-3D world.

Simple as it sounds, it includes generalization methods to render it more than a mere sandbox language. And it allows children to program concurrent programs by design, right from the start.

I've been using it with children as young as 3.
The UK Playground project ( used it with 5,6 and 7 year olds, to program games, and the WebLabs project is using it with 12-14 year olds to explore mathematics.