Teaching my kids to program

Don Box's Spoutlet

Syndication

One of my motivations for wanting to learn Ruby (or relearn Smalltalk) was for my kids.
 
In my household, my wife owns the liberal arts upbringing of the kids (she's ABD in English Lit), and I own the math and logic upbringing (my BA was in math and my first pass at grad school was in math before I decided to "go commercial" and do this CS thing).
 
I have no intention of having any of my kids grow up to program for a living - this is just about making them more complete human beings. 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. 
 
So, back to the question of which language to teach my kids.
 
Here's where my head is at this weekend.
 
Lisp
 
Pro: Minimum of syntactic mechanism.
Pro: I know it and feel comfortable with it.
Pro: Good synergy with what their daddy does for a living (remember the S-expr/XML relationship).
Pro: Instills the DIY ethic, which I'm a big believer in.
 
Con: I refuse to inflict Emacs on my kids, so I'm clueless as to what environment to use.
Con: Probably the least "practical" in terms of getting the kids to do stuff that might interest them. This may just be my limited imagination speaking.
 
ML
 
Pro: More structure than Lisp
Pro: I know it and feel comfortable with it.
Pro: I can use F# which fits nicely with my CLR-based home computing environment.
 
Con: Somewhat more syntax to get distract them from the semantics.
 
Smalltalk
 
Pro: Minimum of syntactic mechanism.
Pro: Good synergy with what their daddy does for a living (remember the messaging/SOAP relationship).
Pro: Instills the DIY ethic, which I'm a big believer in.
Pro: Doug Purdy works in Smalltalk and my kids love Doug.
Pro: The environment is obvious - Squeak.
 
Con: I'm super rusty - it's been 18 years since I've written a Smalltalk program. 
 
Ruby
 
Pro: The environment is obvious - RIDE.
Pro: Of the four on this list, it's the language that has the most momentum and community growth.
Pro: Given that I haven't written any Ruby programs yet, there may be tons of amazing pros I don't know of yet.
 
Con: Given that I haven't written any Ruby programs yet, there may be tons of hideous cons I don't know of yet.
 
There are some conspicuous absences from this list. I don't care if any of my three kids ever grok the difference between an abstract class and an interface or between a pointer and a reference, so languages like C++, C#, Java, and VB.NET are out. Honestly, if the industry is still forcing programmers to ask these kinds of questions by the time the next generation of programmers comes to the table, I'll consider my generation to have really squandered an opportunity.
 
My plan is to learn Ruby and relearn Smalltalk to inform my decision. In the meantime, comments or flames (public or private) from the Peanut Gallery are most appreciated.

Posted Feb 20 2005, 03:38 PM by don-box

Comments

Gideon wrote re: Teaching my kids to program
on 02-20-2005 10:51 AM
Maybe <a href="http://drscheme.org">DrScheme</a> would be a good lisp to begin with. It has some really neat features and is designed around <a href="http://www.htdp.org/">teaching</a> programming theory.
Maxim V. Karpov wrote re: Teaching my kids to program
on 02-20-2005 11:26 AM
Don,

I am interested in what your selection will ended up to be. I have two kids myself and I will start introducing them to programming when they are around 10 or so.

What are ages of your kids?

Maxim
[www.ipattern.com do you?]
TommyS wrote re: Teaching my kids to program
on 02-20-2005 11:29 AM
How old are your kids, or rather, at what age do you plan to introduce them to programming?
Have you considered something like Lego Mindstorms? (I think Stan Lippman have been using that with his son...)
/Tommy
David Cornelson wrote re: Teaching my kids to program
on 02-20-2005 11:31 AM
Try an interactive fiction language like TADS 3, Hugo, or Inform. The can teach programming concepts _and_ your kids can create interactive stories or games that your wife can also be involved in.

Places to start include www.wurb.com/if and ifwiki.org as well as the IF archive at ifarchive.org.
John wrote re: Teaching my kids to program
on 02-20-2005 11:50 AM
Do Ruby.

...and post the lessons! ;)
stefan demetz wrote re: Teaching my kids to program
on 02-20-2005 12:03 PM
html or xaml, so they get instant visual feedback on what they do
Martin wrote re: Teaching my kids to program
on 02-20-2005 12:09 PM
My formal education in programming was at Berkeley where Scheme is the first thing they throw at students. I think that approach is flawed. I took their class that used Scheme (61a) and I felt like it was useless and overly broad on theory while lacking anything concrete.

