Over the past 4 weeks, I have been working through an online computer science course (CS50) and this review. CS50 is taught by David Malan and is offered at Harvard (and Yale). At Harvard, CS50 is the most popular course. The version I took (CS50x) is non-credit bearing and is available for free on edX. (There is also an opportunity to pay $90 for a verified certificate that I opted out of.) Upon completion, students are provided with a basic certificate of completion.
CS50 does not assume any prior computer science or programming experience. In fact, two-thirds of Harvard’s CS50 students had never written a line of code in their lives prior to CS50. Given my prior experience with programming, it may seem a bit silly to take an introductory CS course. However, I wanted to learn C, review Python, and generally get back into programming. Furthermore, Harvard recommends that students such as myself who have already taken AP CS A take CS50 as well. In terms of my specific background in computer science, in high school, I took three computer science courses. In 9th grade, I learned Python in a semester-long introductory course. In 10th grade, I learned Java in AP Computer Science A. In 12th grade, I took a website development course at my local university. In that course, I learned HTML, CSS, and PHP. Lastly, last fall I took CSC 102/103 at Smith where I learned the basics of how the internet and computers work. This preparation was adequate for me to pass a placement test to test out of Smith’s CSC 111. You can read about that process here.
The material is presented via two-hour lectures recorded in the fall semester at Harvard. It is worth pointing out that Harvard students who take the course in the spring, have a scheduling conflict, or are just lazy watch the video lectures as well. There are also supplementary videos called shorts that are created by a teaching fellow. Each week, there is a programming problem set. At the end of the course, there is also a final project. The actual version that is taken by Harvard students also includes a quiz and a test.
This first lecture is only an hour rather than the normal two. Given my prior experience, the first half of the lecture was just review. During the second half, I learned the basics of Scratch. Scratch is a graphical language developed by MIT. Scratch is great for kids and other beginners because you don’t write code, rather you drag and drop code blocks. The task was to create a basic game, story, or animation using Scratch. I had a lot of fun playing with Scratch and as a result, spent 7 hours on my project.
C is an interesting “first” programming language to learn. The are other easier and more relevant languages such as Python (which Smith’s introductory course uses). As a low-level programming language, learning C helps one better understand how a computer works. David’s justification for teaching C can be found here. There is also a CS50 podcast episode about this decision. (You can check out all of the episodes here. I found the podcast to be quite interesting. Some episodes focus on philosophies behind the course and others talk about tech in the news.)
After Scratch, assignments are coded in the CS50 IDE. CS50 has some software tools like help50 that were built to help students find errors. For the first few weeks, we used features from the CS50 library. For instance, C doesn’t by default have a string data type. While there was a definite learning curve in learning C, it wasn’t really until week 4 that the PSETS actually got hard. Week 4 was challenging because pointers were introduced and the “training wheels” were removed. Example problems included creating programs to determine the grade level of submitted text, apply photo filters, and do spell checking.
I already had a familiarity with Python. That said, I actually did learn some new things. For instance, I learned that Python supports format strings. Though I knew Python was simpler, I was still wowed by the transition from C. I, like others, had spent hours creating the spell checker in C. Then during class, in just a few minutes David wrote an equivalent program in Python. In general week 6 was a review of the past few weeks of example problems but in Python. It was definitely rapid-fire, so I was glad to have my prior experience.
The first part of the PSET was redoing previous problems but in Python. This was actually a bit harder than I was anticipating. Lastly, there was a DNA analysis problem. Getting the program to mostly work was not too bad, but then I had a weird bug. I posted a question to the Discord and got a fairly quick response. That response allowed me to figure out which tests my code was failing and ultimately debug the program on my own. While my solution was far from elegant, it was eventually able to pass all of the tests!
I was initially excited to learn SQL because it would be totally new information and was related to data science. However, compared to the other lectures this one was less engaging. There was little student involvement beyond the students submitting their favorite TV shows to a Google form at the beginning. We were basically just exploring the IMDB database via SQL queries. Though a somewhat practical application, I don’t really care about movies or TV shows. While the lecture was less engaging, I definitely had fun with the PSET. The first half of the PSET was lots of little problems (single SQL queries instead of a giant problem). The second half was creating a program that imported student data into a database and then created class rosters.
Like week 0, the lecture this week was about an hour (rather than the usual two). Furthermore, it was parents weekend so there were family members in the audience and as volunteers on stage. The first part of the lecture was just sort of a review of how far everyone had come. This was an amusing lecture but didn’t have much in the way of new concepts. The big take away of the lecture was the importance of using complex and varied passwords. This week was also different in that there was no PSET.
After the main part of the course, there was an opportunity to choose a track to follow (android, ios, games, or web). I initially intended on doing the Android app development track. However, upon watching the first two hours of videos I found the explanations to be hard to follow partially because it was so boring. Furthermore, I personally have an android and an IOS device, so having an android app would have limited utility. Therefore, later this summer I am hoping to learn Flutter and build an app. We will see how that goes!
Upon switching to the web track, I was immediately more engaged. It is worth noting that the tracks aren’t taught by David, they are instead taught via video by teaching fellows. (Even the Harvard students have to watch videos and don’t have a live option for the tracks.) This is the first year of having multiple tracks (previously everyone did the web track). It turns out 87% of Harvard students did the web track given when given other options. (I learned this from another podcast episode.)
The web track started off with an introduction to HTTP, HTML, CSS, and JavaScript. This was followed up with learning Flask (a web framework written in Python) and learning more about databases. For part of the PSET, we had to build a web app for stock trading. While you can’t actually use mine, here is the official version of Finance.
I decided to build a web application for task management. In the web track, we learned how to make a very simple task application where you could just add list items. For the final project, we had to create a two-minute video. Here is mine. If you want to check out projects from the CS50 fair, click here.
Favorite Aspects of Course:
David is a great lecturer! Even in video form, most lectures are very engaging and informative. Speaking of video, the video quality is very high. The camera pans accordingly so that we can clearly see the code. Also, even though I took my own notes I found the course notes to be helpful.
The homework set problems were a lot of fun and a great challenge. The option of “less comfortable” and “more comfortable” problems was nice. At least for early assignments, feedback on correctness is very quick. For later assignments, it is more of a did you submit the assignment or not.
I also loved the freedom of the final project. I also just had a fun time turning my ideas into a functional tool. Lastly, the loose Harry Potter theme was amusing.
Least Favorite Aspects of the Course:
While David is an engaging professor, the length of the lectures is a bit long. Also, while we can clearly hear David we can’t hear student’s questions and comments. This is probably just because of my prior experience, but I found the shorts (supplementary videos) to be quite boring. I watched them all, but sort of passively.
While code is auto-graded for correctness and style there are no “answer keys”. This would help ensure that all concepts were fully understood. Sure learning from doing is essential, but I believe in the power of reviewing. Relating this to Smith, in our engineering classes (and some others like PHY 118) we work our own solutions and then get solution sets to review for full understanding. We are then required to resubmit our homework with corrections. Back to CS50, while we are told to be efficient we aren’t provided with really efficient solutions to learn from. I get that they don’t want answers floating around the internet, but it would be a useful learning tool.
Overall, CS50 is incredible especially considering that it is free. It is definitely difficult, but in a good way. The course took me 105 hours to complete over 28 days. (If you have no prior experience, expect to spend a lot longer). If you are a high schooler and don’t have access to a computer science class, I would definitely recommend CS50. Specifically, I would recommend considering the AP version. That said, Smith college won’t give you academic credit. Alternatively, if you are a college student and won’t have time to take a traditional computer science course or even if you are no longer a student, CS50 is a fantastic introduction to computer science.