Lab note
If you can explain it to kids, you own it
Alongside my product work, I teach Python part-time at Kodland to children and teenagers from 6 to 17, including kids with special needs. I have a motto for that work, and it has turned out to apply far beyond the classroom: if you can explain it to kids, you own it.
These are my notes on what teaching has taught me about writing code, and how it fed into the design of pythonforbeginners.org.
Explaining is a test of understanding
Adults are polite. When you explain something badly to a colleague, they nod, and you both move on. Children do not do that. If an explanation has a gap, a child finds it immediately, usually with one honest question.
That makes teaching a very good test. If I cannot explain a loop, a variable or a function in plain words to someone who has never programmed, the problem is rarely the student. It usually means I know how to use the idea without fully understanding it. Teaching shows me exactly where those gaps are.
The same test works in product work. If I cannot explain a feature to someone outside the team in a few plain sentences, the spec is not ready.
A wide range in one subject
The range from 6 to 17 is enormous. The way a young child meets an idea and the way a teenager does are completely different, and kids with special needs may need a different route again. The concept stays the same. The path to it changes.
That has made me much less attached to any single explanation. When one way does not land, I need another ready, and another after that. It is a useful habit for anyone who writes documentation, onboarding or error messages: your first explanation is a draft, not the answer.
Readable code is kind code
Teaching changed how I write code more than any style guide did. When a beginner reads code, every unclear line is a small wall. Code that is readable for a beginner is, almost always, more readable for an experienced engineer too.
In practice that means a few habits I now apply everywhere:
- Names that say what something is. A variable called
scoreorlives_leftneeds no explanation. A variable calledxneeds a teacher standing next to it. - Small steps over clever lines. Three short lines a beginner can follow beat one dense line they cannot.
- Comments that explain why, not what. The code already says what it does. A good comment says why it does it that way.
None of this is new advice. What is new for me is feeling, every week, the difference it makes to someone reading the code for the first time.
Naming is most of the work
If I had to pick one lesson, it would be naming. With beginners, a good name does half the teaching. It tells them what the thing holds and what it is for before they have read a single line of logic.
The same is true in teams. Much of the confusion I have seen in software projects came down to one word meaning two things, or two words meaning one thing. Choosing a name carefully, and then using it consistently in the code, the backlog and the conversation, removes a surprising amount of friction.
The same lessons in pythonforbeginners.org
pythonforbeginners.org is a learning platform I designed, built and launched end to end as a companion to the book Python Made Simple. Many of the same lessons show up in its design.
- 97 small exercises, not a few big ones. Beginners need frequent, reachable wins. Each exercise does one thing, so a learner always knows what they are practising.
- Six phases. The exercises are grouped so a learner can see where they are and what comes next, instead of facing one long list.
- In the browser. Setting up Python on a computer is a real barrier for a beginner, and it has nothing to do with learning to program. Running the exercises in the browser removes that step entirely.
- Progress tracking and points. Seeing progress keeps people going, especially in the early phases where everything is new.
- A free 40-minute 1:1 Zoom coaching session for each reader. Some questions need a person. Teaching taught me that the moment someone gets stuck is the moment a short conversation helps most.
I owned the whole of it: discovery, architecture, build, pricing, legal pages and launch. And the classroom keeps confirming the same idea: beginners need small steps and a fast answer.
Owning it
The motto is a little blunt on purpose. Owning something, in the sense I mean, is being able to explain it simply, answer the honest questions, and adapt when the first explanation does not work. That is what I try to do in the classroom, in the code I write, and in the products I am responsible for.
If you can explain it to kids, you own it. If you cannot yet, that is not a failure. It is the next thing to learn.