Here is my suggestion: choose the language that will let them do whatever they might think is cool. Make it fun and then help them intuit the theory on their own as they go. If you think they would enjoy building webpages, choose PHP or ASP or zope or some ruby framework. If you think they'll like building UI's maybe throw vb6 at them. I learned VB6 at the same time I took that Scheme class and learned way more from VB6. Ok, I realize you don't want them to be programmers. But I think getting them inspired will help burn the lessons in their memory and provide a reason for the theory. First give them a reason to want to know what you have to teach them.

I have no kids of my own, but I plan to use this strategy on them.
Steve Maine wrote re: Teaching my kids to program
on 02-20-2005 12:11 PM
+1 to Dr. Scheme. The environment is really friendly and geared toward teaching. It also comes with some interesting GUI libraries for doing more "tangible" things like drawing pictures on the screen.
Albert wrote re: Teaching my kids to program
on 02-20-2005 12:16 PM
I admire your optimism about current mainstream programming concepts being things of the past in 20 years. I'm not sure what sort of historic evidence supports this optimism but I suppose we, parents are obliged to hope for a better future for our kids.
David wrote re: Teaching my kids to program
on 02-20-2005 1:01 PM
Regardless of the final language choice, consider starting off with the red/green/refactor cycle. I've found that TDD actually helps kids a lot when picking up programming. This is probably at least partially due to the fact that it breaks things down into tiny steps, and gives you concrete (small) goals to shoot for from the start.
Hank Fay wrote re: Teaching my kids to program
on 02-20-2005 1:09 PM
There has been serious work done on teaching Python to young people, including <a href="http://www.livewires.org.uk/python/index.html">the Livewires program in the UK</a>.
Richard Tallent wrote re: Teaching my kids to program
on 02-20-2005 1:12 PM
Novel approach: I'll probably be laughed out of the room of LISPies, but perhaps Excel formula language would be a nice introduction to functions, data types, etc. Certainly a more graphical canvas than. Arrays != sets, but it may be more approachable depending on their age and level of interest, and they'll get a useful skill to boot.
Olivier Nano wrote re: Teaching my kids to program
on 02-20-2005 1:37 PM
If you go for Smalltalk, you should look there: http://www.iam.unibe.ch/~ducasse/ . He is a friend of mine who is writing a book to teach programming to kids in Smalltalk (look for Bot-Inc in the web page).
You should look also at squeak (made by Alan Kay) which is a Smalltalk environment very suitable for kids.

And relearning Smalltalk is fast, the syntax feets on a postcard ;-)
Dan Hatfield wrote re: Teaching my kids to program
on 02-20-2005 1:38 PM
In the Squeak realm, have you considered Alice?
http://www.alice.org/stage3/sqalice.html
My kids are too young yet - but I think they would find this cool. Although, it might not teach some of the basics you are looking for...
Vatsan wrote re: Teaching my kids to program
on 02-20-2005 2:26 PM
I'm surprised no one has mentioned Basic (GWBASIC of Basica) or (Turbo?) Pascal! Basic esp. is cool because it gives immediate feedback and is simple to learn (10 print "hello world? is all you need to start) - and yet, it can do some pretty amazing stuff.
Christian Romney wrote re: Teaching my kids to program
on 02-20-2005 2:37 PM
+1 for BASIC. Depending on the age of your kids, the sophistication of producing a GUI app may not be necessary. I wrote my first program at 7 years old on my Radio Shack TRS-80 with Basic, and even though it only printed my name, it was enough to spark my love affair with computing. The nice thing about line numbers (10.. 20.. 30..) is that you can always go back and add 15 if you need to! Of course, these days kids have "toys" that are 16-bit color handheld, interactive 3D gaming environents, so if you're kids are older, then Hello, World. might not do the trick to spark their interest. Let us know what you choose!
Kevin Daly wrote re: Teaching my kids to program
on 02-20-2005 2:40 PM
Are Logo implementations available for Windows?
That was a Lisp-based (I think...could be completely wrong about that) language explicitly designed to teach kids programming ideas. To make it more interesting the programs guide the movements of a virtual (or actual) "turtle", so they can see graphical output reflecting their coding logic.
Brian wrote re: Teaching my kids to program
on 02-20-2005 3:48 PM
I learned to program using QBASIC. I think that for the type of programs that a kid would be interested in writing (drawing, guessing games, etc.), QBASIC is the way to go.
Joe Duffy wrote re: Teaching my kids to program
on 02-20-2005 5:57 PM
+1 DrScheme

