CS50: Inside the world’s most elite computing course

There aren’t many university courses that can count Mark Zuckerberg and Steve Ballmer among its lecturers. There aren’t many university courses where more than 100,000 people have turned up for lectures (albeit, predominantly online). There aren’t many university courses that have their own brand, merchandise and battle to register the course name as a trademark. But then there aren’t many university courses like CS50.

CS50 is without doubt the world’s most elite computing course. It’s taught not only at Harvard, but now at fellow Ivy League institution Yale, where it instantly became the university’s most popular course in its first year. If you’re one of the many who fail to get a place on the course at one of the universities, you can take CS50 online, either via digital institutions such as edX or iTunes U, or simply via the course’s website, where all the lectures, tutorials, materials, assignments and their solutions are published for free. Lectures will soon even be watchable using VR headsets, as if you’re actually sat in the halls at Harvard.

So what makes this course so special? What drives thousands of America’s brightest minds and hundreds of thousands of people from across the world to stream the lectures? I’ve been speaking to the course leader and students, as well as sitting through a few lectures myself, to find out.

Computer science for all

CS50, or Computer Science 50 to give its full name, isn’t purely the preserve of those who write Perl in their pyjamas. Almost three-quarters of the students who sign up for the course at Harvard have never taken a computer science course before. As Professor David Malan told students during his introductory lecture to 2015’s course: “We’re not setting out in this course to turn all of you into CS majors or concentrators, but rather to give you an opportunity to hopefully go beyond the world with which you’re currently familiar and bring back from this world skills and knowledge and savvy that you can apply to your own world, whether that’s in the humanities, social sciences, natural sciences, or beyond.” The fact that you learn programming along the way is, according to the website, “perhaps its most empowering return”.

That’s not to say there’s nothing to be gained from those who already know their procedures from their variables. Each of the “problem sets” that students are challenged to solve come in two degrees of difficulty: Standard, which 90%+ of the class are expected to do, and Hacker Edition, for those with the technical chops who want to push themselves. Indeed, the entire course at Harvard and Yale is organised into three different tracks: those who are “more comfortable”, with the language of programming, those who are “less comfortable” and a band for those who are “somewhere in between”.

Almost three-quarters of the students who sign up for the course at Harvard have never taken a computer science course before.

The course and many of the lectures – delivered live to hundreds of students and on-demand via highly polished video streams – are led by Professor Malan: an engaging speaker who reminds me of former Windows chief Steven Sinofsky, in that you’re clearly dealing with an intellect so fierce that the words can’t tumble out of his mouth fast enough to keep up with his brain. He might speak at machine-gun pace, but he’s also brilliant at distilling complex concepts into digestible chunks.

In 2015’s introductory lecture, for instance, he uses a set of lightbulbs to teach students how to write numbers in binary, explaining how each bulb (switched on for 1 and off for 0) represents a bit. It’s the clearest explanation I’ve ever witnessed. Thanks to the supplementary videos on the CS50 website, I can now add, subtract and multiply in binary too.

He also begins to explore the development of “divide and conquer” algorithms by ripping up a phone book (somewhat awkwardly, given his orthodox geek physique). This graphically illustrates that even with 40 billion names listed alphabetically in a phone book, it would take only 36 steps to find the person you were looking for if you opened the book in the middle and ripped out the half that didn’t contain the person’s name (to explain the concept of log n).

cs50_coding_yellow_pages_rip

Then there’s the demonstration of how commands written for computers require a degree of precision that we’re not used to when ordering humans around. He asks the students in the Yale lecture hall to yell out commands for how to make a peanut butter and jam sandwich, with one of his on-stage stooges carrying out the commands to the letter. Thus, “open bag of bread” results in the bag being ripped apart and bread spilling everywhere, while later in the “program” the sandwich maker gets caught in an infinite loop that doesn’t end well for the peanut butter jar.

Code connection

This engaging way of presenting the potentially dry and intimidating topic of programming certainly appears to be a hit with students, particularly those who have never studied computing before. Ed Rex, the founder of British music startup Jukedeck, recently told me how he was inspired to start coding after attending a CS50 lecture. “I was just completely bowled over,” said Rex. “After an hour in his [Malan’s] lecture hall I came out thinking, first, why has nobody told me this before; second, programming is amazing; and third, it seems like it’s much more doable than people in the UK would have you believe.”

Twenty-three-year-old Kyle Schmigel is part of the current CS50 intake. He told me that “learning to program in general allows me to focus my mind in a much different way than I typically do in my day-to-day life. It’s a fun way of challenging yourself and problem-solving.

“So far the most important thing I’ve learned is to look at things from multiple perspectives,” Schmigel added. “I may not be looking at the problem the right way, or could be doing things a simpler way. CS50 is a hard class but I’ve never done anything I found as fun as challenging myself to take it.”

