Skip to main content Skip to secondary navigation
Main content start

Stanford’s Code in Place introductory programming course offers a new model for large-scale interactive learning

Supported with the power of volunteer instructors, Code in Place has reached about 30,000 learners across the world.
Educational event banner, "Code in Place 2024".
In its fourth offering, Mehran Sahami and Chris Piech continue to build upon the impact of Code in Place.

What began as an online class on coding during the pandemic has morphed into an effective model for creating learning opportunities worldwide, outside of a formal classroom.

First launched in 2020, the six-week Code in Place course teaches fundamentals from Stanford’s flagship introduction to Python programming course, CS106A. The unique course design facilitates instruction entirely online with six weeks of Stanford-led lectures, assignments, and smaller-group sections led by volunteer teachers. After repeat versions in 2021 and 2023, Code in Place is back this spring for its fourth iteration. 

Chris Piech, assistant professor of computer science at Stanford Engineering, co-created the project with colleague Mehran Sahami, professor and the Tencent Chair of the Computer Science Department. While Stanford professors teach the main lectures, volunteer teachers from across industries and geographies lead smaller sections, which have about 10 students each. 

Piech believes this community-powered teaching and learning model can be open-sourced. His research on this type of course design has found that people who are teaching the material are better able to learn it and have more fun doing it than other approaches to learning. Foothill College, also in the San Francisco Bay Area, is now using the Code in Place platform to teach one of its courses.

This year, Code in Place lectures will be available in Spanish; there will be better error messages in the instruction to help guide students; and learners will get feedback on the style of their code – not just the accuracy. In addition to the usual guided instruction option, the course will also be offered in a self-guided format that can be done on one’s own schedule.

For section leader Sara Thomas, last year’s experience allowed her to teach a subject she previously learned herself as a college student in Canada. Thomas, a third-year double major in computer science and environmental science at the University of Toronto Scarborough, believes Code in Place is building a global community for people with similar interests where there is a safe space to ask questions and learn from others.

“A lot of times, especially in computer science, you can learn on your own,” Thomas said. “But it’s kind of hard to know what the solution is or if yours is good, and there’s probably a better way of doing it.”

So far, more than 30,000 learners have gone through Code in Place, which has had the support of about 3,000 section leaders. Discussion forums allow learners to ask questions 24/7 and peers all around the world can help answer.

Even as advances in artificial intelligence increasingly automate processes, Piech believes coding is still as relevant as ever because learners will gain a thinking framework that is also applicable to AI. That programming foundation could help one better use generative AI tools like ChatGPT, understand its ethics, or even program the next big AI technology, Piech explained.

“Curiosity has brought a lot of people to their first step into coding,” Piech said. “Once you take a couple steps, you realize there’s a sheer exhilaration turning something that’s just in your mind into something that you can visualize and share with your loved ones.”

Code in Place’s next guided session is April 22 through May 31. The course is free. Applications for volunteer section leaders are closed. Learner applications are due by Friday, April 12. The Code in Place course is made possible, in part, by the generous support of Carina Initiatives.

Related Departments