What my daughter's blocks teach us about learning

Free Beginner Workshop

From OO to Clojure Workshop!

Watch my free workshop to help you learn Clojure faster and shift your paradigm to functional.

Summary: My daughter's blocks taught her to match shapes with a lot of fast feedback. Fast feedback is a powerful tool to learn any skill. I analyze how the blocks helped my daughter learn and compare it to learning Clojure.

I have a daughter. As I write this, she's about three and a half years old. I've watched her learn so much. And most of what she's learned she's learned through direct feedback with the environment. If you watched her enough, you could almost read her thoughts as she played in the world.

She had a toy with holes of different shapes. You're supposed to figure out what block can fit in which hole. It's something so obvious to an adult. I would watch and she would struggle. Sometimes she'd get frustrated. Sometimes she would ask me for help.

It reminded me a lot about how much we take for obvious when programming. I've watched many people struggle with programming. It's often obvious to me how to solve a problem. But the programmer I'm pairing with just doesn't see how I see. It happens the other way, too, where they see stuff I can't. The parallels between the block toy and programming are instructive. What can we learn about the best way to learn to program?

Let's trace through the learning process with my daughter and see what lessons we can apply to how we learn software. I'm learning from this as I write it, but I'll also make references to LispCast Introduction to Clojure, my beginner Clojure course, for examples.

When my daughter first started with those blocks, there was a lot of confusion and frustration. Were the blocks supposed to go inside? She wanted to try and usually she would fail. You could almost read her thoughts. Is getting this block through a hole even possible? But then every now and then, she'd get the right block into the right hole, just by chance, and things would line up. It gave her hope.

While there are valuable lessons for her in that struggle, as a tool for learning specifically about blocks and holes, I think the tool fails. Why the frustration? Why start with all of the uncertainty? Could it have started out with just one hole and one block? I think Intro to Clojure gets this right. It starts with just one goal that is guaranteed to be possible. That really helps start the learning off with confidence.

Now, there's still plenty to learn with just one block. A lot of what my daughter had to learn was to hold the block in the right orientation and to line it up with the hole. When we're starting out with something new, we know we are failing but we don't know why. Did I put it in the wrong hole? Did I not hold it right? Should I try it again? All of this is part of learning. You're trying to recognize patterns and build neural structures to represent all the things that have to be right to solve the problem. But those mental structures can be built one at a time so you don't have to have uncertainty compounded on frustration.

Intro to Clojure focuses on these small victories. You learn one thing then you're trying it out immediately. There are so many skills that you need to pick up just to be able to define a function. Matching parens, whitespace between expressions, order of the arguments. And lots more. Half of them are being able to recognize your mistakes so you can correct them. When my daughter held the start block over the star hole, she had to realize, with time, that so much was already right. But it wasn't going in! What was wrong this time? Did it need to be jiggled? Did it need to be rotated? So many things to look for. The same happens when we learn to code. We type something wrong. The compiler tells us something is wrong. We look and we look and when we're first starting out with a new language, we don't even know what we should be looking for.

Does whitespace matter? What about capitalization? Can that comma touch the keyword? There are so many things. That's why it's important to immerse yourself in the language. These things literally cannot be taught. I'm not talking about specific points of grammar. Those can be taught. I'm talking about your nervous system adapting to a new environment, not "book learning". It just takes time.

But speaking of time, there's something the block game got right. My daughter had unlimited time to try whatever she wanted. She could hit the blocks. She did brute force techniques. She jiggled them. And each thing she tried gave her instant feedback about how it was working. Of course, it didn't tell her what was wrong. But she could tell if it worked. I think more programming systems could improve their feedback.

Clojure comes with a REPL, which is pretty good for feedback. You type something in and it runs. It tells you the result. Intro to Clojure works exclusively in the REPL for the first lesson in the course. It's designed to give you that same feedback with the confidence that what you're typing should work.

And there are two keys to fast feedback, to creating an environment where you feel comfortable learning. The first is information. You can't have feedback without information about the effect of your actions. That's why everything either prints "ok" or prints an informative error. It was a lot of work to put all of the reasons why something wasn't working. The second key is speed. You need speed of feedback. You need to know right away that what you did worked or didn't.

And because the block game had fast feedback, my daughter could learn from it without anybody helping. The brute force approach (pick up a block and try every hole) worked pretty well because of the fast feedback. She could quickly find a success while she was figure out why that block went in at that time.

Something else the block game got right was to make the entire problem space very tractable for its audience. You pick up a block and there are six possible holes it could fit in. That's really tractable. Worst case is you try every hole, which takes about 30 seconds. Contrast this with most programming language books that teach you the entire grammar of the language then ask you to do something. The worst case in that scenario is you have 34 different syntax cases to sort through to find the one that works. Not ideal.

LispCast does something similar to the block game. You are taught only one small bit at a time (and often given a hint what bits you'll need). The space of programs you can write is limited, so it's often very clear how you would solve it. Complexity is built up very slowly.

Well, my daughter got good at the blocks and you can get good at Clojure. Yes, it takes work, but the right tool can give you confidence and reduce frustration. I think LispCast Introduction to Clojure implements fast feedback better than anything else out there. I used to sell it individually but now it's rolled into PurelyFunctional.tv Online Mentoring. With a \$25/month subscription, you get access to Intro to Clojure and many more lessons. It's step-by-step guidance from Clojure Dabbler to Professional.