/cs_courses

The best online computer course I've ever taken

Table of Contents

Introduction

This is a self-study guide for computer science and also a commemoration of my three-year self-study journey in college.

  • Essential Tools: IDE, VPN, StackOverflow, Git, GitHub, Vim, LaTeX, GNU Make, practical utilities...
  • Environment Setup: Configuration of development environments for both PC and server-side, various operation and maintenance-related textbooks and resources...
  • Recommended Classic Books: Students who have read CSAPP must appreciate the importance of good books. I will list and recommend must-read books and resource links in the field of computer science that I have personally read.
  • Compilation of High-Quality CS Courses Abroad: I will categorize and summarize all the high-quality CS courses I have taken abroad, and provide self-study suggestions. Most courses will have a dedicated repository maintaining related resources and my assignment implementations.

Benefits of Self-Study

For me, the biggest advantage of self-study is being able to adjust the learning pace according to my own progress. For difficult concepts, I can review videos repeatedly, search related content on Google, and ask questions on StackOverflow until I fully understand them. As for the topics I grasp relatively quickly, I can watch them at double or even triple speed.

Another major benefit of self-study is the opportunity to learn from diverse sources. The core courses in computer science, such as computer architecture, networks, operating systems, and compilers, I have taken courses from different universities, with different textbooks, different emphases on knowledge points, and different projects. This greatly enriches your perspective and allows you to promptly correct any misunderstandings.

The third advantage of self-study is the freedom of time. The specific reasons are omitted.

Drawbacks of Self-Study

Of course, as a devoted advocate of self-study in computer science, I have to admit that self-study also has its drawbacks.

The first drawback is the inconvenience of communication. I am actually someone who is eager to ask questions and pursue a thorough understanding of any points I don't comprehend. But when you're facing a screen and hear the instructor explain a concept you don't understand, you can't just follow a network cable to the other end and ask the teacher for clarification. I try to mitigate this by independent thinking and effective use of Google, but having a few like-minded companions for self-study would be great.

The second drawback is that most of these self-study courses are in English. From videos to slides to assignments, everything is in English, so there is a certain language barrier. However, I believe that overcoming this challenge will greatly benefit you. Because, in the current landscape, although I am reluctant to admit it, in the field of computer science, many high-quality documents, forums, and websites are predominantly in English. Developing the habit of reading English has its advantages before planting the flag in every corner of the world (crosses fingers).

The third, and I believe the most challenging aspect, is self-discipline. Without deadlines, it can be truly terrifying at times, especially as you delve deeper into learning, as many foreign courses can be quite demanding. You need enough drive to force yourself to focus, read dozens of pages of project handouts, understand thousands of lines of code frameworks, and endure hours of debugging. And all of this, without credits, without a GPA, without teachers, without classmates, only one belief β€” you are becoming stronger.

Who is this materials For

As I mentioned in the preface, anyone who aspires to self-study computer science can refer to this book. If you already have a certain foundation in computer science and are interested in a specific area, you can selectively choose the content that interests you for learning. Of course, if you are a novice like I was back then, knowing nothing about computer science when entering college, I hope this book can serve as your guide, allowing you to grasp the knowledge and skills you need in the least amount of time. To some extent, this book is more like a course search engine sorted based on my experience, helping everyone experience top-quality computer science courses from prestigious universities without leaving home.

Of course, as an undergraduate student, I deeply feel that I do not have the ability or the right to advocate for a particular learning method. I simply hope that this material can help those who share the spirit and perseverance of self-study to avoid unnecessary detours and gain a more enriching, diverse, and fulfilling learning experience.

MIT18.06: Linear Algebra

Course Introduction

  • University: MIT
  • Prerequisites: English
  • Programming Language: None
  • Course Difficulty: 🌟🌟🌟
  • Estimated Study Time: Varies by individual

Renowned mathematician, Professor Gilbert Strang, despite his advanced age, continues to teach the course. His classic textbook, "Introduction to Linear Algebra," has been adopted as the official course material at Tsinghua University. After reading a pirated PDF version, I felt guilty and tearfully spent over two hundred dollars to buy an English original for my collection. Below is the cover of the book. If you can fully understand the mathematical meaning behind the cover image, your understanding of linear algebra will surely reach new heights.

image

For a better learning experience, I recommend complementing it with the YouTube series "Essence of Linear Algebra" by the popular math channel, 3Blue1Brown.

MIT 6.031: Software Construction

