Stanford CS Professor: AI Can Code. That’s Why You Should Learn | Chris Piech
At a glance
- Length
- 18 min
- Channel
- EO
- Video from
- Jul 2026
- Rating
- ⭐⭐ Great video · 2/2
- Best for
- Career changers, educators, and anyone questioning whether to learn technical skills in the AI era.
What this video answers
- Should I still learn programming if AI can write code for me?
- What's the difference between AI tutoring and a human teacher?
- Why is motivation the hardest problem in education right now?
- Can I outsource coding to AI and still learn?
- What is Code in Place and why does it matter?
Why Learning to Code Still Matters When AI Can Do It
Chris Piech, a Stanford computer science professor who created the free online coding program Code in Place, makes a counterintuitive case: despite AI's growing ability to write code, now is actually the best time to learn programming. The video explores why learning fundamental skills remains valuable even as artificial intelligence handles routine tasks, and how educators should balance tool use with genuine skill development.
Piech's argument centers on motivation and long-term capability rather than job security. He acknowledges the real uncertainty students face—wondering whether skills learned today will matter in five years—but argues that outsourcing too much to AI creates a dangerous gap in your own understanding. The core message is that learning to code, write, and reason deeply isn't about competing with AI; it's about being able to think independently and solve problems when AI isn't available or when your judgment is needed to guide AI's output.
Key Moments
Key Strengths and Insights on AI Learning Tools
- Human mentorship dramatically outperforms AI tutoring alone: a single 10-minute conversation with a human teacher increases course completion rates by 10 percentage points, even when the AI advice is technically correct.
- Motivation, not knowledge delivery, is the real bottleneck in education—AI excels at answering questions but fails at inspiring curiosity or igniting genuine interest in a subject.
- Code in Place enrollment doubled after major AI tools like Claude became public, suggesting interest in learning to code is rising, not declining, despite AI capabilities.
- Overreliance on AI for problem-solving can degrade your own architectural judgment; Piech shares how using AI tools without deep knowledge led to bugs that only surfaced weeks later when real users engaged with the product.
- The "special sauce" of education is a mentor figure who knows where you are and where you're headed, then poses exactly the right inspiring challenge—something current chatbots cannot do without context.
- AI-only education strategies have been tested and consistently show higher dropout rates, suggesting that dumping learners into an AI environment without guided progression actively demotivates them.

Who Should Watch This Video
This video is essential for anyone feeling uncertain about whether to invest time in learning technical skills while AI tools are advancing rapidly. That includes career-changers questioning whether a coding bootcamp makes sense, parents wondering what their children should study, and working professionals deciding whether to upskill. It's also valuable for educators, trainers, and anyone designing learning platforms—Piech's research on what actually motivates learners offers concrete pushback against the assumption that AI tutors are a silver bullet.
The verdict: watch if you're questioning the point of learning to code or other foundational skills in an AI era, or if you're designing educational content and want evidence-based insights on why human connection and inspiration matter more than ever.
Frequently Asked Questions About Learning Code Amid AI Advances
Should I still learn programming if AI can write code for me?
Yes, according to Piech. Learning to code gives you the judgment to guide AI, catch architectural mistakes before they become costly bugs, and think independently. The question isn't whether AI can do it—it's whether you want to understand what it's doing and have the skills to take over when needed.
What's the difference between AI tutoring and a human teacher?
Both can deliver correct information, but human teachers inspire through context and timing—they know your specific situation and can pose a perfectly calibrated challenge that sparks genuine curiosity. AI tutors answer questions but don't ignite that drive to learn. Piech's data shows human mentorship increases course completion far more than AI alone.
Why is motivation the hardest problem in education right now?
Students face genuine uncertainty: if you're starting a four-year program, you must predict what jobs will exist in 2030 when AI is even more advanced. That uncertainty is demotivating. Piech argues the solution isn't to give up on teaching depth—it's to help learners understand that being smart in technical areas will still matter, and to inspire them with the challenge itself rather than just the career promise.
Can I outsource coding to AI and still learn?
Yes, but strategically. Piech recommends building your foundations first, then learning how to work with AI once you understand the basics. If you outsource before you have foundational knowledge, you risk reaching a point where you can no longer solve problems independently. Self-awareness about your own growth is key.
What is Code in Place and why does it matter?
Code in Place is a free online introductory programming course created during the pandemic with a 1:10 teacher-to-student ratio (over 1,000 teachers for roughly 17,000 students worldwide). It's significant because it proves that world-class education can scale without AI—by using human mentors—and it shows that enrollment has grown, not shrunk, since AI tools became mainstream.
What New Course Is Piech Launching?
He's launching Probability for Artificial Intelligence (pai.stanford.edu), a free Stanford course on the mathematical foundations behind AI systems. Like Code in Place, it's free and designed to make advanced education accessible beyond Stanford's campus.

