Teaching a kid to code (Clojure or otherwise)

This is something I’ve been thinking about quite a bit, so I’m gonna start this thread to share my thoughts on it so far, provide a bunch of pointers for people that want to do something similar (maybe over the holiday period), and to hear what other people’s experiences and preferences are.

Holiday season will soon be upon us, at which time I’ll be heading back to Belgium to spend it with the family. My sister’s oldest kid is almost 9, and very curious about techy things. Last year for Christmas I gave him a set of littlebits, and for the rest of the week you couldn’t pry them from his hands if you tried.

I’ve been trying to find a good moment to show him some coding. The tough part is that I’m only around every so many months, so there’s limited guiding I can do in between, and his parents won’t be able to help him much with that either, so I feel like I need to set him up with something that he can then further explore on his own, and that we can dig deeper into the next time I come around.

An extra challenge is that his first language is Dutch. There are plenty of cool online things that he would be able to navigate by himself if he spoke English.

My sister suggested I’d get the Dutch version of Programming with Minecraft for Christmas, but I don’t know… He’s raving about Minecraft so it seems like a great fit, but it also seems far from trivial, something that could get very frustrating very quickly. Maybe it’s better to go there when he knows about variables and ifs and loops. The other thing is, it uses Python. I really don’t feel like teaching him Python. Semantic whitespace when you’re still getting comfortable with the very concept of typing things into a computer… IDK. And then all that OO complexity. Trying to teach adults about classes and objects is hard enough.

So instead I ordered Linda Liukas’s Hello Ruby books and decided to start there. They are engaging children’s books with an actual story line, but along the way you learn about booleans, algorithms, conditionals and more. All just with exercises on paper, like this one where you get to navigate a map.

So I think I’ll start there, and maybe have a look at Scratch, I know some of the schools in the area use it so that might be a plus.

Naturally I’d also love to introduce Clojure :smiley: it’s a pretty “simple” (if you know what I mean) language, and we could still “graduate” to doing Minecraft with Clojure later on. That said I know Clojure has its drawbacks as well for this kind of thing. You trade semantic whitespace for balancing parens (which is a win in my book but still an obstacle for beginners), but the bigger problem I think is all the accidental complexity around tooling, and dealing with the host environment when you want to start affecting the world outside your little program.

I’d start off with maria.cloud though, which would eliminate most of those problems. The cool thing with Maria would also be that I can send him mini tutorials even when I’m not around.

I also asked on Twitter if people had suggestions for teaching kids Clojure, and I got several interesting replies. I still need to have a better look at some of these, but I’m already going to share them:

  • Timothy Pratley’s power-turtle The turtle from Seymore Papert’s Logo language, but with Clojure and in your browser. Try it here. I believe this was written as a prelude for ClojureBridge workshops. It looks pretty cool, and is available for a bunch of languages.
  • George, a Universe of Programming I have yet to take this for a spin. It seems to be already used in classrooms, and also contains a “turtle” app, as well as being able to do things like controlling drones. Not sure what the scope of this thing is. There’s also an accompanying book.
  • cognitory/turtle Another Logo/Turtle… also in the browser (live demo)
  • Klipse for kids This seems like a fairly elaborate and well structured tutorial specifically aimed at kids, using Klipse so you can evaluate snippets inside the text

Another interesting option for those who have graduated from Scratch is the Bootstrap Curriculum. It’s meant to teach students from around age 11 mathematics by way of writing games using the Racket language.


I’m curious if anyone has suggestions for something matching the following criteria:

  • German language
  • Very little tooling complexity (i.e. install one GUI program at most, or even iPad app)
  • Exciting from the start — in a sense that you don’t work through 50 pages before you make something “cool”

I think Scratch + some appropriate book could fit that bill? Any other contenders?

I thought the Sphero robots also looked quite cool and that connection to the real world might make it more engaging as well. Will need to look into how you can program these and what could be fun challenges.

Asking for my brother who is 10 and about to finish elementary school.

That may be true, but don’t underestimate the power of motivation. Something frustrating that he’s actually interested in achieving because he’s fascinated by it may work better than something pitched at the right level that isn’t intrinsically motivating to him.

I’d be very wary of using Clojure for kids - just too many sharp frustrating edges. I’d rather use Racket, I think, although I don’t know what’s out there in terms of material. I’ve also been meaning to check out Maria but haven’t yet.

I used to volunteer at our local Coder Dojo, and they used code.org online and then Scratch. I have mixed feeling about Scratch - it’s really interactive and visual which is great, but it’s very limited from a programming POV and an advanced kid will get frustrated with the limitations before too long (as will you, when you have to tell him to cut and paste code again :slight_smile: ).

Those books look very nice too - I have Robot Turtles which is similar, but our daughter isn’t very interested yet.