Malan is too modest to ascribe his teaching style as one of the main reasons for CS50’s success, pointing to other factors. “We’ve certainly benefited from a rising tide of interest in computer science internationally, particularly with tech so popular right now,” he told me. “But we’re hopeful that CS50’s accessibility, coupled with its rigour and culture, especially resonates with students as well, particularly those without prior experience.”

From bust to boom

Fifteen minutes into my first CS50 lecture, it’s easy to see why students warm to Malan’s course, but it hasn’t always been the oversubscribed, cross-campus success that it is today. During the lecture, Malan shows today’s students a clip from a 2005 guest lecture from Facebook founder and notorious Harvard dropout Mark Zuckerberg. Admittedly, Zuckerberg was hardly the draw then that he is today, with Facebook having been up and running only a year before he gave the lecture; by Harvard’s own admission, the course’s popularity had waned with the dotcom bust. The footage shows only a dozen or so students occupying seats in the embarrassingly empty lecture hall, forcing Zuckerberg into a rather stilted one-liner to kick off his speech: “This is actually one of the first times I’ve been to a lecture at Harvard.”

That video of Zuckerberg also betrays another sign of how far the course has matured. The 2005 lecture video is shot from one fixed-position camera at the back of the lecture hall, with a toe-curling 30 seconds or so of fiddling with Zuckerberg’s mic before the lecture commences. The 2015 lectures, by contrast, begin with a television-worthy trailer for the course; the lectures are shot from multiple camera angles at up to 4K resolution with Malan wearing an earpiece, presumably for stage direction; and when he relies on slides to show snippets of code or other information, he shrinks into an in-picture window so that the viewer can read what’s on-screen. It’s the sort of quality you expect from Super Bowl broadcasts, not a university computing course.

CS50 is now a marketable brand. Malan and other students are shown wearing “I took CS50” T-shirts; students who volunteer to help with on-stage demonstrations are rewarded with CS50 stress balls; the final lecture concludes with a DJ mixing Mark Ronson’s “Uptown Funk” to a CS50 jingle. The whole package is slick. Malan has even got into a skirmish with Harvard over his attempts to trademark the CS50 brand, but withdrew his application in 2013 after the university blocked his application.

So is commercial branding now a necessary part of modern education? “I don’t imagine it’s necessary,” Malan replied, “but in our case it’s certainly a manifestation of our interest in building a culture around the course, a global community that brings together students – both on campus and off. That the course’s shirts say, quite simply, ‘I took CS50’ captures precisely the pride that we hope students feel at term’s end after tackling so much, so successfully.”

Online overspill

Of course, not everyone has the grades, money or the right passport to get into Harvard or Yale. Instead, the vast majority of students “take” CS50 online, whether through the course website or online education establishments such as edX or iTunes U.

Although distance-learning students obviously won’t get the personal tutoring, hack days and the benefits of life on campus, Malan believes there are benefits to taking the course remotely instead of sitting in Harvard’s enormous lecture halls. “The reality – and I believe this philosophically – is that lectures are not a particularly effective means for delivering fairly complex information, certainly over hour-plus-long spans of time,” he tells the students during one lecture, urging them to rewatch the videos online. “Indeed, every few minutes… you zone out for a moment, you miss some complex topic, and you’re gone pretty much for the next 45 minutes. And the reality is that, whether you’re here in New Haven or Cambridge or beyond, the simplicity of being able to pause and fast-forward, rewind, hyperlink to related resources, search full text transcripts and the like, is an opportunity that I dare say for our online students well beyond New Haven, offers an opportunity to really grasp the conceptual material that we introduce in lectures all the better.”

cs50_coding_intense_student_laptop_work

But why does Harvard offer these resources for free? “It’s the right thing to do,” Malan said. “If students elsewhere in the world can benefit from the work we’re already doing in Cambridge, applying lessons learned to their own work and bootstrapping further studies, then all the better.

“It’s been wonderful to connect with so many people from around the world,” he added. “Rather than centralise the course’s discussions in one platform, we’ve instead fostered communities on Facebook, Gitter, LinkedIn, Reddit, Slack, Stack Exchange, Twitter and beyond, where there are students already. CS50’s Facebook group alone has 80,000 members, with students from around the world interacting daily.”

CS50’s tentacles are stretching even further. The course is now reaching into schools via the CS50 AP programme, providing a curriculum that teachers can use in their own classrooms from this autumn. That’s also becoming international, with Malan delivering CS50 AP workshops in London.

The most interesting development is CS50 VR, which will see the autumn lectures shot in 360-degree virtual reality, so that remote students can be immersed in the lecture hall. The taster video gives Google Cardboard, Samsung Gear VR and other headset users a taste.

If students aren’t distracted by the VR then they could be the ones finding new ways to deliver this amazing course around the world.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.