Course Overview

  • University: MIT
  • Prerequisites: Proficiency in at least one programming language
  • Programming Language: Java
  • Course Difficulty: 🌟🌟🌟🌟
  • Estimated Time: 100 hours

The goal of this course is to teach students how to write high-quality code, which is defined by three objectives (quoted from the course designers to ensure accurate translation):

Safe from bugs. Correctness (correct behavior right now) and defensiveness (correct behavior in the future) are required in any software we build.

Easy to understand. The code has to communicate to future programmers who need to understand it and make changes in it (fixing bugs or adding new features). That future programmer might be you, months or years from now. You’ll be surprised how much you forget if you don’t write it down, and how much it helps your own future self to have a good design.

Ready for change. Software always changes. Some designs make it easy to make changes; others require throwing away and rewriting a lot of code.

To achieve these objectives, the course designers have carefully written a book that explains the core principles of software construction and valuable lessons learned by previous developers. The content covers topics ranging from writing comments and function specifications to designing abstract data structures and various aspects of concurrent programming. You will also get hands-on experience and practice these programming patterns through well-designed Java programming projects.

The code frameworks for all the programming assignments in this course were made available as open source in the Spring 2016 semester. The latest course materials can be found on the course website provided below.

Course Resources

  • Course Website: 2021spring, 2016spring
  • Course Videos: N/A
  • Course Textbook: Refer to the course notes on the course website
  • Course Assignments: 4 programming assignments + 1 project

UCB CS169: Software Engineering

Course Overview

  • University: UC Berkeley
  • Prerequisites: None
  • Programming Languages: Ruby/JavaScript
  • Course Difficulty: 🌟🌟🌟🌟
  • Estimated Time: 100 hours

UC Berkeley's software engineering course takes a different approach compared to many traditional software engineering courses that focus on class diagrams and documentation design in the "plan and document" paradigm. Instead, this course emphasizes the increasingly popular Agile Development model and utilizes cloud platforms to deliver software as a service (SaaS). To support this approach, the course designers have written a textbook called Software as a service, which uses the Ruby/Rails framework to illustrate the concept of SaaS and provides extensive programming exercises.

The course materials for this course are fully open-source and available on Edx, an online education platform initiated by MIT and Harvard University. You can search for the course Agile SaaS Development on Edx to start your learning journey. The course content follows the order of the textbook, guiding you step by step to build a software application using Agile Development principles and deploy it on a cloud platform for free.

Course Resources

CMU CS15213: CSAPP

Course Overview

  • University: CMU
  • Prerequisites: CS61A, CS61B
  • Programming Language: C
  • Course Difficulty: 🌟🌟🌟🌟🌟
  • Estimated Time: 150 hours

CMU's renowned and challenging course, CS15213: CSAPP, is widely known for its extensive content and difficult projects. The course covers topics such as assembly language, computer architecture, operating systems, compilation and linking, parallelism, and networking. As an introductory course to computer systems, it offers both depth and breadth, requiring considerable determination and coding skills for self-study.

The course is accompanied by the textbook "Computer Systems: A Programmer's Perspective" written by Professor Bryant, the head of CMU's Computer Science department. This book, also known as CSAPP, was the first computer science textbook that I read diligently from cover to cover. Although it can be challenging, it offers significant rewards.

Peking University has purchased the rights to this course and offers a course called "Introduction to Computer System" based on CSAPP. However, all the course resources and lab codes for CSAPP can be accessed on its official website (see links below).

Due to its popularity, this course is sought after by programmers worldwide, resulting in readily available project answers online. However, if you genuinely want to enhance your coding skills, I encourage you not to rely on any third-party code.

By diligently completing this course, your understanding of computer systems will undoubtedly advance to a higher level.

Course Resources

For students who find English challenging, you can refer to the Bilibili content creator δΉζ›²ι˜‘εΉ² for Chinese explanations of CSAPP (video link). It is said that even Chinese students at CMU watch this video in their classes. Additionally, if you have any doubts about the topics covered in Chapter 7 on linking after studying CSAPP, I recommend reading the book "The Self-Taught Programmer: The Linker, Loader, and Library" to deepen your understanding of program linking, ELF files, and dynamic libraries. After completing CSAPP and gaining a certain level of understanding of computer systems, I highly recommend this supplementary material for further reading.

MIT 6.S081: Operating System Engineering

