This material is in early beta: over 300 suggestions and corrections are waiting to be folded in, some quite significant. Changes should be in place by July 2018, at which times printed copies and downloadable electronic copies will be made available.


Hundreds of grassroots groups have sprung up around the world to teach programming, web design, robotics, and other skills to free-range learners outside traditional classrooms. These groups exist so that people don’t have to learn these things on their own, but ironically, their founders and instructors are often teaching themselves how to teach.

There’s a better way. Just as knowing a few basic facts about germs and nutrition can help you stay healthy, knowing a few things about psychology, lesson design, inclusivity, and community organization can help you be a more effective teacher. This book presents evidence-based practices you can use right now, explains why we believe they are true, and points you at other resources that will help you go further. Its four sections cover:

  • how people learn;
  • how to design lessons that work;
  • how to deliver those lessons; and
  • how to grow a community of practice around teaching.

Parts of this book were originally created for Software Carpentry’s instructor training program, which has been run over a hundred times during the past six years. All of it can be freely distributed and re-used under the Creative Commons - Attribution 4.0 license: please see to download a digital version, to purchase a printed copy at cost, or to contribute.

Who You Are

Section 6.1 explains how to figure out who your learners are. The five I had in mind when compiling this book are:


trained as a librarian, and now works as a web designer and project manager in a small consulting company. In her spare time, she helps run web design classes for women entering tech as a second career. She is now recruiting colleagues to run more classes in her area using the lessons that she has created, and wants to know how to grow a volunteer teaching organization.


is a professional programmer with two teenage children whose school doesn’t offer programming classes. He has volunteered to run a monthly after-school programming club, and while he frequently gives presentations to colleagues, he has no experience designing lessons. He wants to learn how to build effective lessons in collaboration with others, and is interested in turning his lessons into a self-paced online course.


is an undergraduate in robotics who is thinking about becoming a full-time teacher after she graduates. She wants to help teach weekend workshops for undergraduate women, but has never taught an entire class before, and feels uncomfortable teaching things that she’s not an expert in. She wants to learn more about education in general in order to decide if it’s for her.


is a professor of computer science whose research area is operating systems. They have been teaching undergraduate classes for six years, and increasingly believe that there has to be a better way. The only training available through their university’s teaching and learning center relates to posting assignments and grades in the learning management system, so they want to find out what else they ought to be asking for.

These people have a variety of technical backgrounds and some previous teaching experience, but no formal training in teaching, lesson design, or community organization. Most work with free-range learners and are focused on teenagers and adults rather than children; all have limited time and resources.

Chapter D describes different ways to use this book. (That discussion is delayed to an appendix because it relies on some of the ideas later chapters introduce.) We expect our made-up learners to use this material as follows:


will take part in a weekly online reading group with her volunteers.


will cover part of this book in a two-day weekend workshop and study the rest on his own.


will use this book in a one-semester undergraduate course with assignments, a project, and a final exam.


will read the book on their own in their office or while commuting, wishing all the while that universities did more to support high-quality teaching.

What to Read Instead

If you are in a hurry, or want a taste of what this book will cover, [Brow2018] presents ten evidence-based tips for teaching computing. You can download the paper, or read it online, on the PLoS website.

I also recommend:

  • The Carpentries instructor training, for which most of the first half of this book was originally developed.
  • [Lang2016] and [Hust2012], which are short, approachable, and connect things you can do right now to the research that backs them.
  • [Majo2015] and [Broo2016]. The first catalogs a hundred different kinds of exercises you can do with students; the second describes fifty different ways that groups can discuss things productively. (These books can be used on their own, but I think they’ll make more sense once Huston or Lang have given you a framework for understanding them.)
  • [DeBr2015], which conveys a lot of what is true about educational by explaining what isn’t, and [Dida2016], which grounds learning theory in cognitive psychology.
  • [Gree2014] and [McMi2017]. These two short books explain why so many attempts at educational reform have failed over the past forty years and how for-profit colleges are exploiting and exacerbating the growing inequality in our society.
  • [Guzd2015a] and [Hazz2014], which are the most useful academic books I’ve found about teaching computing.
  • [Pape1993] and [Watt2014]. The first presents an inspiring vision of how computers could change education; the second is a collection of talks describing and critiquing what we’ve done instead.
  • [Brow2007] and [Mann2015], because you can’t teach computing well without changing the system in which we teach, and you can’t do that on your own.


A lot of my stories aren’t true, but this is a true story

When I started teaching people how to program in the late 1980s, I went too fast, used too much jargon, and had no idea how much my learners actually understood. I got better over time, but still felt like I was stumbling around in a darkened room.