As already noted, the environment's primary case is for *teaching* students to program in Scheme.
David wrote re: Teaching my kids to program
on 02-20-2005 6:04 PM
Re: LOGO. Also a good choice...turtle graphics are fun! For a starting point, check out http://www.softronix.com/logo.html
Don Box wrote re: Teaching my kids to program
on 02-20-2005 6:58 PM
After spending some time today on this, here's where I'm at:

1. After reading the Pickaxe book, I love Ruby, at least for my own use.

2. After spending time in Squeak, I can't imagine inflicting an idiosyncratic windowing system on my kids in order to get them to use Smalltalk. I'm not writing off Smalltalk, but I am writing off Squeak. Sorry Doug.

3. DrScheme utterly rocks. Plus the idea of using Sussman/Abelson as inspiration ain't half bad either.

DB
Joshua Allen wrote re: Teaching my kids to program
on 02-20-2005 6:58 PM
Lisp, without a doubt. It's less about teaching them to program than about teaching them to think. As an early teen, I read Copi's "Symbolic Logic" (not at all related to programming) and learned Lisp, then was forced to learn to accomplish business tasks in Lisp for my summer job. I think that a ton of areas of the brain rely on wetware that handles tree/grammar/structure processing. Programming in Lisp really exercises these areas of the brain. A certain amount of programming in Lisp will have your kids improving in all sorts of areas of thinking; crafting logically sound arguments, stringing together conjunctions in speech like a German professor, and just "getting" complex things that other kids need explained five times.
Don Box wrote re: Teaching my kids to program
on 02-20-2005 7:03 PM
Joshua,

I too was exposed to Irv Copi's book as a youngster (9th grade Logic course) and then again as an undergrad.

I recently pulled out a copy from the garage and was surprised at how it no longer really spoke to me.

I did recently pick up John Sowa's KR book, which I loved. Sowa covers a lot of Copi's ground in much less time.

DB
Erik Johnson wrote re: Teaching my kids to program
on 02-20-2005 7:17 PM
This may seem unimaginative and maybe dangerous on a few levels, but my 7 year old is into Excel on our eMac at home. He gets the syntax and the values in boxes. He likes making times tables and all things "fill down/right". He likes the charts too.