Course Introduction

  • University: Massachusetts Institute of Technology (MIT)
  • Prerequisites: Computer Architecture, solid C programming skills, RISC-V assembly language
  • Programming Languages: C, RISC-V
  • Course Difficulty: 🌟🌟🌟🌟🌟
  • Estimated Study Time: 150 hours

MIT's renowned PDOS laboratory offers this operating system course for MIT undergraduate students. One of the professors teaching this course, Robert Morris, was a top hacker and the creator of the world's first worm virus, the Morris Worm.

This course originated from MIT's famous course 6.828. Several professors at MIT developed a teaching operating system called JOS based on x86 architecture, which was adopted by many prestigious universities for their own operating systems courses. However, with the emergence of RISC-V, these professors developed a new teaching operating system called xv6 based on RISC-V architecture and offered the course MIT6.S081. Due to the lightweight and easy-to-learn nature of RISC-V, students no longer need to deal with the complexity of numerous x86 "specific" mechanisms for compatibility, allowing them to focus on operating system development at a higher level.

The professors also wrote a detailed tutorial that explains the design principles and implementation details of xv6.

The teaching approach of this course is quite interesting. The instructor guides students to understand the various mechanisms and design details of operating systems by studying the source code of xv6, rather than just focusing on theoretical knowledge. Each week, there is a lab assignment that requires students to add new mechanisms and features to xv6, emphasizing the development of hands-on skills. The entire semester consists of 11 labs, allowing students to gain a comprehensive understanding of each part of the operating system and a great sense of accomplishment. Moreover, all the labs have well-designed testing frameworks, some with test code consisting of thousands of lines, which highlights the effort the MIT professors put into teaching this course.

In the second half of the course, students will study several classic papers in the field of operating systems, covering topics such as file systems, system security, networking, and virtualization. This provides an opportunity to explore cutting-edge research directions in the academic community.

Course Resources

Additional Resources

Resource Compilation

@PKUFlyingPig has compiled all the resources and assignment implementations used in this course in the repository PKUFlyingPig/MIT6.S081-2020fall - GitHub.

@KuangjuX has written solutions for the labs in MIT 6.S081, providing detailed explanations and additional knowledge. In addition, @KuangjuX has also reimplemented the xv6-riscv operating system using the Rust language: https://github.com/KuangjuX/xv6-rust

Course Syllabus

Here is a brief overview of the topics covered in each week of the course:

  1. Introduction, OS Structures, and xv6 Booting
  2. Page Tables, Virtual Memory, and Address Translation
  3. Trap and Interrupt Handling
  4. Multiprocessing and Locking
  5. File System and Logging
  6. Buffer Cache and I/O
  7. Signals and User-Level Traps
  8. Shell and System Call
  9. Allocator, Allocator Lab
  10. Isolation, Isolation Lab
  11. Networking and Final Thoughts

Certification

This course does not offer an official certificate upon completion. However, it provides valuable knowledge and hands-on experience in operating system development, which can greatly enhance your skills and understanding in this field.

How to Succeed in this Course

To succeed in this course, I recommend the following:

  1. Attend the lectures: Watch the course videos and take notes to ensure you understand the concepts and explanations provided by the instructors.
  2. Read the textbook: The textbook provides detailed explanations of the xv6 operating system and its design principles. Reading it will deepen your understanding of the material.
  3. Complete the lab assignments: The labs are the core of this course. Make sure to allocate enough time to complete them and understand the implementation details.
  4. Participate in the course community: Join the course discussion forums or online communities to interact with fellow students, ask questions, and seek help when needed.
  5. Supplement your knowledge: If you find certain concepts difficult to grasp, seek additional resources such as tutorials or videos to gain a different perspective.
  6. Be persistent: Operating system development can be challenging, but with persistence and determination, you can overcome difficulties and gain a solid understanding of the subject matter.

CMU 15-445: Database Systems

Course Overview

  • University: CMU
  • Prerequisites: C++, Data Structures and Algorithms, CMU 15-213 (also known as CS:APP, which is a prerequisite for enrolling in this course at CMU)
  • Programming Language: C++
  • Course Difficulty: 🌟🌟🌟🌟
  • Estimated Time: 100 hours

As an introductory course to CMU's database program, this course is taught by the renowned expert in the field, Andy Pavlo ("There are only two things I care about in this world: my wife and databases").

This is a high-quality course with comprehensive resources. The faculty and the CMU Database Group behind the course have made all the course infrastructure (Autograder, Discord) and course materials (lectures, notes, homework) fully open-source. This allows anyone interested in learning about databases to experience a course that is almost equivalent to what CMU students receive.

