*At a time of rising interest in new forms of teaching to effect greater learning, *Harvard Magazine *asked Harry Lewis, Gordon McKay professor of computer science, to recount how he rethought his—and his students’—roles in creating a new course, and what he learned from teaching it. * ~The Editors

Computer science is booming at Harvard (and across the country). The number of concentrators has nearly tripled in five years. For decades, most of our students have been converts; barely a third of recent CS graduates intended to study the field when they applied to college. But sometime in 2010, we realized that this boom was different from those of earlier years, when many of our students came to computer science from mathematics, physics, and engineering. Today many seem to be coming from the life sciences, social sciences, and humanities. Never having studied formal mathematics, these students were struggling in our mathematically demanding courses. Their calculus and linear algebra courses did not teach them the math that is used to reason about computer programs: logic, proofs, probability, and counting (figuring out how many poker hands have two pairs, for example). Without these tools they could become good computer programmers, but they couldn’t become computer *scientists* at all. It was time to create a new course to fill in the background.

I’ve developed big courses like CS 50, our introduction to the field. Courses for specialists, like CS 121 (“Introduction to the Theory of Computation”) and CS 124 (“Data Structures and Algorithms”), the theory courses in the CS concentration. A lecture course mixing math and public policy—my “Bits” course, part of the Core and General Education curricula. Even a freshman seminar for 12, outside my professional expertise: on amateur athletics—really a social history of sports in America, heavily laced with Harvardiana.

So I figured I knew how to create courses. They always come out well—at least by the standard that I can’t possibly do a worse job than the previous instructor!

This time was different. Figuring out the right topics was the easy part. I polled faculty about their upper-level courses and asked them what math they wished their students knew. I looked at the websites of courses at competing institutions, and called some former students who teach those courses to get the real story. (College courses are no more likely to work as advertised than anything else described in a catalog.) Thus was born CS 20, “Discrete Mathematics for Computer Science.”

But once I knew *what* I needed to teach, I started worrying.

Every good course I have ever taught (or taken, for that matter) had a narrative. CS 121 is the story of computability, a century-long intellectual history as well as a beautiful suite of mathematical results. “Bits” is the drama of information freedom, the liberation of ideas from the physical media used to store and convey them (see “Study Card”). CS 20, on the other hand, risked being more like therapy—so many treatments of this followed by so many doses of that, all nauseating. “It’s good for you” is not a winning premise for a course.

And what if students did not show up for class? I had no desire to develop another set of finely crafted slides to be delivered to another near-empty lecture hall.

I’ll accept the blame for the declining attendance. My classes are generally video-recorded for an Extension School audience. I believe that if the videos exist, then all my students should have them—and they should have my handouts too. In fact, I think I should share as much of these materials with the world as Harvard’s business interests permit. I could think of ways to force students to show up (not posting my slide decks, or administering unannounced quizzes, for example). But those would be tricks, devices to evade the truth: the digital explosion has changed higher education. In the digital world, there is no longer any reason to use class time to transfer the notes of the instructor to the notes of the student (without passing through the brain of either, as Mark Twain quipped). Instead, I should use the classroom differently.

So I decided to change the bargain with my students. Attendance would be mandatory. Homework would be daily. There would be a reading assignment for every class. But when they got to class, they would talk to *each other* instead of listening to *me.* In class, I would become a coach helping students practice rather than an oracle spouting truths. We would “flip the classroom,” as they say: students would prepare for class in their rooms, and would spend their classroom time doing what we usually call “homework”—solving problems.

And they would solve problems collaboratively, sitting around tables in small groups. Students would learn to learn from each other, and the professor would stop acting as though his job was to train people to sit alone and think until they came up with answers. A principal objective of the course would be not just to teach the material but to persuade these budding computer scientists that they *could* learn it. It had to be a drawing-in course, a confidence-building course, not a weeding-out course.

I immediately ran into one daunting obstacle: there was no place to teach such a course. Every classroom big enough to hold 40 or 50 students was set up on the amphitheater plan perfected in Greece 2,500 years ago. Optimal for a performer addressing an audience; *pessimal,* as computer scientists would say, for students arguing with each other. The School of Engineering and Applied Sciences (SEAS) had not a single big space with a flat floor and doors that could be closed.

