Update 1/12/23: This course review was written back in 2018 as I got deeper into my journey in technology. I still think CS50 is one of the best courses for somebody who aims to understand the magic under the hood of your computer, and to tell your computer how to do other magical things.

Harvard’s course CS50 is offered on the EdX education platform at the following link: https://www.edx.org/. For those of you unfamiliar with this course, it is considered to be one of the quintessential introductions to Computer Science. Having access to this course and all of it’s content for free (to audit) is awesome, and I can say the course is nothing short of amazing in terms of the breadth and depth of the content. For anybody who is interested in pursuing a career in a technology field, or simply interested in knowing what’s going on under the hood of your computer, this course has a ton of value. I will provide a brief review of the course and then give a week by week breakdown of the covered content.

If you are interested in having a general understanding of the course, I’ll cover that quickly here. The course is really geared toward helping its students develop algorithmic thinking. You gain a solid understanding of how a computer works and are introduced to a number of programming languages. Some topics covered include the binary system, programming logic, the internet and webpages, servers and machine learning. It’s impossible to go through this curriculum and not gain a good grasp of fundamental computer science concepts. The problem sets are very challenging, and course is as engaging as it gets, and I highly recommend it. Even watching the first lecture, which you can find on YouTube, will expose you to the teaching style and help you know what you would be getting into if you were to register. You can find the first lecture at the following link: https://www.youtube.com/watch?v=y62zj9ozPOM&list=PLhQjrBD2T3828ZVcVzEIhsHVgjANGZveu. For those who want a more thorough review, feel free to read on from here.

The course begins in Week 0 with an introduction to one of the most fundamental concepts in Computer Science, namely…. the binary system. Fundamentally, the only thing that a computer understands is binary numbers, 0s and 1s. It uses places for the numbers (similar to the decimal system), to represent increasingly large numbers. For example, 111 would represent the number 7 (1 in the 4s place, 1 in the 2s place, 1 in the 1s place, respectively). Everything from numbers to letters to colors are represented using this system of 0s and 1s.

Week 0 also includes an introduction to the concept of algorithms. An algorithm is a set of instructions to solve a problem. In other words, you provide the computer with a set of inputs, the algorithm does what you ask it to do with those inputs, and then produces one or more outputs. The goal of creating a computer program is to be able to produce the desired output given the set of inputs, and to do so as efficiently as possible.

The first technology introduced in order to gain familiarity with programming constructs is a graphical language called Scratch. Scratch was created by MIT, and allows you to drag and drop various blocks representing pieces of your algorithm. The tool is great for creating games where you have Sprites (game characters) that perform certain actions based on the puzzle pieces you utilize in your program. Anybody who wants to get a taste of what programming is like, without having to learn/use an actual programming language, can benefit greatly by exploring Scratch, and it can be accessed at the following URL: https://scratch.mit.edu

After the introduction to programming using Scratch, Week 1 dives straight in to one of the lower level languages called C. A low-level language means that there is not a lot of abstraction from the instructions the computer actually executes. This can be compared against high-level programming languages (such as Python), where you can write relatively less code to convey to the computer what you want it to do. Put more simply, low-level languages require a lot more hand holding to get the computer to do what you want it to do. However, C is very powerful and can accomplish just about any task.

Some insight from the first couple weeks: The course offers a great introduction to programming in C, algorithms, compilers, inputs and outputs, libraries, functions, data types and a whole lot more. All of these concepts are central to how computers accomplish tasks. The biggest takeaway from the beginning of the course is that computer programming is primarily an exercise in logic. The cool thing about experimenting with C and other programming languages is that it allows you to start thinking about problems differently. In C, there is no room for ambiguity in the instructions that you provide to a computer. If your program has a function that you have not already defined, it will throw an error. As such, you must be very deliberate and methodical in how you approach programming. Mastering these skills in logic and structure are universal in problem solving, and can help you excel in any other facet of your life in which you apply them.

Week 2 explains a number of important computer concepts including cryptography, how information is stored in memory, and command line arguments. Cryptography is the study and practice of how data can be encrypted, or scrambled, to protect items of a sensitive nature. Strings (your name for example), a data structure when stored in a computer, are really just an array (vector) of characters. And lastly, the command line can be thought of as a central station for your computer, where you can run programs and provide arguments for it to use.

