Stanford CS Professor: AI Can Code. That’s Why You Should Learn | Chris Piech
In a Nutshell
Chris Piech argues that AI's coding capabilities shouldn't discourage learning to program—instead, students must maintain self-awareness to avoid outsourcing too much of their own problem-solving growth. The most critical skill is becoming a high-contributor engineer through "time on task" and creating prototypes while using AI to teach concepts, not just generate code. Human teachers remain irreplaceable for motivation and inspiration that AI cannot provide, and the real opportunity for junior engineers lies in understanding valuable human problems rather than just technical implementation.
These notes were generated by AI and may contain inaccuracies.
Chris Piech is a professor at Stanford University who teaches large introductory computer science classes and introductory math for AI. He runs Code in Place, an online programming class with approximately 17,000 students and more than 1,000 teachers, making it the class with the most teachers in the world. The program has been running for 6 years, operating both before and after tools like Cursor and Claude Code became available.
Since implementing these AI coding tools, enrollment in Code in Place has essentially doubled, indicating increased interest in learning to code despite AI capabilities.
Piech argues that AI's ability to code, perform probability calculations, and write should not discourage people from learning these skills. The wrong answer to "Should I learn to program?" is "No." Students should still learn to formalize arguments, understand probabilistic reasoning, and program. The reasoning is that AI abilities may magnify human capabilities, and being smart in these spaces will remain important.
"We're not giving up on the next generation being smart."
Piech observes more students experiencing motivational crises than in the past. This stems from uncertainty about future contributions and job markets. Students starting 4-year programs must consider what jobs will exist in 2030 when AI is 4 years more advanced, creating significant uncertainty.
The core question students face is determining when they're genuinely benefiting from AI versus when they've given away too much of their growth. This applies across domains: if AI writes too many essays, at what point can the student no longer write an essay? If AI writes too much code, at what point can the student no longer handle the valuable architectural work?
Piech emphasizes that using AI should be fun and experimental, but requires self-awareness about whether personal growth continues alongside AI advancement. Students should care deeply about their own development.
Piech was born in Nairobi, Kenya, moved to Kuala Lumpur, Malaysia at age 12, then came to the US for university. He describes himself as a curious person who wasn't initially set on becoming a professor. When he arrived at Stanford, he had minimal coding experience but took a programming class as an elective.
His teacher created a challenge where students had to make the most wonderful things possible with just 2 weeks of programming knowledge. Piech invested 40 hours of extra work beyond normal schooling because he was so excited by the challenge. This experience led him to discover his curiosity about how people learn, ultimately choosing to become a professor.
Karel is a lovable robot used as a teaching tool that speaks Python, the programming language used throughout Code in Place. Karel operates in a world with compass directions (north, west, south, east).
During early pandemic days, Piech was preparing to teach Stanford's flagship introductory coding class when told everything would move online. Rather than just putting videos online, which would provide less educational value than Stanford's in-person experience, the team considered what unique contribution they could make.
Stanford's introductory CS education includes section leaders—people slightly older and further along in their careers who help students grow. This represents the "special sauce" of Stanford education that pure online videos couldn't replicate.
Piech reports that over 6 years of experiments with different AI dosages in Code in Place, giving students AI chatbots predictably led to dropouts and demotivation. AI provided at the wrong learning moment is demotivating. While nuanced AI applications can help learning, the contrast with human interaction is stark.
When students programming in Code in Place receive a popup offering 10 minutes with an online teacher, those who accept see their probability of completing the course increase by 10 percentage points.
Analysis of conversations showed AI responses were correct (not hallucinating for introductory programming), while humans weren't always correct. However, the human touch provides special motivation that students need, especially when facing the temptation to let AI do all the thinking.
"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."
Piech distinguishes between chatbots that answer questions well and the ability to inspire students. Teachers can show students "something really cool about probability" that ignites deep curiosity, making students think about problems throughout the day. Current chatbots don't ignite curiosity in this way—they don't proactively show users "something that is going to make your mind explode."
Teachers can provide this inspiration because they have context about where students are and where they're trying to go, allowing delicate choices of inspiring examples or challenges.
The transcript includes a promotional segment for Granola, a tool that transcribes pre-interview calls in the background without bots joining, turning them into clean notes. The system includes "Interview Prep" recipes that surface story threads and questions worth asking based on pre-interview discussions.
Piech notes that in 5-10 years many things will change, but the future has always been unpredictable. When people project what jobs will be right 5-10 years out, they consistently get it wrong.
As a PhD student around 2011-2012, Piech witnessed early self-driving car milestones. At the time, people wondered what self-driving cars meant for taxi and truck drivers. Contrary to predictions, the truck driver profession has grown at a healthy rate. Reasons include the need for human responsibility with valuable cargo and the difficulty of handling the "long tail" of unique highway experiences that comprise 1% of cases but are hard for AI to master.
Piech suggests that while fully self-driving cars will eventually exist, everyone working deeply with AI has overestimated how quickly this transition would occur.
Piech programs extensively with AI but maintains deep knowledge of programming and architecture. Without this knowledge, AI makes poor decisions that may not surface in initial prototypes but cause problems weeks later when users encounter bugs. Without understanding the architecture, developers can't help users effectively.
This illustrates the risk of outsourcing too much: at what point can you no longer handle the critical architectural work?
Piech separates programming education into two components: learning syntax (how to tell computers to do things) and learning problem-solving (breaking big problems into small pieces, setting up data to speak to algorithms, thinking about algorithms).
AI will become very good at syntax, making memorization of every command less important. The critical skill becomes problem-solving ability. Coding offers unique advantages for teaching problem-solving because it provides immediate falsifiable feedback—when logic is wrong, the program doesn't work, enabling quick iteration. Life decisions often have slow feedback cycles that prevent rapid skill development.
The key to becoming a high-contributor engineer is time on task—how much time spent actually creating things versus giving tasks to AI like Claude Code.
Piech suggests that young engineers should make many prototypes with AI assistance while asking the AI to teach the most important concepts needed to create each prototype. This approach provides lots of experience while identifying crucial concepts.
Barriers to entry have been reduced, enabling even 12th graders (18-year-olds) working with a friend to create high-quality startups with impressive codebases solving interesting problems. The real art form lies in knowing what constitutes a valuable problem to solve—what users want and what features will help them make progress.
The ability to interface between what computers can do and what humans actually need has always been a critical high-order skill that junior engineers should develop immediately rather than waiting until they're senior engineers.
Piech advocates starting from the premise that the next generation will become smart people. When looking at any subject—probability, computer science—foundational concepts exist with layers of complexity built on top. Skipping foundations makes it impossible to become smarter than previous generations.
Calculators have performed multiplication for a long time, yet kids still need to learn multiplication. The concept of multiplication remains critical even if rote calculation becomes less important. Foundations cannot be skipped, though focus can be more artful.
Piech observes that people who get most lost and demotivated about AI are sometimes those overthinking it. He had a student doing wonderful work with AI who said he doesn't think about the future of AI, allowing him to thrive. This simplicity—"I'm just going to be curious and learn"—provides a valuable perspective.
Piech now starts each day with the axiom that he wants the next generation to be smarter and will work toward that goal. AI is a tool that multiplies humans at their best: doctors who care about patients can do more, faster, more accurately; teachers passionate about student learning can go further.
Seeing young people's self-awareness, critical thinking, and blossoming provides Piech with optimism about the future.
"Chris is not giving up on you, you should not give up on yourself, either."
Piech has two children under five who will live in an awesome world where humans adapt and figure things out. They will maintain curiosities, grow their minds, and continue working toward improvement every day.
The top engineer may not be the person who knows all the code, but rather someone who can relate real-world human problems to apps, data science, and research.
"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."
"You will become smarter than you were yesterday. Start your day like that."
Keep EO in your library
Save the videos and channels worth coming back to, and find them again in one place.