One of the highlights of this course is that the CMU Database Group has developed a teaching relational database called bustub specifically for this course. You will be required to modify and implement certain key components of this database as part of the course.

Specifically, in 15-445, you will work on implementing critical components of the disk-oriented traditional relational database Bustub through four projects. These components include the Buffer Pool Manager (memory management), B+ Tree (storage engine), Query Executors & Query Optimizer (operators & optimizer), and Concurrency Control. These correspond to Project #1 to Project #4.

It's worth mentioning that during the implementation process, you can use shell.cpp to compile bus tub-shell and observe the correctness of your component in real time. The feedback loop is very rewarding.

Furthermore, as a medium-sized C++ project, bustub covers various requirements such as program construction, code standards, and unit testing. It serves as an excellent open-source project for learning.

Course Resources

In Fall 2019, Project #2 involved implementing a hash index, and Project #4 focused on logging and recovery.

In Fall 2020, Project #2 involved implementing a B-tree, and Project #4 focused on concurrency control.

In Fall 2021, Project #1 focused on implementing a buffer pool manager, Project #2 involved implementing a hash index, and Project #4 focused on concurrency control.

In Fall 2022, the only change compared to Fall 2021 was replacing the hash index with a B+ tree index; everything else remained the same.

In Spring 2023, the overall content is similar to Fall 2022 (buffer pool, B+ tree index, operators, concurrency control). However, Project #0 has been replaced with a Copy-On-Write Trie, and a fun task of registering case-sensitive functions has been added. You can see the actual effects of the functions you write directly in the compiled bustub-shell, which is very rewarding.

It's important to note that bustub is no longer maintained for versions before 2020.

The last project, Logging & Recovery, in Fall 2019 is broken. Although it might still work on the 2019 git head, there is likely no publicly available version on Gradescope. Therefore, it is not recommended to attempt that project. It's enough to review the code and handout.

Perhaps in the Fall 2023 version, the recovery-related functionality will be fixed, and there might be a brand-new Recovery Project. Let's wait and see. πŸ€ͺ

If you have the time, trying out the projects is recommended. They can deepen your understanding, especially when you feel that you haven't fully grasped the concepts from the textbook. Completing all the projects will undoubtedly be beneficial (personally and professionally) if you want to pursue a career in databases or distributed systems.

Course Outline

Here is a general outline of the topics covered in CMU 15-445: Database Systems. Keep in mind that the specific topics and order may vary slightly each semester.

  1. Introduction and Architecture

    • Course Introduction
    • Database System Architecture
    • Storage Hierarchy
    • Buffer Pool Management
  2. Disk Management

    • Disks and Files
    • File Organization and Indexing
    • B+ Tree Indexing
  3. Query Execution

    • Relational Operators
    • Query Execution and Optimizer
    • Join Algorithms
  4. Concurrency Control

    • Introduction to Concurrency Control
    • Lock-based Concurrency Control
    • Multiversion Concurrency Control
  5. Recovery

    • Introduction to Recovery
    • Logging and Crash Recovery
  6. Advanced Topics

    • Database Tuning
    • Distributed Databases
    • Big Data Systems

Course Assignments

CMU 15-445: Database Systems typically consist of a series of projects and homework assignments. The number and specifics of the assignments may vary from semester to semester. Here is a general overview of the projects you might encounter:

  1. Project #1: Buffer Pool Manager

    • Implement a buffer pool manager that manages the memory used by the database system.
    • Familiarize yourself with the Bustub codebase and the overall project structure.
    • Understand the buffer pool manager's responsibilities, such as fetching and evicting pages from memory.
  2. Project #2: B+ Tree Index

    • Implement a B+ tree index, which is a common data structure used for efficient indexing in database systems.
    • Understand the structure and algorithms used in B+ trees.
    • Implement insertion, deletion, and searching in the B+ tree index.
  3. Project #3: Query Execution

    • Implement various relational operators, such as table scans, joins, and aggregations.
    • Understand the query execution plan and how to optimize it.
    • Implement a query optimizer that generates an efficient query execution plan.
  4. Project #4: Concurrency Control

    • Implement a concurrency control mechanism to allow multiple transactions to execute concurrently without interfering with each other.
    • Understand different concurrency control protocols, such as locking and multiversion concurrency control (MVCC).
    • Handle transaction scheduling and ensure isolation and consistency of the database.
  5. Project #5: Logging and Recovery (optional)

    • Implement logging and recovery mechanisms to ensure the durability of the database in the face of failures.
    • Understand the write-ahead logging protocol and how to recover the database from a crash.