Several other SEAS professors also wanted to experiment with their teaching styles, and in the fall of 2011 we started talking about designs. In remarkably short order by Harvard standards, SEAS made a dramatic decision. It would convert some underutilized library space on the third floor of Pierce Hall to a flat-floor classroom. In this prototype there would be minimal technology, just a projection system. Thanks to some heroic work by architects and engineers, the whole job was done between the end of classes in December and the start of classes in late January 2012.

The space is bright, open, and intentionally low-tech. The room features lots of whiteboards, some fixed to the walls and others rolling on casters, and small paisley-shaped tables, easily rearranged to accommodate two, four, or six seats. Electric cables run underneath a raised floor and emerge here and there like hydras, sprouting multiple sockets for student laptops, which never seem to have working batteries. A few indispensable accouterments were needed—lots of wireless Internet connectivity; push-of-a-button shades to cover the spectacular skylight; and a guarantee from the building manager that the room would be restocked daily with working whiteboard markers.

About 40 brave souls showed up to be the guinea pigs in what I told them would be an experiment. To make the point about how the course would work, I gave on day one *not *the usual hour-long synopsis of the course and explanation of grading percentages, but a short substantial talk on the “pigeonhole principle”: If every pigeon goes in a pigeonhole and there are more pigeons than pigeonholes, some pigeonhole must have at least two pigeons. I then handed out a problem for the tables to solve using that principle, right then and there: prove that if you pick any 10 points from the area of a 1 x 1 square, then some two of them must be separated by no more than one-third of the square root of two. They got it, and they all came back for the next class, some with a friend or two. (Try it yourself—and remember, it helps to have someone else to work with!)

After a few fits and starts, the course fell into a rhythm. We met Mondays, Wednesdays, and Fridays from 10 to 11 a.m. The course material was divided into bite-sized chunks, one topic per day. For each topic I created a slide presentation, which was the basis for a 20-minute mini-lecture I recorded on my laptop while sitting at home. The video and the slides were posted on the course website by the end of a given class so students could view them at their convenience before the next class. I also assigned 10 to 20 pages of reading from relevant sources that were free online. (A standard text for this material costs $218.67, and I just couldn’t ask students to spend that kind of money.) The students, in turn, had to answer some short questions online to prove they had done the reading and watched the video before showing up for class. Once in class, I worked one problem and then passed out copies of a sheet posing three or four others.

Students worked in groups of four around tables, and each table wrote its solution on a whiteboard. A teaching fellow (TF), generally a junior or senior concentrating in math or computer science, coached and coaxed, and when a table declared it had solved a problem, finally called on a student to explain and defend the group’s solution. (This protocol provided an incentive for the members of a group to explain the solution to each other before one of them was called on.) At the end of the class, we posted the solutions to all the in-class problems, and also posted real homework problems, to be turned in at the beginning of the next class.

We took attendance, and we collected the homework submissions at the beginning of class, to make sure people showed up on time.

I had serious doubts about whether this protocol would actually work. Required attendance is countercultural at Harvard, as is daily homework to be submitted in class. And education requires the trust of the students. To learn anything, they have to believe the professors know what they are doing. I really didn’t, though I had observed a master teacher, Albert Meyer ’63, Ph.D. ’72, MIT’s Hitachi America professor of engineering, utilize this style with great skill.

There was also the choppiness, the lack of a dramatic story line for the whole course. I took the cheap way out of that problem—I threw in some personal war stories related to the material. How Bill Gates ’77, LL.D. ’07, as a sophomore, cracked a problem I gave him about counting pancake flips and published a paper about it called “Bounds for Sorting By Prefix Reversal.” How Mark Zuckerberg ’06 put me at the center of his prototype social-network graph (so pay attention to graph theory, students, you never know when it might come in handy!). With no camera on me, I used the intimacy of the classroom for topical gossip—including updates on the five varsity athletes taking the course, three of them on teams that won Ivy championships during the term.

Student feedback was gratifyingly positive. Anonymous responses to my questionnaire included “I’ve found this to be the most helpful teaching method at Harvard” and “Oh my goodness, the in-class problem-solving is beautiful! We need more of it.” Even the negative comments were positive. One student said, “The TFs are great. Professor Lewis’s teaching is not good. …I find it more useful to…talk to the TFs than listen to his lectures.” Fine, I thought to myself, I’ll talk less. My TFs have always been better teachers than I am, anyway, and lots of them are top professors now, so this is par for the course. My favorite: “You might say the class is a kind of start-up, and that its niche is the ‘class as context for active, engaging, useful, and fun problem-solving’ (as opposed to ‘class as context for sitting, listening, and being bored’).” Yes! Discrete mathematics as entrepreneurial educational disruption!

