Teaching a kid to code (Clojure or otherwise)


#1

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

#2

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.


#3

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.


#4

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.


#5

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.


#6

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
https://blockly-games.appspot.com/


#7

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…


#8

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.


#9

Natural Math is awesome.

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


#10

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.


#11

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


#12

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).


#13

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


#14

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.


#15

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


#16

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.