In addition to the projects, there will be homework assignments that cover the theoretical concepts discussed in class. These assignments will help reinforce your understanding of the material and prepare you for exams.

Tips for Success

  • Start Early: The projects in CMU 15-445: Database Systems can be challenging and time-consuming. Start early to give yourself enough time to understand the concepts, work on the codebase, and complete the assignments.
  • Read the Documentation: Familiarize yourself with the Bustub codebase and the provided documentation. Understanding the existing code will help you implement the required components correctly.
  • Attend Lectures and Discussions: Attend the lectures and discussion sessions to get a deeper understanding of the course material. Ask questions and participate actively in class to clarify your doubts.
  • Use the Course Resources: Take advantage of the course materials, including lecture videos, slides, and notes. They are valuable resources for learning the concepts and understanding the project requirements.
  • Collaborate and Seek Help: Don't hesitate to collaborate with your classmates and seek help from the course staff. Database systems can be complex, and discussing ideas and problems with others can enhance your understanding and help you overcome challenges.
  • Test Your Code: Write comprehensive unit tests to verify the correctness of your code. The autograder will provide feedback on the basic functionality, but it's essential to have additional tests to catch edge cases and ensure your implementation is robust.
  • Follow Coding Standards: Pay attention to the coding standards provided by the course. Adhering to these standards will make your code more readable, maintainable, and consistent with the rest of the codebase.
  • Have Fun: Databases are fascinating, and CMU 15-445: Database Systems offers an excellent opportunity to dive deep into their inner workings. Enjoy the learning process, and don't be afraid to explore and experiment with the concepts.

Additional Resources

Stanford CS143: Compilers

Course Overview

  • University: Stanford
  • Prerequisites: Computer Architecture
  • Programming Languages: Java or C++
  • Course Difficulty: 🌟🌟🌟🌟🌟
  • Estimated Time: 150 hours

Stanford's compilers course focuses on the development of a Class-Object-Oriented-Language (COOL). The main objective of this course is to implement a compiler for the COOL language, which involves translating high-level COOL code into MIPS assembly language and successfully executing it on the Spim MIPS simulator.

The theoretical part of the course covers topics such as lexical analysis, syntax analysis, semantic analysis, runtime environment, register allocation, code optimization, and code generation, following the order of the "Dragon Book." The practical part is divided into four stages: lexical analysis, syntax analysis, semantic analysis, and code generation. The difficulty level gradually increases, and the optimization part provides students with significant design flexibility.

Course Resources

MIT6.824: Distributed System

Course Overview

  • University: MIT
  • Prerequisites: Computer Architecture, Parallel Programming
  • Programming Language: Go
  • Course Difficulty: 🌟🌟🌟🌟🌟🌟
  • Estimated Time: 200 hours

This course, just like MIT 6.S081, is produced by the renowned PDOS Laboratory at MIT. The instructor, Professor Robert Morris, was a top hacker and the creator of the world's first worm virus, the Morris worm.

In each lecture of this course, we will closely study a classic paper in the field of distributed systems, through which we will learn the important principles and key technologies for designing and implementing distributed systems. The course projects, known for their difficulty, will guide you through the step-by-step implementation of a KV-store framework based on the Raft consensus algorithm. Through painful debugging, you will experience the randomness and complexity brought by parallelism and distribution.

Similarly, due to its fame, there are countless online answers for this course. I encourage you not to rely on them but strive to independently complete the entire project.

Course Resources

USTC Computer Networking: A Top-Down Approach

Course Overview

  • University: University of Science and Technology of China (USTC)
  • Instructors: Huan Zheng, Jian Yang
  • Prerequisites: Operating Systems (not required)
  • Programming Language: None
  • Course Difficulty: 🌟🌟🌟
  • Estimated Time: 40 hours

This course is one of the most popular computer networking courses on the Chinese internet. It uses the renowned textbook "Computer Networking: A Top-Down Approach" and focuses more on practical aspects rather than pure theory. (Strongly recommended: It's advised to read the textbook before attending the lectures to avoid potential confusion during class).

The course covers most of the material from the top-down approach and also includes topics relevant to exams. You can watch the lectures with confidence.

The course videos are uploaded by Professor Huan Zheng himself on Bilibili and he has been actively responding to comments since 2020. He is truly responsible and dedicated.

Course Resources