What have we learned from the whole CS 20 experiment? Thirty-three topic units were a lot to prepare—each includes a slide deck, a recorded lecture, a selection of readings, a set of in-class problems, and homework exercises. The trickiest part was coordinating the workflow and getting everything at the right difficulty level—manageable within our severe time constraints, but hard enough to be instructive. Fortunately, my head TF, Michael Gelbart, a Princeton grad and a Ph.D. candidate in biophysics, is an organizational and pedagogical genius. When our homework problems were too hard and students became collectively discouraged or angry, we pacified the class with an offering of cupcakes or doughnut holes. We kept the classroom noncompetitive—we gave the normal sorts of exams, but students were not graded on their in-class performance, provided they showed up. That created an atmosphere of trust and support, but in-class problem-solving is pedagogically inefficient: I could have “covered” a lot more material if I were lecturing rather than confronting, in every class, students’ (mis)understanding of the material! Harvard’s class schedule, which allots three class hours per week for every course, is an anachronism of the lecture era; for this course we really need more class time for practice, drill, and testing.

I relearned an old cultural lesson in a more international Harvard. Thirty-five years ago I learned the hard way never to assign an exam problem that required knowing the rules of baseball, because (who knew?) in most of the world children don’t grow up talking about innings and batting averages. This year I learned (happily, this time, *before* I made up the final exam) that there are places where children aren’t taught about hearts and diamonds, because card games are considered sinful.

I also responded to some familiar student objections. Having weathered storms of protest in 1995 over randomizing the Houses, I anticipated that students would prefer to pick their own table-mates, but (true to type) I decided that mixing up the groups would make for greater educational dynamism. It worked, but next time I will go one step further. I will re-scramble the groups halfway through the course, so everyone can exchange their newly acquired problem-solving strategies with new partners.

With a good set of recorded lectures and in-class problems now in hand, the class could be scaled pretty easily; we could offer multiple sections at different hours of the day, if we could get the classroom space and hire enough conscientious, articulate, mathematically mature undergraduate assistants. Fortunately, the Harvard student body includes a great many of the latter, and I owe a lot of thanks to those who assisted me this year—Ben Adlam, Paul Handorff, Abiola Laniyonu, and Rachel Zax—as well as to Albert Meyer and my colleague Paul Bamberg ’63, senior lecturer on mathematics, who gave me good advice and course materials to adapt for CS 20.

I had the added satisfaction, as a longtime distance-education buff, of finding out that this experience could be replicated online. With the support of Henry Leitner, Ph.D. ’82, associate dean in the Division of Continuing Education and senior lecturer in computer science, we tried, and seem to have succeeded. In CSci E-120, offered this spring through the Harvard Extension School, a group of adventurous students, physically spread out from California to England, replicated the CS 20 “active learning” experience. They watched the same lectures and did the same reading on their own time. They “met” together synchronously for three hours per week (in the early evening for some, and the early morning for others). Web conferencing software allowed them to form virtual “tables” of four students each. Each “table” collaborated to solve problems by text-chatting and by scribbling on a shared virtual “whiteboard” using a tablet and stylus. My prize assistant, Deborah Abel ’01, “wandered” among the rooms just as the teaching fellows were doing in the physical space of my Pierce Hall classroom.

Most of all, the course was for me an adventure in the co-evolution of education and technology—indeed, of life and technology. The excitement of computing created the demand for the course in the first place. The new teaching style was a response to the flood of digital content—and to my stubborn, libertarian refusal to dam it up. The course couldn’t have been done without digital infrastructure—five years ago I could not have recorded videos, unassisted and on my own time, for students to watch on theirs. The distance version of the course is an exercise in cyber-mediated intercontinental collaboration. Yet in the Harvard College classroom, almost nothing is digital. It is all person-to-person-to-person, a cacophony of squeaky markers and chattering students, assistants, and professor, above which every now and then can be heard those most joyous words, “Oh! I get it now!”