The only problem is in trying to shield him from Powerpoint from as long as possible.
Joshua Allen wrote re: Teaching my kids to program
on 02-20-2005 7:48 PM
Well, that explains why you think the way you do -- Copi's book had pretty limited scope, but it was good for forming young brains. I also have Sowa's book and agree that it's much more valuable to me today than Copi. Sowa covers a lot more about application and tradeoffs, which might be more interesting to experienced practicioners than to Junior High kids, though. I would also recommend Sister Miriam Joseph's "Trivium" -- I only recently discovered it based on recommendation from Sowa, but it's meant to be grammar school text. I wish they had taught it at my school. Somewhat related; last week I picked up a copy of the game "Grid Works" at Borders, and I think it would be really good for kids around 8 years old. It's a nice travel-sized collection of logical deduction puzzles you solve by placing pieces on a magnetized grid. It's easy to learn, fun, and difficulty increases gradually so you can stretch your brain's stack a bit at a time. I can solve the hardest ones without too much difficulty, so it's not worth it for adults -- but I hope my daughter picks it up when the time comes, and I'll write a computer program to generate harder puzzles for the game if I ever get some spare time.
Lu wrote re: Teaching my kids to program
on 02-20-2005 8:35 PM
+1 for Lisp
Lisp is very useful for solving puzzles. A lot of AI text books have Lisp packages. I wish I could have learned AI (esp. search and logic) when I was a child. It provides a systematic way to solve neally all the intellectual puzzles that I had as a child. Lisp will be a very good aid in this problem solving process.
David.Mitchell@gmail.com wrote Take a look at Squeakland
on 02-20-2005 9:35 PM
For a Squeak set up for education, go to Squeakland.org.

Great book available ($20) with lesson plan. I'm using it with a group of 8-10 year olds.

I noted your concern about forcing a strange UI. I agree that Morphic (the Squeak UI) Squeak is a bit of a freakshow, but it's outstanding for kids. Everything is implemented in Squeak and it is all live all the time (For example, you can tear things off of the menus, twist them around and they still work.)

The kids in the group and I have spent about 3 hours across two evenings a week apart. Following the lesson plan, we've already drawn cars, planes, hovercraft and taught them to steer down paths by sensing colors. Drawn steering wheels and connected one object to another.

But, Ruby and LISP are cool as well. If you go the LISP route, check out DrScheme.
Peter Seibel wrote re: Teaching my kids to program
on 02-20-2005 10:08 PM
Since you listed not "practical" as a strike against Lisp, I'm pretty much obligated to flog my book (to be published this April by Apress) _Practical Common Lisp_, available (currently in draft form) on the web at:

http://www.gigamonkeys.com/book/

My book isn't aimed at kids, but maybe there's something in there to get you over the "not practical enough" hump. Or maybe not, it's hard to compete with something like Squeak in the appealing to kids arena.

Though with not much work on your part you could probably whip up some bindings to the appropriate kid-friendly libraries on a specific platform and then focus on teaching programming. For instance, using OpenMCL, a free Common Lisp implementation for OS X, I wrote an ear training program using Quicktime libraries to play notes and chords in all kinds of instruments. But after I wrapped a few C functions I needed, the rest of the program was pure Lisp.

-Peter
Ed Daniel wrote re: Teaching my kids to program
on 02-20-2005 11:44 PM
Hmm,

I just spent 20 minutes trying to find a link to a programming language created in the '80s that was a macro language for a drawing program (I think) for 8 bit BBC computers.

The idea being that visual result sets would stimulate more than a tabular dataset.

Other thoughts I had on this were that perhaps it would be more fun to 'build' physical things - so creating logic gates might be a fundamental lesson, i.e. start with binary ideas, and slowly scale up and out - before you know it you'll have a new alarm and intrusion detection system for your home, lol :-)

Chad Walker wrote re: Teaching my kids to program
on 02-20-2005 11:52 PM
I have often lamented that lack of progress in educational programming software. Growing up, we learned Logo (and later LogoWriter) in elementary school. The thing is, with a little practice we were able to create games that were about one generation behind consoles of the era (then the NES and Sega Master System). This is really what I think drove me and some friends to learn more. Later in life, I realized the valuable gift that LogoWrite gave to me, from the mundane concepts of variables to recursion to asynchronous event handling to pointer manipulation. The beauty being that it was all there from the begining, but you didn't need to know about it until you were ready to use it. It provided clear steps to acheivment, and motivation that I like current programs/platforms lack.

