Oct. 28, 2026
I believe that every person should learn to code, at least at a basic level.
Even if one’s job does not involve computers.
Even now, in the mid-2020s, when LLMs are about 200 million times better at coding than humans (at least, in terms of speed and accuracy of basic coding tasks).
In fact, it might be more important now than ever.
Obviously, it’s not a moral imperative or an absolute necessity to survive or anything like that.
But I do think everyone ought to learn to code in the same way that everyone ought to eat vegetables.
In the past, a lot of people made similar arguments on the basis of employability, although I don’t know anyone currently doing that.
Incidentally, I do think coding could help you get a job in the modern era, but only in the same sense that learning to do math, to write, to speak multiple natural languages, etc., could help in a sort of diffuse way.
It’s not necessarily about employing the skill as part of your work tasks; it’s about understanding more of how the world works.
More generally, it’s about learning to think better.
That’s something we all need, and not just in our work lives.
I’m aware that many others have previously argued for this same conclusion. Often, their arguments relate to how learning to code makes you more well-rounded, improves your logic and problem-solving abilities, etc.
To be clear, I agree with all of that.
For example, learning to code is analogous to learning a new language. (In my view, that’s LITERALLY what it is.)
I know I would be a more effective person in general if I could speak multiple human languages fluently. I would be able to do more in the world, and I would understand more of what I experienced.
It’s not a moral imperative on those grounds, but it would definitely be good for me.
But my core argument for why everyone should learn to code is different…
I believe everyone should learn to code because coding offers a highly flexible way to create digital representations of concepts, which allows us to test or demonstrate that we have established deep understanding.
I previously argued that much of human learning is shallow.
This isn’t because we’re lazy, though; it’s because our brains are ruthlessly efficient…
And the most efficient way to learn is to seek minimum viable understanding—that is, just deep enough that (1) the concepts hold together in our minds, and (2) we can apply the knowledge successfully most of the time (or enough of the time).
Although I’ve given multiple examples of what I mean by shallow vs. deep understanding (e.g., here, here, and here), I haven’t clearly articulated a definition of deep understanding, at least not beyond suggesting it’s something more than shallow understanding.
I know others have used this term before, but here’s what I mean…
Deep understanding involves developing a sophisticated mental model of a concept or subject, including…
- Intuitive, even visual, representations of concepts in one’s mind.
- Multidimensionality—concepts can be described in multiple, complementary ways.
- Coherence of related concepts in a semantic web, including causal chains.
- Independence from textbook definitions or other external sources or explanations.
To me, the last bullet is the linchpin.
Having a mental representation of a concept that exists separately from the sequence of keywords in the textbook definition is what enables behaviors like:
- Writing your own definition of a term
- Explaining a concept in your own words
- Solving novel problems without relying on flowcharts or decision rules
- Making judgments without relying on heuristics or checklists
- Running mental simulations
- Making predictions
I think the main limitation of my explanation is the “mental model” or “mental representation” part. Terms like these are popular and useful in psychology, but they’re difficult to explain or define.
It’s also hard to know exactly how solid a mental model is without creating some substantial version of it.
That’s why we need to instantiate our ideas with physical models, verbal explanations, digital representations, etc. If the material version functions correctly, that’s a good sign that the mental representation is on target as well!
And that’s why I think everyone should learn to code: We can use code to create digital representations of our mental models, and those can be directly tested.
Critically, this only works if the code is built “from scratch,” directly based on one’s own mental model.
As I’ll demonstrate in subsequent posts, computer programs are ideal ways to check whether things work or not (e.g., code either runs or breaks; output is either correct or incorrect). I also find them more flexible and convenient than other types of instantiations, but maybe that’s personal preference.
Anyway, this post is getting too long, so I’m stopping here. I’ll start exploring examples tomorrow.
