Home / Articles / Programming, taught upside down: what Lockhart said about maths applies to code, the tools that got the loop right, and why explorer coding finally starts at the right end
Programming, taught upside down: what Lockhart said about maths applies to code, the tools that got the loop right, and why explorer coding finally starts at the right end
By Dinis Cruz · 2026-10-21 · article v1.0.0 · newsroom v0.13.19 · gen-z-booklearningprogrammingeducationexplorer-codingarticle
Abstract: In the book I quote Paul Lockhart's A Mathematician's Lament: if you set out to design a system that destroys a child's curiosity about maths, you could not do better than the one we have. I think we do the same thing with programming. It is usually taught upside down: concepts first, functions and structures that make no sense yet, exercises that build nothing anyone uses. Of course people hate it. What hooks a programmer is something else: the ability to control something, to go from a thought to something that works, in a short loop. I learned that way, on a ZX Spectrum, then an Amiga and an x86, meeting each concept when a problem needed it. The tools that taught people well all had that loop: BASIC at the prompt, Visual Basic, the spreadsheet, Scratch, and the Code Clubs in the UK. And when people were taught programming with nothing useful to build, they went back to Excel, and programmed there. Now explorer coding, by voice, starts at the right end: what you want, and seeing it work. Coding is communication with a computer, and I expect people will end up reading more code, not less, and understanding variables and classes because they already need them.
In short
- We teach maths as if to make people hate it. Lockhart said so in 2002; I say it in the book.
- We teach programming the same way. Concepts first, purpose later, often nothing useful at all.
- What hooks a programmer is control. Going from a thought to something that works, in a short loop.
- The tools that taught well had that loop. BASIC, Visual Basic, the spreadsheet, Scratch, Code Club.
- Taught badly, people went back to Excel. And programmed there anyway.
- Explorer coding starts at the right end. What you want, by voice, and seeing it work.
- Coding is communication. People will read more code, not less.
Lockhart, on maths
One of the books I love is A Mathematician's Lament, by Paul Lockhart, an essay from 2002 and a book in 2009. I quote it in the book, in the chapter Connect the dots backwards. It opens with a musician who "wakes from a terrible nightmare", in which music is taught the way maths is. And it says, of maths: "if I had to design a mechanism for the express purpose of destroying a child's natural curiosity and love of pattern-making, I couldn't possibly do as good a job as is currently being done". For Lockhart, "mathematics is an art", and we teach it as if it were not.
(The memo behind this article gave his name wrongly, as it did once before; it is Paul Lockhart.)
We do the same with programming
I would say we do exactly the same thing with coding. Not every time, but usually, programming is taught upside down. You are introduced to functions, types and structures, capabilities that make no sense yet, before you have anything you want them for. Even at university, when my kids were doing more advanced work and using statistics software like SPSS, they were being introduced to concepts that, from a programming point of view, are important, but were not relevant at that moment. Of course people hate it. It does not make sense, because nothing has made it make sense yet.
If we wanted to create a system to make children, and adults, dislike programming and not understand it, we could hardly come up with a better model than the way we usually teach it. That is Lockhart's point, moved from maths to code.
What hooks a programmer
The thing about programming is the ability to control something: to make something work. The hook you get as a developer is the moment you realise that, and it is very exciting, because you can go from a thought to its execution.
I was lucky. By the time I was taught any of those concepts, I already knew how to program, on a ZX Spectrum, then on an Amiga, then on an x86. So for me the concepts were interesting, and I met each one because I needed it to solve a particular problem. I learned them by doing, which is the best way, with the feedback loop always there: the REPL, read, evaluate, print, loop. Type something, see what it does, change it. That loop is what makes it addictive, in a good way: you are solving puzzles all the time, little problems, and it is very rewarding, especially when you build tools you use yourself.
The tools that got the loop right
The places where I have seen programming taught really well all had that short loop:
- Visual programming for children. Scratch, developed at the MIT Media Lab, is a "block-based visual programming language": you snap blocks together and watch something move. Version 1.0 came out in 2007.
- Code Club, in the UK. Volunteer-run, after-school coding clubs, planned from April 2012, which joined the Raspberry Pi Foundation in November 2015. I think they did an amazing job, and that is how it should be.
- Visual Basic. Introduced in 1991, and powerful for the same reason. In Wikipedia's words, "Forms are created using drag-and-drop techniques": you drew the interface, wired it up and ran it. One of the most powerful ways to create user interfaces in a visual and interactive way.
- The spreadsheet. Change a cell and see the result. It is programming, even if nobody calls it that.
The irony: back to Excel
The other problem with teaching programming upside down is that people learn it and then do nothing useful with it, so they do not use it day to day. And guess what? They go back to Excel, where they program anyway. That is the irony. Microsoft's own researchers call Excel "the world's most widely used programming language", and in January 2021, with the LAMBDA function, "Excel has become Turing-complete."
The book makes the same point from the other side, in Everyone who can brief an agent is a developer: the persistence of the spreadsheet is evidence that software failed the people using it, because it is the one tool where they control the shape of the thing. And the citizen developer is the spreadsheet grown up. People can program. They program wherever the loop is short and the result is theirs.
Explorer coding starts at the right end
That is why explorer coding, what most people call vibe coding, is so powerful. It starts at the right end: what you want, and seeing it work. People are now coding with their voice, as in omnichannel programming, and the distance from a thought to a running thing is now very short.
And here is what I find interesting. I know entrepreneurs who have been explorer coding for a while, and I think they are now ready to understand the concepts the classroom tried to teach first. In fact they are already being exposed to them: a variable, a procedure, a method, a class, a structure. They meet them in the code the agent writes, the way I met them on the Spectrum: because a problem needed them.
Coding is communication
This is the trick we sometimes miss. Coding is communication: speaking to a computer, through an abstraction layer. Each programming language has its own sweet spot.
So I think it is going to be ironic. People will end up reading a lot more code, not less, and reading more of those primitives, because code is still a very efficient way of communicating what a system does. It may become more visual. But the core primitives will still be there, and more people will understand them, because they arrived at them from something they wanted to do.
What I hope changes
The visual, conversational way in is still crude, but it is getting better, because the connection between what you do and what happens is now much more real. I hope it means a lot more people come into development and discovery, because it is amazing: solving puzzles, little problems, all the time, and building tools you use yourself. That is the experience the classroom so often took away, and the one the book wants every reader to have.
What this does not claim
- Not every programming course is like this. Many teachers do it well; the pattern is common, not universal.
- The experiences are mine. Mine and my children's, not a study.
- Explorer coding is not a curriculum. It is a way in; the concepts still have to be learned.
- Lockhart wrote about maths. Applying his argument to programming is mine.
Where this comes from
A voice memo of 21 October 2026, related to the book's chapters Connect the dots backwards, Everyone who can brief an agent is a developer and Explorer coding, not vibe coding, and the handover. Paul Lockhart, A Mathematician's Lament, 2002. Microsoft Research, LAMBDA: The ultimate Excel worksheet function, 25 January 2021. Code Club, joining the Raspberry Pi Foundation, 3 November 2015. Wikipedia on Scratch) and Visual Basic). Related: explorer coding, the citizen developer, you are a developer, omnichannel programming, the jobs that never scaled. Written up and checked by this site's agent, newsroom.writer; the editorial responsibility is mine.
Threads
Builds on
- The citizen developer is good news: the spreadsheet grown up, the best briefs ever written, and the handover from explorers to villagers and town planners that makes them last The citizen developer is the spreadsheet grown up: the best briefs ever written, handed to villagers and town planners, carried in versioned vaults.
- Explorer coding: a better name for what people call vibe coding, what it is good for, and the handover to villagers and town planners before anyone depends on it Call it explorer coding, not vibe coding: the best thing since the spreadsheet, the best brief there is, and not ready to be in line until villagers take it.
- Omnichannel programming: briefs by voice, reviews by voice, previews on the phone, and one shared state underneath, at every stage from explorer to town planner Programming by voice, chat, phone, IDE and pull request, with one shared state underneath, at every stage from explorer to town planner. This site, counted.
- You are a developer, you just do not call it that: what every GenAI founder I know does all day, the sausage factory they never saw, and why the book may be called Generation ZX Founders Every GenAI founder I know is a developer and does not think so. They never saw the sausage factory. So the book may be Generation ZX Founders.
- The jobs that never scaled: on-demand expertise, the work before and after the meeting, and why a historian, a librarian or a consultant can now work for every project that needs one What never scaled is on-demand expertise: the before and after the meeting. Agents can now carry them, for any expert, anywhere.
Continued by
- Connect your dots backwards: a look-back interview with your LLM, for founders, to find the non-linear path, the doors that were not what they seemed, and where a startup may be hiding Let your LLM interview you about your path: find the side roads, the misread doors, what memory rewrote, and where a startup hides.
Article No. 239 · start a reading list with it
Generation ZX Founders (GenAI Edition)
Articles about Generation ZX Founders (GenAI Edition), the new book that grew out of Generation Z Developers (2018), first called Generation ZX Developers: the ideas going into it, and how it is being made. Every article tagged gen-z-book joins this list, in the order it was published.
- 1 Hired for the workflow
I think October 2026 is a moment of real opportunity for anyone willing to get properly into agentic workflows. - 2 Act as the job you want
This is the advice I end up giving most often to people I know who are looking for a job. - 3 Generation Z Developers (AI edition)
In 2018 I wrote a book called Generation Z Developers, key concepts and ideas for the next generation of developers. - 4 A book for one reader
Once the book is a graph, an agent can assemble it. - 5 A website to finish the book
To make Generation Z Developers (AI edition), the plan is a website for it, consolidating the best of everything we have built so far into the most productive… - 6 Short, punchy, and co-written with Claude
More notes for the book. - 7 Discovering the book
On the evening of 18 October the repository for the book's website was empty. - 8 A pull request by another name
This morning I am reading the printed release candidate 2 of Generation ZX Developers, with a pen. - 9 Can you sell it? Start selling what you have, however rough it is, because the point is not to sell, it is to learn
One of the most important pieces of advice I can give any founder is to start selling, now, what you have. - 10 Start a company
If you are an entrepreneur, start a company, as soon as you have a bit of revenue to put through it. - 11 You are a developer, you just do not call it that
Every GenAI founder I know is a developer, and none of them think so. - 12 Reading with a pen again
I buy a lot of books, because a book is a better medium for me than a screen, and what people call its inefficiencies are its best features:… - 13 Fund it with time
How do you fund a startup? - 14 Open source what you build, even while you are employed
People worry that if they open source their ideas, others will copy them. - 15 When the customer becomes the commodity
When you draw a Wardley map of your business, ask where your customer sits on it. - 16 The graph companies
Something I have been looking at while reading my book: some of the biggest and most successful companies in the world are graph companies. - 17 The jobs that never scaled
In the book I say that the opportunity is not only in new jobs, but in jobs we have done for a very long time that never really… - 18 Programming, taught upside down (you are here)
In the book I quote Paul Lockhart's A Mathematician's Lament: if you set out to design a system that destroys a child's curiosity about maths, you could not… - 19 Connect your dots backwards
The book has a chapter called Connect the dots backwards, after Steve Jobs's line that you can only connect the dots looking backwards.
Reviews
No reviews yet.