Key Terms
- Code in Place
- A free online introductory programming course with a high ratio of human teachers to students, designed to make quality coding education accessible globally.
- Motivational crisis
- A state of uncertainty and lost drive that learners experience when they're unsure whether their skills will remain relevant as technology advances rapidly.
- Foundational knowledge
- Core understanding of how systems work, which allows you to make good decisions and catch errors even when using AI tools to speed up execution.
- AI tutoring
- Using chatbots or language models to answer questions and explain concepts, distinct from human mentorship which provides context-aware guidance and motivation.
- Architectural judgment
- The ability to design the overall structure and flow of a program or system, rather than just writing individual lines of code.
- Outsourcing thinking
- Relying too heavily on AI to make decisions or solve problems, which can lead to a loss of your own problem-solving ability over time.
Sources: Code in Place · Motivational crisis · Foundational knowledge · AI tutoring · Architectural judgment · Outsourcing thinking — definitions cross-referenced with Wikipedia
Video by EO on YouTube. If you enjoyed it, please subscribe to their channel and show your support for the great video.
Description
Granola is the AI notepad for professionals in back-to-back meetings. New users get 100% off their first month → https://granola.ai?via=KUzb8Nm
Chris Piech, a Stanford computer science professor, created Code in Place to help thousands of people learn programming for free. Here, he makes the case for why you should still learn to program when AI can already do it, why motivation is the hardest problem in education right now, and the one axiom he thinks we owe the next generation.
He's also launching Probability for Artificial Intelligence (pai.stanford.edu), a free Stanford course on the math behind AI.
*In this episode, we cover:*
00:00 Intro
02:28 Can AI Make You Want to Learn?
07:48 Granola, the AI meeting assistant
08:56 Why Now Is the Best Time to Learn Coding
14:33 Start With This Axiom: The Next Generation Will Be Smarter Than Us
EO is a global media brand for builders.
We tell the defining stories of founders shaping the future: people who see what others don’t and build what they believe in.
Subscribe to EO: https://www.youtube.com/@eoglobal
EO Magazine: https://www.eomag.io
Instagram: https://www.instagram.com/eostudio.official/
X: https://x.com/eostudi0
LinkedIn: https://www.linkedin.com/company/eo-studio
EO Studio: https://eo.team/
Business inquiries: partner@eoeoeo.net
Build what you believe in.
Video transcript Accessibility
A full written transcript of this video, provided for accessibility. Select any timestamp to jump the video to that moment.
Hi, you know, I'm Chris Peach. I'm a professor here at Stanford University. I teach some large intro to computer science classes, some intro to math for AI. Code in Place, if people don't know it, it's an online class where you can learn to program. And the special thing about Code in Place is that it's the class in
the world with the most teachers, and there's about 17,000 students and more than 1,000 teachers. We've been doing Code in Place for 6 years, so we did Code in Place before Cursor and Claude Code and Code in Place after. A few observations. One, our enrollment basically doubled. Oh my gosh, all these
people want to learn how to code. You can expand the question. You can say, "Should I learn to program?" You can also say, "Should I learn probability?" Like AI [music] can code, but AI can also do probability. Should I learn to write? AI can write. I think the wrong answer would be, "No, no, no."
We're not giving up on the next generation being smart. Yes, you should learn how to formalize an argument. Yes, you should learn the depth of probabilistic reasoning. And yes, you should learn how to program. If AI is able to do those things, your abilities may be magnified. But I imagine in the
future, it will still be important to be smart in those spaces. I'm seeing [music] more people with a motivational crisis than I have in the past, and that makes sense. There's more uncertainty in the world. You know, you can think about, "What can I contribute with AI of 2026?" But I think students are faced
with the much harder problem of thinking about, "Well, if I'm starting a 4-year program, I have to think about what jobs are going to exist in 2030 when AI is 4 years more advanced?" And And that's a lot of uncertainty for [music] students, and I empathize with this quite a lot. I
think naturally that leads to some motivational problems. When am I actually getting something out of AI and when have I given away too [music] much of the growth? I suppose, if I start outsourcing, [music] at what point will I no longer be able to do that? Like that really critical piece. I
think all students have felt like this. Like if you have AI write too many of your essays, at what point are you no longer able to write an essay? If you have AI write too much of your code, at what point can you no longer do that valuable piece of the architecture? So, I suppose that's the part where like
I think it's fun to use AI. I think people should be playing around with it, but you should be self-aware. [music] And you should be self-aware of like are you also growing alongside the AI? And you should care so much about your own personal [music] growth. I was born in Nairobi, Kenya. When I was
12, I moved to Kuala Lumpur, Malaysia. I ended up coming to the US for university. I was just a curious human. I wasn't uh set on being a professor from day one. I just like learning and I liked interesting problems. And when I came to Stanford, I I'd done a little bit of coding, but I I really didn't
know how to program. But like I had to fill an elective, so I just had to take a class. And I was like, okay, I'll do the the programming class. And my teacher did the most wonderful thing. They said, at this point I'm going to have a challenge. Everyone in class, go make the most wonderful
things with what you've learned in the first 2 weeks of programming. And I found myself able to put like 40 hours of extra work beyond my normal schooling into this challenge because I was so excited. Uh and then eventually I discovered uh that I was so curious about how people learned, and I decided
professor was the right thing for me. >> So, Karel speaks this thing called Python, uh which we're going to be using as our programming language throughout the course. So, Karel is our lovable robot. And Karel is in a world we think of the world as kind of having a north, west, south, and east, [music] and having
compass directions. Turn right, Karel. Turn left. And then turn left. And then turn left. I'm now located. Turn right. >> It's the class in the world with the most teachers. There's one teacher for every 10 students and there's about 17,000 students and more than 1,000 teachers. So, what problem was I trying
to solve? Let's go back in time. It's early days in the pandemic. I'm about to teach Stanford's flagship intro to coding class and I'm been told that everything's going [music] to be online. And in this moment, we're thinking the world is suffering while we're putting the class online, is
there something that we can also do to help the world? We can just put our videos online and we thought people might get a little bit out of it. But we know that it would be a lot less than what our Stanford students get because our Stanford students get the special sauce of Stanford education. And
the special sauce of Stanford education for intro CS is you get a section leader. You get somebody who's just a little bit older than you, a little bit further along in their career, who's going to take time to help you grow. One of the common misconceptions just thinking that AI tutors will solve
everything. We basically have AI tutors already but that isn't moving the needle in the way people expected. [music] So, over the last 6 years, so we've now done this six times, we've tried a lot of different experiments where we gave people different dosage of AI and we have learned something very surprising.
If we give people AI and just like here's a chatbot, use it to learn, predictably people will drop out. People get demotivated. It is demotivating to have AI thrown at you at the wrong moment of your learning. We have found very nuanced ways where we can use AI that actually helps people learn. But if
you contrast that with humans. So, if I throw AI at you, you're probably going to become a little bit demotivated statistically. But what happens if I throw a human at you? Imagine you're just programming in code in place, you might get a pop-up and it says, "Hey, there's a teacher
online and they would like to spend 10 minutes with you. Do you want to talk to them?" If you hit yes, your probability of completing the course goes up 10 percentage points. So, you must be thinking, "Oh, the humans must be saying the right things and the AI must be saying the wrong things." We've looked
at these conversations, the AI was correct. It wasn't hallucinating not for intro programming and the the humans weren't always correct. But the human touch is special. It's motivating and I think we all need motivation right now. Everyone needs something to convince them I'm not going
to make Claude do all the thinking for me. Like to actually do the thinking yourself takes extra energy. Crown jewel of education has always been motivation and it's a lot more motivating for me to say [music] I care about you being a smart person. I'm not giving up on you being a smart person
this time of AI. >> [music] >> Um let's work on your foundations and then when you're done with your foundations, I'll teach you how to code with [music] AI. That works so much better. When I look at chatbots, I think they do a good job [music] of answering my question. But one challenge I would pose
to anybody thinking about how to make these work better for education is how do you get it to inspire? [music] Sometimes I will inspire my students in a deep way. And it could be like you come into my office and be like, "Hey, do you want to see something really cool about probability?" And I just show them
something really neat and they weren't even thinking about that. That wasn't the question they came in with. But then they they feel that like love and like that that inspiration. And as [music] I said, if I can flip the switch of getting the student so curious that they can't help but learn. Like the rest of
the day all they can think about is the problem that I just posed to them or that cool thing I showed them. If that curiosity gets ignited, uh then I feel like they'll get there. And when I look at current chatbots, [music] they're not igniting curiosity that much. It's it's not like you never
show up to ChatGPT [music] and be like, "Hey, do you want to just see something that is going to make your mind explode [music] that will like, you know, pull you in?" Now, as a teacher, I can do that because I have some context on my students. I know largely where they are and largely where they're trying to go. So I
can be very delicate [music] in the choice of the inspiring example or the inspiring challenge to pose to my students. If you just think an AI tutor will solve the clarity problem, you might miss at the bigger piece of the puzzle. And I feel like if we leverage this, we can have a nicer world.
>> The deepest understanding doesn't come in the moment. It's built beforehand. Same goes for us. Before the main interview, we always do a pre-interview call. And Granola quietly transcribes it in the background. [music] No bot ever joining, turning it into clean notes. So, we built our own recipe
for this. It's called Interview Prep. We wrote the prompt once with everything we want before a shoot, and now it's one click every time. Then, minutes before the cameras roll, we run [music] it right on that pre-interview call. In seconds, it surfaces the story worth telling, [music] the threads worth
pulling, and the questions worth asking. It's like having the whole transcript in your head without ever opening it. So, we sit down already knowing where it should go. It's not a generic checklist. Every line [music] is drawn from the real discussion we just had, shaped by exactly how we like to prep.
Less time scrambling to remember, more time fully present in the room. Turns out, the more you prepare, the more you understand. Try Recipes today. New users get 100% off their first month at the link in the description. >> I'm seeing more people with a motivational crisis than I have in the
past, and that makes sense. There's more uncertainty in the world. You know, you can think about what can I contribute with AI of 2026, but I think students are faced with a much harder problem of thinking about, well, if I'm starting a 4-year program, I have to think about what jobs are going to exist in 2030
when AI is 4 years more advanced. And And that's a lot of uncertainty for students, and I empathize with this quite a lot. In 5 to 10 years, many things will change. The future has always been unpredictable. It's always been the case that if you ask people to project what jobs will be the right jobs
5 to 10 years, people always get it wrong. Here's an interesting anecdote, though. So, when I was young, I'm old man now, but when I was young and I was in my PhD, it was around the time that one of my now colleagues was [music] making some of the first major milestones in self-driving cars. And
this is back in like 2011, 2012. And at that moment, you would see this car drive and [music] you'd think, "Oh my god, what does it mean to be a taxi driver or what does it mean to be a truck driver?" But, in fact, what happened is the truck driver profession has been growing at a very healthy rate.
Um now, I don't know what the future holds for truck drivers. Maybe one day we'll come to an inflection point. But, there is a lot of reasons that people underestimated. They underestimated it like, "Well, if you have valuable cargo, you need a person who's responsible." Or the long
tail sort of experiences. There's always something different happening on highway. 99% of experiences can be the same, but like that 1% of things that are different, it's so hard to have a AI master all of them. I think one day eventually we'll have fully self-driving cars and we'll live in a world where all
our cars are driven by an AI system. But, what I was surprised about was how grossly we overestimate how quickly we'd get there. I think everyone who's worked deeply with AI has had this experience of by outsourcing a lot of thinking to AI, I am getting more separated from problem-solving myself. A good example
right now is >> [music] >> I program with AI a lot, but I happen to know a lot about programming and architecture. And if I don't know a lot about programming and architecture, AI will start to make some poor decisions, which I might not experience the first time I make a prototype, but like five
weeks down the line when students are actually using my thing, they might start to hit weird bugs. And if I don't understand the architecture, I can't help them. I suppose if I start outsourcing, at what point will I no longer be able to do that? Like that really critical piece. Uh I think all students have felt like
this. Like if If have AI write too many of your essays, at what point are you no longer able to write an essay? If you have AI write too much of your code, at what point can you no longer do that valuable piece of the architecture? So, I suppose that's the part where like I think it's fun to use AI. I think
people should be playing around with it, but you should be self-aware. And you should be self-aware of like, are you also growing alongside the AI? And you should care so much about your own personal growth. When you're learning how to program, >> [music] >> largely you can separate it into two
pieces. One piece is you're learning the syntax of how do we tell computers to do things, and the other thing you're learning is basically problem-solving. Like, how do you take big problems and break them down into small pieces? How do you set it up so that data can speak [music] to algorithms? How do you
think about algorithms? So, I'm going to say AI is going to get really, really good at just the syntax. It's less important in the future that you've memorized every command. [music] It's probably more important that you know how to problem-solve. So, while you're learning to program, really focus on
that problem-solving ability. There's one thing about coding that's special. You get immediate falsifiable feedback. Like, if your logic is wrong, your thing doesn't work, and you get to see that, and you get to iterate quickly. Whereas if you apply problem-solving to life, you could make
a poor decision, but the feedback cycle is so slow that you don't get to practice getting better and better at making decisions. So, there's a couple things about coding that makes it particularly good at teaching how to problem-solve. The question, how do you become like a really high contributor
[music] engineer? You might not find my answer that surprising, but it's like it's time on task. It's like, how much time are you spending actually creating things? And I'm going to separate you creating versus you giving it to Claude code. Now, by the way, you know what I would do if I was a young person? I
would make a lot of prototypes with Claude code, and I'd say, "Claude code, teach me all the most important things that you you in order to create this." And I would iterate that way, and I'd get lots of experience, so I can try and figure out what are the most important concepts. I'll give your young engineers
a particular challenge. As I said, it's a confusing time, but there's an opportunity that didn't exist before. One of the things that's happened is barriers to entries have been cut. You could be uh 12th grader, so an 18-year-old with a friend, you might be able to make a high-quality
startup. The two of you could make a pretty impressive code base that solves an interesting problem. There is a real art form to knowing what is a valuable problem to solve. Uh and I think more and more juniors [music] engineers get to engage with that art form. Like what is worth actually making? What do users
want? What's the feature that will help them make progress in whatever their problems are? So that ability to interface between what are computers able to do and what do humans actually need has always been a critical high-order skill, and I think if I were a junior engineer, I would start working
on that skill now. I wouldn't wait till I was a senior engineer. If you start with the premise that my children will become smart people, and your children will become smart people. If you don't have children, then maybe your nephews and nieces will become smart people. You start from the premise
that the next generation will be filled with people who are smarter than we are. Then you're like, "Okay, how do we get them to that point?" And then you look at any subject, probability, computer science. And when you look at any subject, there's often >> [music] >> foundational concepts, and then you'll
have layers of complexity built on top of it. If you expect them to become smarter than you are, it's really hard to skip the foundations. And one way of thinking about that is we've had calculators do multiplication for a long time. Kids still need to learn multiplication. Now, there's a subtle difference. The concept
of multiplication is so critical, but actually knowing how to do the rote, you know, if I ask you like, "What's 13 * 7? Go [music] quick." That's not as important as just knowing what is multiplication. We can't skip the foundations, but you can maybe be [music] more artful about what you focus on. I
kind of take it as an axiom that I'm not giving up on the next generation. Honestly, the people I've seen get most lost and most demotivated in this mode of AI are sometimes the ones who are overthinking it. I had a student, he was just doing such wonderful things. He was using AI, he
was solving problems, he was learning amazing things. I asked, "Hey, wonderful student, like what are you thinking about?" And he says, "I actually don't think about it. I don't really think about the future of AI, and that allows me to thrive." And that gave me pause. I think about AI
all the time. I feel like I think about AI 10 times a day. And then the simplicity of like, "No, I'm just going to be curious and learn." Since that day, I start my day with the axiom. I don't ask why I care about the next generation be smarter, I take it as a truth. I want this, and I will work
towards it. It's a tool, and it will multiply humans. So, when humans are at our best, we can use this tool to multiply us. Like the doctor who really cares about their patient now has a tool that they can do more, faster, more accurately. The teacher who really cares about their
students, who is passionate about them learning, they can go further with their students, and they can do more. Also, I get to see young people all the time. And I would say that gives me inspiration. Seeing their self-awareness, how critical their thinking, uh seeing them blossoming, it
gives you optimism. If I was a young person right now, the most valuable thing is that you have the self-awareness. You should also have the goal that I will become smarter. Chris is not giving up on you, you should not give up on yourself, either. I have two kids under five. >> [music]
>> And you know what? They're going to live in an awesome world. Like we're going to adapt, we're going to figure things out. They're going to still have curiosities, they're going to still grow their minds, and we're [music] going to keep every day working towards that. The top engineer might not be the person
who knows all the code. Maybe the top engineer is a person who can relate the real world human problems >> [music] >> into the world of apps, into the world of data science, and into the world of research. >> [music] >> So, go make stuff. Make stuff that people use, make stuff that people love,
and in that process of iteration, you have an opportunity to become excellent at coding and excellent at problem solving. Just take Axioms. [music] You will become smarter than you were yesterday. Start your day like that.
How videos are chosen here
Every video on Helicopterstour.com is hand-picked and reviewed by Justin — nothing is added automatically. Each one gets an original written guide and an honest rating: ⭐ 1 out of 2 means a good video worth your time, and ⭐⭐ 2 out of 2 means a great one we would recommend to anyone. The videos belong to their creators — every page links back to the original channel so you can subscribe and support them.