In 2010, I rebooted a project called Software Carpentry that teaches basic computing skills to researchers. (The name “carpentry” was chosen to distinguish what we taught from software engineering: we were trying to show people the digital equivalent of painting a bathroom, not building the Channel Tunnel.) In the years that followed, I discovered resources like Mark Guzdial’s blog and the book How Learning Works [Ambr2010]. These in turn led me to books like [Hust2012,Lemo2014,Lang2016] that showed me how to build and deliver better lessons in less time and with less effort.

I started using these ideas in Software Carpentry in 2012. The results were everything I’d hoped for, so I began running training sessions to pass on what I’d learned. Those sessions became a training program that dozens of trainers have now taught to over a thousand people on six continents. Since then, I have run the course for people who teach programming to children, librarians, and women re-entering the workforce or changing careers, and all of those experiences have gone into this book.

Have a Code of Conduct

The most important thing I’ve learned in the last thirty years is how important it is for everyone in a class to treat everyone else with respect. If you use this material in any way, please adopt a Code of Conduct like the one in Appendix B and require everyone who takes part in your classes to abide by it.

A Code of Conduct can’t stop people from being offensive, any more than laws against theft stop people from stealing. What it can do is make expectations and consequences clear. More importantly, having one tells people that there are rules, and that they can expect a friendly learning experience.

People rarely violate a Code of Conduct in person; they are more likely to online, where they feel less inhibited. If someone challenges you about it, remind them that a Code of Conduct is not an infringement on free speech. People have a right to say what they think, but that doesn’t mean they have a right to say it wherever and whenever they want. If they want to make someone feel unwelcome, they can go and find their own space in which to do it.


This book would not exist without the hard work and feedback of Erin Becker, Azalee Bostroem, Hugo Bowne-Anderson, Neil Brown, Gerard Capes, Francis Castro, Warren Code, Ben Cotton, Richie Cotton, Karen Cranston, Katie Cunningham, Natasha Danas, Matt Davis, Neal Davis, Mark Degani, Michael Deutsch, Brian Dillingham, Kathi Fisler, Auriel Fournier, Bob Freeman, Nathan Garrett, Mark Guzdial, Rayna Harris, Ahmed Hasan, Ian Hawke, Felienne Hermans, Kate Hertweck, Toby Hodges, Dan Katz, Christina Koch, Shriram Krishnamurthi, Colleen Lewis, Sue McClatchy, Ian Milligan, Lex Nederbragt, Aleksandra Nenadic, Jeramia Ory, Joel Ostblom, Elizabeth Patitsas, Aleksandra Pawlik, Sorawee Porncharoenwase, Emily Porta, Alex Pounds, Thomas Price, Danielle Quinn, Ian Ragsdale, Erin Robinson, Rosario Robinson, Ariel Rokem, Pat Schloss, Malvika Sharan, Florian Shkurti, Juha Sorva, Tracy Teal, Tiffany Timbers, Richard Tomsett, Preston Tunnell Wilson, Matt Turk, Fiona Tweedie, Allegra Via, Anelda van der Walt, Stéfan van der Walt, Belinda Weaver, Hadley Wickham, Jason Williams, John Wrenn, and Andromeda Yelton. I am grateful to them, and to everyone who has used this material over the years; any mistakes that remain are mine.

Breaking the Law

Most of the research reported in this book was publicly funded. Despite that, a lot of it is locked away behind paywalls. At a guess, I broke the law roughly 250 times to download papers from sites like Sci-Hub. I hope the day is coming soon when no one will need to do that; if you are a researcher, please hasten that day by publishing your research in open access venues, or by posting copies on open pre-print servers.


Each chapter ends with some challenge exercises that include a suggested format (individual, pairs, think-pair-share, small groups, or whole class) and an indication of how long they usually take. Most can be used in other formats—in particular, if you are going through this book on your own, you can still do large parts of the exercises that are described as being for groups—and you can always spend more time on them than what’s suggested.

The three challenges in this chapter are good pre-assessment questions (Section 9.4). if you have learners answer them a few days before a class or workshop starts, they will give you a much clearer idea of who they are and how best you can help them.

Highs and Lows (whole class/5 minutes)

Write brief answers to the following questions. Put your answers in the shared notes and comment on what others have written, or compare your answers to those of the person beside you.

  1. What is the best class or workshop you ever took? What made it so good?
  2. What was the worst one? What made it so bad?

Know Thyself (whole class/5 minutes)

Write brief answers to the following questions and share them as described above. Keep your answers somewhere so that you can refer to them as you go through the rest of this book.

  1. What do you most want to teach?
  2. Who do you most want to teach?
  3. Why do you want to teach?
  4. How will you know if you’re teaching well?

Starting Points (individual/5 minutes)

Write brief answers to the following questions. Keep your answers somewhere so that you can refer to them as you go through the rest of this book.

  1. What do you most want to learn about teaching and learning?
  2. What is one specific thing you believe is true about teaching and learning?