I have some time until my daughter is old enough to start learning some programic concepts (she's almost 11 months old), but I continue to worry about how to teach and motivate her.
Sriram wrote re: Teaching my kids to program
on 02-21-2005 12:00 AM
Why not Python? I think it would be the easiest to learn without the quirks of all the other languages. It probably looks the closest to English.

Also, for kids starting off, BASIC might be good too (don't kill me - its just that Basic is so close to English)

Think about this - if things go wrong,your kids are less likely to get scared away from Python than the others
Sriram wrote re: Teaching my kids to program
on 02-21-2005 12:03 AM
I don't know about kids - but when I started to code, I wanted to see *visual output*. I wanted to make those same programs that are there in Windows. So +1 for something with an easy GUI toolkit..and preferably visual designer. VB.NET anyone? :)
Ed Daniel wrote re: Teaching my kids to program
on 02-21-2005 12:44 AM
Lego is lots of fun too!

http://shop.lego.com/product.asp?p=3804
Tombo wrote re: Teaching my kids to program
on 02-21-2005 1:02 AM
+1 For Python and Sriram's arguments. Python is often likened to "executable psudocode". Must admit I don't know Ruby so I'll make no arguments against it.

For an excellent comparison of Python and Lisp, undertaken to support Norvig's own teaching aims and including the conclusion "Python is Lisp-1", see Peter Norvig's site:

http://www.norvig.com/python-lisp.html

You'll probably find his arguments more convincing than mine as he has a much larger brain.
AMD wrote re: Teaching my kids to program
on 02-21-2005 1:50 AM
Structured code is the blue pill.
Prolog is the red pill.
Free their minds!
Marco Russo wrote I linguaggi per le prossime generazioni
on 02-21-2005 2:08 AM
Random Thoughts wrote What Language To Teach A Child
on 02-21-2005 2:16 AM
That'd be programming language, not verbal. Talk about a confluence of ideas! I'd been thinking about this on and off for a while since Julian was born and up pops a post by Joshua Allen talking about a post by...
Scienter-Online wrote re: Teaching my kids to program
on 02-21-2005 2:54 AM
Above all, learning should be interesting and rewarding to children.

I was motivated to write programs as a child, mainly because I wanted to write cool games (and my brother was a good tutor). Does LISP give kids freedom to create exciting games for themselves?

Good children should learn C#. It is a "clean" language, very powerful/functional, and it provides quick and satisfying visual feedback. C# gives a kid power over the computer, i.e. instant gratification. In contrast, LISP is the relic of a bygone era.

If you doubt me, you should make this decision by casting lots.
Fernando Rodriguez wrote re: Teaching my kids to program
on 02-21-2005 2:54 AM
If you're going to teach kids, then by all menas, do not discard 'The Schemer's Guide' (see http://www.schemers.com/tsg.html). It's a WONDERFUL book to teach comp. science to kids. I strongly recommend it.

This is the article that made me discover that book and scheme, it's well worth reading for someone in your situation: http://www.fernando-rodriguez.com/high-school-computing.html

It might also be worth checking out the 'Computer science unplugged' project:
http://unplugged.canterbury.ac.nz/

Last, but not least, there's the 'manipulables' concept in 'Concrete Abstractions'. Another great book to teach programming, unfortunately it's now off print.

Good luck! :-)
Krishna wrote re: Teaching my kids to program
on 02-21-2005 2:59 AM
Checkout factor - http://factor.sf.net . It combines features from Lisp and Forth. If the kids can bend their minds backward (yeah, it uses postfix notation) at an early age, they can do pretty much anything ;)
Mark A. Richman wrote re: Teaching my kids to program
on 02-21-2005 3:17 AM
I had lots of fun with Logo (http://mckoss.com/logo/) programming as a little kid. Something about that cute little turtle...
Paul Downey wrote re: Teaching my kids to program
on 02-21-2005 3:50 AM
wow, what a lot of comments! i've been teaching my kids Python. It has the immediate interpreted aspects of BASIC, a minimal syntax with more depth and potential. There's also a larger developer base than with Ruby, including a bunch of games written in Python for them to copy and corrupt: http://www.pygame.org/
Michael wrote re: Teaching my kids to program
on 02-21-2005 4:27 AM
Wow, you have kids? I thought you did computer stuf 24x7...
Luís wrote re: Teachin