REVIEW: Harvard CS50 Introduction to Computer Science

David Venturi
6 min readApr 12, 2016

--

High praise for Harvard’s online introduction to computer science course is not difficult to find. “It’s a cultural touchstone, a lifestyle, a spectacle,” says The Harvard Crimson. YouTube CEO Susan Wojcicki says CS50 changed her life. CS50 receives near perfect scores across the board on CourseTalk, Class Central, and edX. Here are my thoughts:

The intro to the first lecture of the 2015 edition of Harvard CS50.

Course Overview

CS50 is a true, comprehensive introduction to computer science. The course is taught by the vivacious David Malan and hosted on edX. There are 13 weeks of instruction with 8 mandatory problem sets (psets) and a final project:

  • Week 0: Binary. ASCII. Algorithms. Pseudocode. Source code. Compiler. Object code. Scratch. Statements. Boolean expressions. Conditions. Loops. Variables. Functions. Arrays. Threads. Events. pset1
  • Week 1: Linux. C. Compiling. Libraries. Types. Standard output. pset1
  • Week 2: Casting. Imprecision. Switches. Scope. Strings. Arrays. Cryptography. pset2
  • Week 3: Command-line arguments. Searching. Sorting. Bubble sort. Selection sort. Insertion sort. O. Ω .Θ. Recursion. Merge Sort. pset3
  • Week 4: Stack. Debugging. File I/O. Hexadecimal. Strings. Pointers. Dynamic memory allocation. pset4
  • Week 5: Heap. Buffer overflow. Linked lists. Hash tables. Tries. Trees. Stacks. Queues.
  • Week 6: TCP/IP. HTTP. pset5
  • Week 7: HTML. CSS. PHP (edit: Python replaces PHP in Fall 2016). pset6
  • Week 8: MVC. SQL. pset7
  • Week 9: JavaScript. Ajax. pset8
  • Week 10: Security. Artificial intelligence.
  • Week 11: Artificial intelligence, continued.
  • Week 12: Exciting conclusion. (Spoiler alert: montages, CS50 Family Feud, cake!) Final Project

There are two lectures per week. Each lecture is 50ish minutes long. Each week has a series of shorter videos as well:

  • Walkthroughs: 1–3 minute videos of David Malan walking you through the lecture’s sample code at a slower pace
  • Section: 5–30 minute videos of a Harvard teaching fellow explaining lecture concepts in depth
  • Shorts: 5–15 minute videos of other CS50 staff members explaining lecture concepts with additional (and sometimes quirky) examples
A short from Week 2 of CS50.

Problem sets are “programming assignments that challenge you to apply concepts to problems inspired by real-world domains.” They are marked by an automated grading system. Your overall mark for a problem set is the fraction of tests that your code passes (1.0 = 100%).

CS50's automatic grading system.

Timeline

There is no to-the-hour estimate from Harvard. They do state problem sets take 10–20 hours to complete. With 8 problem sets, ~5 hours of video content per week, and a final project, a ballpark estimate would be somewhere just north of 200 hours. It took me 200 hours and five minutes, as tracked by Toggl.

The weekly breakdown of my CS50 timeline.

I spent like a day and a half figuring out how web hosting works and editing this stupid video for my final project, both of which aren’t required, so 185 hours or so is probably a more reflective number.

Is It Worth the Price?

The course is free, so yes. You have access to all of the materials and grading at no cost. Probably the best undergraduate computer science course in the world is available to anybody who has an Internet connection. That’s still so cool.

Probably the best undergraduate computer science course in the world is available to anybody who has an Internet connection. That’s still so cool.

You can pay for a verified certificate, which currently costs $90, if you’d like it for personal or professional reasons.

Learning C

The first 6 weeks of Harvard CS50 are spent in C, a language notorious for its complexity. Seems like a curious choice, no? Even though I likely won’t use C much going forward, I am very glad it was the language of choice for this reason:

The advantage to knowing C is that you have a very good idea of how a computer works. Not just how your programming model works, but how memory’s laid out, and suchlike. Knowing C also lets you appreciate how much less work you have to do in a higher level language … and the cost involved in working in that higher level language.

The CS101 equivalents from Udacity and MIT (via edX) both use Python. Nick Parlante’s Stanford course uses C, but the difficulty level of that course isn’t on par with the aforementioned three.

How Challenging is It?

It’s tough, but it’s good tough. At no point did I feel lost. The course is well-structured and there are tons of additional resources. Basically every social media platform you can think of has an official CS50 community — I found Reddit and Stack Exchange the most useful.

The CS50 staff say that the pointers section of the course is the hardest and they are right. You intimately deal with pointers and allocating memory in pset5 and pset6. Mental gymnastics are required. Finally figuring out pointers is probably the thing I am most proud of coming out of the course.

A tweet about pset5.

The 10–20 hours for each problem set is accurate. Your code won’t work and you will get frustrated (especially because half of the course is in C), but frustration is good. Frustration conquered is learning.

Addressing the PHP Haters

Edit (8/26/16): Fall 2016’s edition of CS50 replaces PHP with Python, another high-level programming language, which nullifies the following concern.

I almost didn’t enrol in CS50 after reading this popular Quora answer regarding CS50 teaching web development using PHP:

Trust me. You DO NOT want to spend your time learning PHP in 2014.

That may be true, but it’s not particularly relevant to the decision to take this course. There is only one week of lecture content and two problem sets that use PHP. You do not dedicate a significant amount of time to it. The educational function of PHP is to demonstrate how higher-level programming languages are useful.

One of the reasons why they do use PHP in CS50 is because it is heavily inspired by C. By week 7, students have a solid C foundation. Picking up PHP at that point isn’t difficult because of the syntactical similarities.

Bottom line: do not let two weeks of PHP deter you from this one-of-a-kind learning experience.

Closing Thoughts

I’m having a hard time describing CS50 without sounding hyperbolic. The course was just so damn good. This piece in the Harvard Crimson is ridiculously dramatic, but it’s so true. The content is engaging. David Malan is too good at his job. The production value is absurd. Honestly, go check out a lecture for the production value alone. Fall 2016’s edition will be even crazier: they’re shooting lectures in 6K and VR.

The first lecture of the 2015 edition of Harvard CS50.

I have now completed CS50, Stanford CS101, and half of Udacity CS101 and without question Harvard’s introduction to computer science is my favourite. A few weeks post-graduation, I’ve already had some legitimate nostalgia. It was an experience.

Rating: ★★★★★

A followup from the author

Hey, it’s David. I wrote this review back in 2016. Since then, I’ve used the knowledge from this course to become a professional data analyst and curriculum developer.

Do you want to become a data analyst, without spending 4 years and $41,762 to go to university? Follow my latest 3-month curriculum below.

--

--