The New Programming
Why deep learning changed what it means to write software.

“I was dissatisfied with artificial intelligence. When I saw machine learning, I was like, this is the AI that I want to kind of spend time on. This is what's really interesting, and that's kind of what took me down those directions. Is that this is kind of almost a new computing paradigm, I would say. Because normally, humans write code, but here in this case, the optimization writes code. And so, you're creating input/output specification, and then you have a lot of examples of it, and then the optimization writes code, and sometimes it can write code better than you. And so, I thought that was just a very new kind of way of thinking about programming, and that's what kind of intrigued me about it.”Heroes of Deep Learning interview, 2019 · 1:32
The lesson
Karpathy’s core shift is to treat deep learning not as a better feature library, but as a different way to program. In traditional software, people write explicit instructions in languages like C++; in the newer setup, humans define the task through examples and an objective, and optimization finds the implementation inside a neural network’s weights123. That is why he frames machine learning as a new computing paradigm rather than just another AI technique41.
This framing changes the role of the engineer. In Software 1.0, you directly author the logic; in Software 2.0, you define the search space and training setup, then let optimization discover the behavior56. Karpathy’s practical advice is to design less of the solution by hand and leave more to optimization, especially on hard pattern-recognition problems where handcrafted rules and features tend to be brittle78.
Once you see learned systems this way, data stops being just fuel and becomes part of the program itself. Karpathy explicitly argues that the dataset is the code, because the examples and labels determine what behavior optimization will produce9. That also means the people who choose, label, and curate examples are shaping the program’s logic, which is why he says labelers are effectively programmers in these systems10.
This creates a software engineering challenge, not just a modeling challenge. If data is code, then teams need ways to version, inspect, debug, and improve datasets and learned behavior, yet Karpathy points out that the tooling for this new style is still immature compared with normal programming workflows111213. The practical consequence is that building modern AI systems requires infrastructure around data collection, labeling, and iteration, not only better architectures.
Karpathy’s examples from vision and real-world systems reinforce why this matters. His ImageNet human-baseline exercise showed that benchmark performance depends on subtle dataset structure and category design, not just abstract intelligence, which makes careful data understanding essential1415. At Tesla, the lesson became even sharper: real progress came from improving the data engine and turning failures in deployment into new training examples, showing that in learned software, iteration on data is often iteration on the program itself.
4 principles from Andrej Karpathy
Treat neural networks as learned programs
Don’t think of a model as a mysterious black box added onto software. Think of it as code that is authored indirectly: you specify the task and training setup, and optimization writes the implementation into weights.
“I was dissatisfied with artificial intelligence. When I saw machine learning, I was like, this is the AI that I want to kind of spend time on. This is what's really interesting, and that's kind of what took me down those directions. Is that this is kind of almost a new computing paradigm, I would say. Because normally, humans write code, but here in this case, the optimization writes code. And so, you're creating input/output specification, and then you have a lot of examples of it, and then the optimization writes code, and sometimes it can write code better than you. And so, I thought that was just a very new kind of way of thinking about programming, and that's what kind of intrigued me about it.”
Design less by hand when optimization can search better
On messy perception problems, handcrafting features and rules often locks you into weak assumptions. A better strategy is to define the objective and search space clearly, then let learning discover more of the solution.
“The optimization really writes the code; we only identify a region where we should search.”
Treat the dataset as part of the codebase
Examples and labels are not just inputs to a separate system; they directly determine system behavior. Review, curate, and improve datasets with the same seriousness you would apply to reviewing source code.
“…your data set is really the code.”
Build tooling for Software 2.0 workflows
If learned behavior comes from data and optimization, then debugging must include dataset inspection, versioning, and iteration loops. Teams should expect standard software tools to be insufficient on their own.
“…this is a whole new way of designing software and we need tooling for it.”
In his own words
The quotes behind the lesson, word for word from the transcripts. Numbers match the lesson above.
“I was dissatisfied with artificial intelligence. When I saw machine learning, I was like, this is the AI that I want to kind of spend time on. This is what's really interesting, and that's kind of what took me down those directions. Is that this is kind of almost a new computing paradigm, I would say. Because normally, humans write code, but here in this case, the optimization writes code. And so, you're creating input/output specification, and then you have a lot of examples of it, and then the optimization writes code, and sometimes it can write code better than you. And so, I thought that was just a very new kind of way of thinking about programming, and that's what kind of intrigued me about it.”
“Software 1.0 is things like C++.”
“The code is now written in the weights of a neural network.”
“I thought that was just a very new kind of way of thinking about programming…”
“The optimization really writes the code; we only identify a region where we should search.”
“…code—that code is not written in C++. It's written in weights of a neural network.”
“…design less, and leave more to the optimization.”
“Let's forget about all that stuff that humans have designed with all their ingenuity, and let's try to just have a single kind of blob of compute…”
“…your data set is really the code.”
“…the labelers are kind of the programmers…”
“What are the IDs for data sets?”
“…this is a whole new way of designing software and we need tooling for it.”
“…there's really nothing that helps you write the 2.0 code…”
“So basically, the ImageNet challenge is kind of a... It's sometimes compared to kind of the World Cup of computer vision. So a lot of people kind of care about this benchmark, and number— our error rate kind of goes down over time. And it was not obvious to me kind of where a human would be on the scale. And I've done a similar smaller scale experiment on CIFAR-10 dataset earlier. So what I did in CIFAR-10 is I just was looking at these 32 by 32 images. And I was trying to classify them myself. At the time, this was only 10 categories. So it's fairly simple to create an interface for it. And I think I had an error rate of about 6% on that.”
“And so I listed out all the categories, and I gave myself examples of them and so for each image I was crawling through a thousand categories and just trying to kind of a You know see? Based on the example I was seeing for each category what this image might be and I thought it was a just an extremely instructed exercise by itself I mean I was not I did not understand that like a third of imageNet was dogs and like dog species And so that was kind of interesting to see that networks spend on unique amount of time caring about dogs. I think a third of its performance comes from dogs Yeah, so this was kind of something that I did for maybe a week or two I put everything else on hold. I thought it was kind of a very fun exercise…”
Reflect
- Where in your current work are you still trying to write explicit rules for a problem that might be better specified through examples and an evaluation metric?
- If your dataset is part of the codebase, what would code review for your data look like in practice?
- Who are the hidden 'programmers' in your system—annotators, curators, prompt writers, evaluators—and how much influence do they have on behavior?
Check your understanding
Go deeper
Andrej Karpathy on Deep Learning: From ImageNet to AGI2019 · 15 min · full transcript
Andrej Karpathy on Software 2.0: Data Is the Code2017 · 18 min · full transcript
Andrej Karpathy on Software 2.0: Data Is the New Code2018 · 55 min · full transcript
Andrej Karpathy on Software 2.0: Scaling Autonomy at Tesla2019 · 33 min · full transcript