← All writing

The reason to learn programming in 2026 has nothing to do with writing code.

As someone who teaches introductory Python I have watched the evolution of the LLMs and the code that they produce, and I've even started using it on my own personal projects. My current pet-project is 100% generated by Claude and I can admit that the results exceed anything I could do on my own.

So this spring, teaching freshman Python and faced with another term of trying to grade AI code and wondering if engineering students were even going to write their own code I had to really ask myself why we were doing this? The question was real and the answer needed to be real as well.

The general discussion seems to split into "coding is going away" and "you still need code for jobs." And if I was limited to these two motivations I would throw my lot in with the second batch. At some point you do have to interact with AI generated code and you probably need to be able to figure out what's going on to be effective.

But that is not the most compelling reason for first-year students to learn to code. The most compelling reason is the cognitive development that happens as a result of learning to code.

There are two skills that are foundational to engineering problem solving. The first is the ability to develop an abstract mental model of a system that is not exactly what is happening mechanistically but is a useful framework for exploring the behavior of the system. The second is troubleshooting. Both are indispensable and both are developed significantly while learning to code from scratch.

Abstraction is the foundation of all useful models. It also happens to be foundational to a wide array of human cognitive activities. I'm not a psychologist and I'm not going to get into the weeds here, but there is a massive amount to read if that piques your interest. However what I can speak to directly is the role of abstraction in modeling and problem solving.

Before coming back to academia I spent a few years working with a talented team of folks building predictive models for pharmaceutical scientists. This type of model is used for everything from planning clinical trials to estimating first in-human dosing. The entire process is an exercise in abstraction. We made decisions every day about how to bundle information and how to determine the load bearing structures in the system. This cognitive skill is developed explicitly when learning to code. Most of us don't actually understand what's happening at a very low level when we write and execute code. We have an abstract relationship between the code we see and the results produced. It's mechanistic and useful, but ultimately not the ground truth of the system.

The second reason to learn to code is to build troubleshooting skills. It's easy to try to present this as a mechanical process. Repeat, isolate, fix, done. But what exactly happens in that isolation phase? First off you're building a mental model (abstraction) of a system that you don't fully understand. Then you're forming a hypothesis about where the problem is. Finally you are navigating this information space without a map, charging headlong into the dark forest, to try to isolate and correct that problem. This is where we learn to navigate uncertainty. This is where we learn to get unstuck when there's no One Simple Trick™ to get it all working again. So we might think we're just learning to "make the code work" but we're actually building the muscle that's going to help us solve more intractable problems in both technical and business contexts.

So we might think we're teaching Python, and students might think that they are learning Python, but in reality we are developing the complex cognitive processes that are the foundation of problem solving skills. So this spring, instead of telling my students I was going to teach them how to code, I told them I was going to change the way they think about the world and everything in it.