1 Like

I agree about the real world connection, I haven’t tried it but intuitively I think this would be more interesting for kids. Those ones don’t look very programmable though, unless I’m missing something. I like the look of the CleverBots, although I wish you could program them on a computer, not just a tablet.

Carin Meier has a book teaching kids Clojure http://www.codeshifterbook.com/
I haven’t tried it but it looks promising.

I haven’t taught a kid before but non-programmer adults instead. The language I pick is Racket. But before getting their hand dirty with Racket, the students have to complete blockly games


I have played a bit at the REPL with my kids (9 and 7). Used it as glorified calculator to write non-interactive simulations based on the Lemonade Tycoon game - with functions and parameters; and also tried building a small Wa-Tor simulation in the browser (but it ended up being too complex for them to follow, due to browser dependencies, HTML and whatnot - but they enjoyed seeing sharks eat all other fish and then collapse).

So far, what worked best for us was to talk with them about something simple but interesting, and then trying scenarios out at the REPL when basic ideas were well fixed.

Now I got one of those O’Reilly books on modding Minecraft in Java, so I was wondering whether it would be possible to do it with Clojure instead…

A bit OT, Natural Math is having a sale till tomorrow. There’s also free shipping options for people not in the US.

I don’t conflate programming with math, but their peculiar approach—regardless of their subject—is I think harmonious with the sorts of thinking we’d want to encourage. A form of math that isn’t obsessed with answers (the managerial/bureaucratic approach where you unit-test learners), but more with investigating questions, multiple conflicting perspectives & analyzing.

1 Like

Natural Math is awesome.

The fabulously named Raising Nerd had a great post on this recently, with some links to good robot options.

It’s great this Internet thing where we can share so much!

I bought Algobrix to my kid. It looks fantastic, let’s see how it is received by him when it’s delivered.

Another option could be something on the line of Forth, like https://github.com/wsnook/turtleForth. Interactive, no syntax. There was also another Forth related material for kids that couldn’t find now.

There is a ‘functional’ version of Scratch which allows functions to return values : http://snap.berkeley.edu/

1 Like

Yes, I haven’t tried to use Snap but it looks great. It’s more or less Scheme in block form, from what I can tell. I believe that it was used in some university courses to implement quite complicated things (e.g. data structures, although my memory may be failing me on that).

In case you also want to use an imperative paradigm for teaching kids, you may give Alice a try : https://www.alice.org/

Not clojure, but sonic-pi might be worth considering. It’s a Ruby based live-coding (music) system, specifically designed to help teach kids basic programming techniques. Loads of fun, particularly if the student likes music. Don’t know if it has a Dutch translation yet, but it’s possible. the chap who created it did live and work in Amsterdam for a while.

1 Like

We have had a Sphero for a couple of weeks now and it’s definitely interesting.

I have been experimenting on my 10 years old daughter yesterday and today with 2 sessions of pair-programming on Godot Engine v3.0.2 (using GD script, it is based on python) and it seems to work well for her.

Her prior experience was Scratch.

A great resource I just found is the Purdue Engineering Gift Guide, it’s got some really great things, including some cool apps - the Everything Machine looks really awesome.

It’s also got several games made by our very own Mark Engelberg, and designed with Clojure! I have Code Master which is great, I’m planning to pick up his others at some point too. I like the idea of teaching programming concepts without actually staring at a screen.

What worked well with my currently 14yo kid was definitely Scratch and later P5js and Lua in fantasy consoles.

We started around his 6 but some concepts (variables and logical expressions) were accessible when he turned 8. Around 10+ he started doing electronics and Arduino programming.
Together we’ve made Gamebuino clone and approached to write short game. It was great case to explain how to design software. He even wrote some parts of the code (we did kind of pair programming).

He also tried later: Unity (to build small world and simple point and click game), Processing/P5js (at school, with success), fantasy consoles like Pico-8 or Tic-80 (Lua is really easy), Logo for school contests (very mathematical problems, highly demotivating), Python from “Hello, World!” book (still too abstract), and some weeks ago we’ve tried Clojure (first chapters from Clojure for Brave and True) without any problems.

The main problem is: kids need assistance and short, closed tasks to perform. They easily give up when encounter a problem and lose interest. Of course, when they get older such problems diminish. But the best solution is pair/group programming and tutoring.

Currently our ultimate goal is to make together Roguelike game in Clojure. I will let you know how it works if it happens.

My private point from my experience: There is a huge hype about teaching every kid to code. Maybe every kid is able to code, but definitely minority is really interested in doing this. So don’t push them too hard.


I think there is also a kind of generational bias - if your parents are all into engineering, maybe you’ll find your own way in interior decors. You have to be different.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.