Week 3 expands on the very brief introduction to algorithms. This section goes through sorting algorithms including selection sort, bubble sort (President Obama’s warns against it: https://www.youtube.com/watch?v=k4RRi_ntQc8), and insertion sort. Each of these has a runtime associated with it, which is referred to as O, or “order of.” It is considered to be an upper bound on how long each one of the algorithms might take. The three algorithms outlined above all have a runtime of O(n^2), as they can take up to n-squared steps to complete. A brief exploration of linear and binary search is also presented.

Week 4 expands the discussion of memory, and how different types of data are stored. Some of the areas of memory include text, initialized data, uninitialized data, heap, stack and environment variables. An interesting idea is then discussed, namely, that a “string” for example, is actually only a pointer to a character. Stated differently, it’s the address to the start of a word in memory. Pointers, as it turns out, are an extremely powerful tool used in computer science for a number of applications. One such application would be an image, where you can think of each pixel as having an address, and its own data as an underlying representation of what is actually displayed.

Now that the ideas of pointers (as addresses) has been introduced, Week 5 moves on to more complex data structures, including linked lists, stacks, queues, trees, hash tables and tries. As a linked list sounds, it is a list of data that each have an address, and are linked via their addresses. The benefit here is that the data elements don’t need to be next to each other any longer in memory. Instead, each “node” of memory will hold the data element and the address to the next node. Stacks and queues are data types used to store arrays in memory using a fist-in, first-out or last-in, first-out process. A tree is a way that data can be stored that is not one-dimensional. In other words, one node can point to a number of other nodes in memory. An example given is of a parent with children, so the parent would have a pointer to each child. Then, those children could have children, with pointers to each. Hash tables are a data structure comprised as an array, where multiple items might sit in each slot of memory. An example given is college exam books sorted into buckets based on the first letter of the students name. This means you can limit your search for a certain exam to 1/26 (number of letters in alphabet) of the general class pile. Lastly, tries are a data structure similar to a tree where the child of each node is an array of one or multiple nodes.

Alright, at this point the “gentle” (gentle as they can be) introduction to data structures, algorithms and the programming language C is complete. Week 6 covers the internet and web. This section begins with an explanation of how the internet is essentially a network of machines, each with an IP address, that allows us to collectively share information. The information being shared is formatted in what is called HTTP (Hyper Text Transfer Protocol). The HTTP represents the initial handshake between machines, and after the handshake, the information requested (e.g. webpage) would be returned. The structure of an actual webpage is written in HTML. This will include the header, different sub-headings, body of the page, etc. Because HTML is relatively limited in terms of styling, there is an additional tool you can utilize called CSS (Cascading Style Sheets). Your html-created page can point to a CSS file that will style the sheet in the manner in which you specify.

Week 7 introduces the topic of Machine Learning, and serves as a bridge between the first half of the course and utilization of lower-level languages to the second using higher-level languages. Machine learning refers to algorithms that drive things like search engines, as well as search, voice and language recognition and processing. It is a methodology where a computer learns what something is (or understanding its patterns) by being trained, and with enough training, can accurately identify those things in the future without directly being told what something is. An example provided is that you can feed a computer thousands or millions of images of horses, where you tell the computer what its seeing is a horse. The computer would begin to recognize the size, shape, colors, etc. of the horses. Then, when you give an image to a computer to test, it would use its history to predict whether the image was a horse or not. One of the most popular languages for machine learning applications is Python.

Week 8 continues the topic of Python, a high-level, object-oriented programming language used in countless applications, including those outlined above for Machine Learning. The beauty of Python is that much can be accomplished in few lines of code, and many libraries have been created to do the heavy lifting for you in performing certain operations. Because Python is a high-level language, it is a lot more human readable than its descendants, and even complex programs are more interpretable. The course walks through an example of how complex things can be accomplished in Python by implementing a Python web server.

After Python, Week 9 introduces the language SQL, which allows you to manage structured (tabular, in rows and columns) data. In the context of a web server, you may need to have a table that is capturing whatever it is the user is trying to do. For example, if you have a server dedicated to class registration, you will need tables to contain the data for classes offered, students, and registrations of students in classes. Python has libraries allowing you to complete some of the above queries using SQL syntax.

In Week 10, JavaScript is introduced. Rather than being run on a local machine, JavaScript is run in the users browser, which allows for the page to have interactivity. An example would be that when your on a webpage, and hovering over a link changes its color or font. One of the key functionalities of a language like JavaScript is that it “listens” for certain types activity. It might listen for more information from the server, listen for you to click on something, or drag something. Most modern websites with real time updating of the page (e.g. live comments) include JavaScript and its frameworks. With the combination of HTML, CSS and JavaScript on the front-end and Python and SQL on the back-end, these technologies combined can be used to create beautiful, interactive web applications.

The course concludes in Week 11 by discussing a number of applications of computer science, and providing “closure about the course.”

I took a lot away from following along with this course, although I only completed the first few weeks of assignments. I can only imagine how empowering a course like this could be for the students of Harvard. The course offers a very rich learning experience that can serve as the jumping off point for countless endeavors into the computer science field. It’s something I’ll probably come back to again and again throughout my career as both a refresher and to keep up with new developments in the technology and computing world.

I can’t emphasize this enough: TAKE THIS COURSE, EVEN IF YOU JUST WATCH THE LECTURES AND TREAT THEM AS A LONG-RUNNING DOCUMENTARY SERIES!