EO StudioStanford CS Professor: AI Can Code. That’s Why You Should Learn | Chris Piech
EVERY SPOKEN WORD
20 min read · 3,616 words- 0:00 – 2:28
Intro
- CPChris Piech
Hi, you know, I'm Chris Piech. 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'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 six 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 wanna learn how to code. You can expand the question. You could say, "Should I learn to program?" You can also say, "Should I learn probability?" Like AI 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 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 four-year program, I have to think about what jobs are gonna exist in 2030 when AI is four years more advanced. And, and that's a lot of uncertainty for 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 much of the growth? I suppose if I start outsourcing, 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, 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. [instrumental music] I was born in Nairobi, Kenya. When
- 2:28 – 7:48
Can AI Make You Want to Learn?
- CPChris Piech
I was 12, I moved to Kuala Lumpur, Malaysia. Ended up coming to the US for university. I was just a curious human. [laughs] 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'd, 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 gonna have a challenge. Everyone in class go make the most wonderful things with what you've learned in the first two 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 lives in a world. We think of the world as kind of having a north, west, south, and east, and having compass directions. Come on, Karel, turn left. And then turn left, and then turn left. And now we can 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've been told that everything's gonna 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 gonna take time to help you grow. One of the common misconceptions is 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. So over the last six 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 gonna 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'd like to spend 10 minutes with you. Do you wanna 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. [laughs] 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 gonna 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, "I care about you being a smart person. I'm not giving up on you being a smart person this time of AI. Um, let's work on your foundations, and then when you're done with your foundations, I'll teach you how to code with AI." That works so much better. When I look at chatbots, I think they do a good job 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? 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 wanna see something really cool about probability?" And I just show them something really neat. And they weren't even thinking about it. That wasn't the question they came in with, but then they, they feel that, like, love and, like, that pa- that inspiration. And as I said, if I can cl- 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 to them. If that curiosity gets ignited, uh, then I feel like they'll get there. And when I look at current chatbots, they are not igniting curiosity that much. It's, it's not like you never show up to ChatGPT and it's like, "Hey, do you wanna just see something that is going to make your m- mind explode that will like, you know, pull you in?" Now, as a teacher, I can do that because I have, um, context on my students. I know largely w- where they are and largely where they're trying to go, so I can be very delicate 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 it, the bigger piece of the puzzle. And I feel like if we leverage this, we can have a nicer world.
- 7:48 – 8:56
Granola, the AI meeting assistant
- EHEO Studio Host
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, 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 it right on that pre-interview call. In seconds, it surfaces the story worth telling, 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 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 one hundred percent off their first month at the link in the description.
- 8:56 – 14:33
Why Now Is the Best Time to Learn Coding
- CPChris Piech
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. Uh, you know, you can think about what can I contribute with AI of twenty twenty-six, but I think students are faced with a much harder problem of thinking about, "Well, if I'm starting a four-year program, I have to think about what jobs are gonna exist in twenty-thirty when AI is four years more advanced." And, and that's a lot of uncertainty for students, and I empathize with this quite a lot. In five to ten 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 five to ten years, people always get it wrong. Here's an interesting anecdote, though. So when I was young, I'm an old man now, [laughs] but when I was young and I was in my PhD, it was around the time that one of my now colleagues was making some of the first major milestones in self-driving cars, and this is back in, like, two thousand eleven, two thousand twelve. And at that moment, you would see this car drive and you'd think, "Oh my God, what does it mean to be a t- 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 underestimate, 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. Ninety-nine percent of the experiences can be the same, but, like, that one percent 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 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 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, uh, 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? Uh, if you have AI write too much of your code, at what point can you no longer do that valuable piece of the architecture? Um, 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, 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? Um, how do you set it up so that data can speak to algorithms? How do you think about algorithms? So I'm gonna say AI's gonna get really, really good at just the syntax. It's less important in the future that you've memorized every command. 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 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 gonna 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 did 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 a 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 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. [keyboard clacking] If you start with the premise
- 14:33 – 18:08
Start With This Axiom: The Next Generation Will Be Smarter Than Us
- CPChris Piech
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 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 to 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 times 7? Go quick," that's not as important as just knowing what is multiplication. But you can't skip the foundations, but you can maybe, uh, be 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 like you need 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 gonna 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 being 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 they're thinking, I-- 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. [laughs] I have two kids under five, and you know what? They're gonna live in an awesome world. Like we're gonna adapt. We're gonna figure things out. They're gonna still have curiosities. They're gonna still grow their minds, and we're gonna s- 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 into the world of apps, into the world of data science, and into the world of research. 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. You will become smarter than you were yesterday. Start your day like that. [gentle music]
Episode duration: 18:09
Install uListen for AI-powered chat & search across the full episode — Get Full Transcript
Transcript of episode g-CD1d0q01I