
Foreword
This is a self-learning guide to computer science, and a memento of my three years of self-learning at university.
It is also a gift to the young students at Peking University. It would be a great encouragement and comfort to me if this book could be of even the slightest help to you in your college life.
The book is currently organized to include the following sections (if you have other good suggestions, or would like to join the ranks of contributors, please feel free to email zhongyinmin@pku.edu.cn or ask questions in the issue).
- Productivity Toolkit: IDE, VPN, StackOverflow, Git, Github, Vim, Latex, GNU Make and so on.
- Environment configuration: PC/Server development environment setup, DevOps tutorials and so on.
- Book recommendations: Those who have read the CSAPP must have realized the importance of good books. I will list links to books and resources in different areas of Computer Science that I find rewarding to read.
- List of high quality CS courses: I will summarize all the high quality foreign CS courses I have taken into different categories and give relevant self-learning advice. Most of them will have a separate repository containing relevant resources as well as my homework/project implementations.
The place where dreams start —— CS61A
In my freshman year, I was a novice who knew nothing about computers. I installed a giant IDE Visual Studio and fight with OJ every day. With my high school maths background, I did pretty well in maths courses, but I felt struggled to learn courses in my major. When it came to programming, all I could do was open up that clunky IDE, create a new project that I didn't know exactly what it was for, and then cin, cout, for loops, and then CE, RE, WA loops. I was in a state where I was desperately trying to learn well but I didn't know how to learn. I listened carefully in class but I couldn't solve the homework problems. I spent almost all my spare time doing the homework after class, but the results were disappointing. I still retain the source code of the project for Introduction to Computing course —— a single 1200-line C++ file with no header files, no class abstraction, no unit tests, no makefile, no version control. The only good thing is that it can run, the disadvantage is the complement of "can run". For a while I wondered if I wasn't cut out for computer science, as all my childhood imaginings of geekiness had been completely ruined by my first semester's experience.
It all turned around during the winter break of my freshman year, when I had a hankering to learn Python. I overheard someone recommend CS61A, a freshman introductory course at UC Berkeley on Python. I'll never forget that day, when I opened the CS61A course website. It was like Columbus discovering a new continent, and I opened the door to a new world.
I finished the course in 3 weeks and for the first time I felt that CS could be so fulfilling and interesting, and I was shocked that there existed such a great course in the world.
To avoid any suspicion of pandering to foreign courses, I will tell you about my experience of studying CS61A from the perspective of a pure student.
-
Course website developed by course staffs: The course website integrates all the course resources into one, with a well organised course schedule, links to all slides, recorded videos and homework, detailed and clear syllabus, list of exams and solutions from previous years. Aesthetics aside, this website is so convenient for students.
-
Textbook written by course instructor: The course instructor has adapted the classic MIT textbook Structure and Interpretation of Computer Programs (SICP) into Python (the original textbook was based on Scheme). This is a great way to ensure that the classroom content is consistent with the textbook, while adding more details. The entire book is open source and can be read directly online.
-
Various, comprehensive and interesting homework: There are 14 labs to reinforce the knowledge gained in class, 10 homework assignments to practice, and 4 projects each with thousands of lines of code, all with well-organized skeleton code and babysitting instructions. Unlike the old-school OJ and Word document assignments, each lab/homework/project has a detailed handout document, fully automated grading scripts, and CS61A staffs have even developed an automated assignment submission and grading system. Of course, one might say "How much can you learn from a project where most of code are written by your teaching assistants?" . For someone who is new to CS and even stumbling over installing Python, this well-developed skeleton code allows students to focus on reinforcing the core knowledge they've learned in class, but also gives them a sense of achievement that they already can make a little game despite of learning Python only for a month. It also gives them the opportunity to read and learn from other people's high quality code so that they can reuse it later. I think in the freshman year, this kind of skeleton code is absolutely beneficial. The only bad thing perhaps is for the instructors and teaching assistants, as developing such assignments can conceivably require a considerable time commitment.
-
Weekly discussion sessions: The teaching assistants will explain the difficult knowledge in class and add some supplementary materials which may not be covered in class. Also, there will be exercises from exams of previous years. All the exercises are written in LaTeX with solutions.
In CS61A, You don't need any prerequesites about CS at all. You just need to pay attention, spend time and work hard. The feeling that you do not know what to do, that you are not getting anything in return for all the time you put in, is gone. It suited me so well that I fell in love with self-learning.
Imagine that if someone could chew up the hard knowledge and present it to you in a vivid and straightforward way, with so many fancy and varied projects to reinforce your theoretical knowledge, you'd think they were really trying their best to make you fully grasp the course, and it was even an insult to the course builders not to learn it well.
If you think I'm exaggerating, start with CS61A, because it's where my dreams began.
Why write this book?
In the 2020 Fall semester, I worked as a teaching assistant for the class "Introduction to Computer Systems" at Peking University. At that time, I had been studying totally on my own for over a year. I enjoyed this style of learning immensely. To share this joy, I have made a CS Self-learning Materials List for students in my seminar. It was purely on a whim at the time, as I wouldn't dare to encourage my students to skip classes and study on their own.
But after another year of maintenance, the list has become quite comprehensive, covering most of the courses in Computer Science, Artificial Intelligence and Soft Engineering, and I have built separate repositories for each course, summarising the self-learning materials that I used.
In my last college year, when I opened up my curriculum book, I realized that it was already a subset of my self-learning list. By then, it was only two and a half years after I had started my self-learning journey. Then, a bold idea came to my mind: perhaps I could create a self-learning book, write down the difficulty I encountered and the interest I found during these years of self-learning, hoping to make it easy for students who may also enjoy self-learning to start their wonderful self-learning journey.
If you can build up the whole CS foundation in less than three years, have relatively solid mathematical skills and coding ability, experience dozens of projects with thousands of lines of code, master at least C/C++/Java/JS/Python/Go/Rust and other mainstream programming languages, have a good understanding of algorithms, circuits, architectures, networks, operating systems, compilers, artificial intelligence, machine learning, computer vision, natural language processing, reinforcement learning, cryptography, information theory, game theory, numerical analysis, statistics, distributed systems, parallel computing, database systems, computer graphics, web development, cloud computing, supercomputing etc. I think you will be confident enough to choose the area you are interested in, and you will be quite competitive in both industry and academia.
I firmly believe that if you have read to this line, you do not lack the ability and committment to learn CS well, you just need a good teacher to teach you a good course. And I will try my best to pick such courses for you, based on my three years of experience.
Pros
For me, the biggest advantage of self-learning is that I can adjust the pace of learning entirely according to my own progress. For difficult parts, I can watch the videos over and over again, Google it online and ask questions on StackOverflow until I have it all figured out. For those that I mastered relatively quickly, I could skip them at twice or even three times the speed.
Another great thing about self-learning is that you can learn from different perspectives. I have taken core courses such as architectures, networking, operating systems, and compilers from different universities. Different instructors may have different views on the same knowledge, which will broaden your horizon.
A third advantage of self-learning is that you do not need to go to the class, listening to the boring lectures.
Cons
Of course, as a big fan of self-learning, I have to admit that it has its disadvantages.
The first is the difficulty of communication. I'm actually a very keen questioner, and I like to follow up all the points I don't understand. But when you're facing a screen and you hear a teacher talking about something you don't understand, you can't go to the other end of the network and ask him or her for clarification. I try to mitigate this by thinking independently and making good use of Google, but it would be great to have a few friends to study together. You can refer to README for more information on participating a community group.
The second thing is that these courses are basically in English. From the videos to the slides to the assignments, all in English. You may struggle at first, but I think it's a challenge that if you overcome, it will be extremely rewarding. Because at the moment, as reluctant as I am, I have to admit that in computer science, a lot of high quality documentation, forums and websites are all in English.
The third, and I think the most difficult one, is self-discipline. Because have no DDL can sometimes be a really scary thing, especially when you get deeper, many foreign courses are quite difficult. You have to be self-driven enough to force yourself to settle down, read dozens of pages of Project Handout, understand thousands of lines of skeleton code and endure hours of debugging time. With no credits, no grades, no teachers, no classmates, just one belief - that you are getting better.
Who is this book for?
As I said in the beginning, anyone who is interested in learning computer science on their own can refer to this book. If you already have some basic skills and are just interested in a particular area, you can selectively pick and choose what you are interested in to study. Of course, if you are a novice who knows nothing about computers like I did back then, and just begin your college journey, I hope this book will be your cheat sheet to get the knowledge and skills you need in the least amount of time. In a way, this book is more like a course search engine ordered according to my experience, helping you to learn high quality CS courses from the world's top universities without leaving home.
Of course, as an undergraduate student who has not yet graduated, I feel that I am not in a position nor have the right to preach one way of learning. I just hope that this material will help those who are also self-motivated and persistent to gain a richer, more varied and satisfying college life.
Special thanks
I would like to express my sincere gratitude to all the professors who have made their courses public for free. These courses are the culmination of decades of their teaching careers, and they have chosen to selflessly make such a high quality CS education available to all. Without them, my university life would not have been as fulfilling and enjoyable. Many of the professors would even reply with hundreds of words in length after I had sent them a thank you email, which really touched me beyond words. They also inspired me all the time that if decide to do something, do it with all heart and soul.
Want to join as a contributor?
There is a limit to how much one person can do, and this book was written by me under a heavy research schedule, so there are inevitably imperfections. In addition, as I work in the area of systems, many of the courses focus on systems, and there is relatively little content related to advanced mathematics, computing theory, and advanced algorithms. If any of you would like to share your self-learning experience and resources in other areas, you can directly initiate a Pull Request in the project, or feel free to contact me by email (zhongyinmin@pku.edu.cn).

Foreword
This is a self-learning guide to computer science, and a memento of my three years of self-learning at university.
It is also a gift to the young students at Peking University. It would be a great encouragement and comfort to me if this book could be of even the slightest help to you in your college life.
The book is currently organized to include the following sections (if you have other good suggestions, or would like to join the ranks of contributors, please feel free to email zhongyinmin@pku.edu.cn or ask questions in the issue).
- User guide for this book: Given the numerous resources covered in this book, I have developed corresponding usage guides based on different people's free time and learning objectives.
- A reference CS learning plan: This is a comprehensive and systematic CS self-learning plan that I have formulated based on my own self-study experience.
- Productivity Toolkit: IDE, VPN, StackOverflow, Git, Github, Vim, Latex, GNU Make and so on.
- Book recommendations: Those who have read the CSAPP must have realized the importance of good books. I will list links to books and resources in different areas of Computer Science that I find rewarding to read.
- List of high quality CS courses: I will summarize all the high quality foreign CS courses I have taken and the community contributed into different categories and give relevant self-learning advice. Most of them will have a separate repository containing relevant resources as well as the homework/project implementations.
The place where dreams start —— CS61A
In my freshman year, I was a novice who knew nothing about computers. I installed a giant IDE Visual Studio and fight with OJ every day. With my high school maths background, I did pretty well in maths courses, but I felt struggled to learn courses in my major. When it came to programming, all I could do was open up that clunky IDE, create a new project that I didn't know exactly what it was for, and then cin, cout, for loops, and then CE, RE, WA loops. I was in a state where I was desperately trying to learn well but I didn't know how to learn. I listened carefully in class but I couldn't solve the homework problems. I spent almost all my spare time doing the homework after class, but the results were disappointing. I still retain the source code of the project for Introduction to Computing course —— a single 1200-line C++ file with no header files, no class abstraction, no unit tests, no makefile, no version control. The only good thing is that it can run, the disadvantage is the complement of "can run". For a while I wondered if I wasn't cut out for computer science, as all my childhood imaginings of geekiness had been completely ruined by my first semester's experience.
It all turned around during the winter break of my freshman year, when I had a hankering to learn Python. I overheard someone recommend CS61A, a freshman introductory course at UC Berkeley on Python. I'll never forget that day, when I opened the CS61A course website. It was like Columbus discovering a new continent, and I opened the door to a new world.
I finished the course in 3 weeks and for the first time I felt that CS could be so fulfilling and interesting, and I was shocked that there existed such a great course in the world.
To avoid any suspicion of pandering to foreign courses, I will tell you about my experience of studying CS61A from the perspective of a pure student.
-
Course website developed by course staffs: The course website integrates all the course resources into one, with a well organised course schedule, links to all slides, recorded videos and homework, detailed and clear syllabus, list of exams and solutions from previous years. Aesthetics aside, this website is so convenient for students.
-
Textbook written by course instructor: The course instructor has adapted the classic MIT textbook Structure and Interpretation of Computer Programs (SICP) into Python (the original textbook was based on Scheme). This is a great way to ensure that the classroom content is consistent with the textbook, while adding more details. The entire book is open source and can be read directly online.
-
Various, comprehensive and interesting homework: There are 14 labs to reinforce the knowledge gained in class, 10 homework assignments to practice, and 4 projects each with thousands of lines of code, all with well-organized skeleton code and babysitting instructions. Unlike the old-school OJ and Word document assignments, each lab/homework/project has a detailed handout document, fully automated grading scripts, and CS61A staffs have even developed an automated assignment submission and grading system. Of course, one might say "How much can you learn from a project where most of code are written by your teaching assistants?" . For someone who is new to CS and even stumbling over installing Python, this well-developed skeleton code allows students to focus on reinforcing the core knowledge they've learned in class, but also gives them a sense of achievement that they already can make a little game despite of learning Python only for a month. It also gives them the opportunity to read and learn from other people's high quality code so that they can reuse it later. I think in the freshman year, this kind of skeleton code is absolutely beneficial. The only bad thing perhaps is for the instructors and teaching assistants, as developing such assignments can conceivably require a considerable time commitment.
-
Weekly discussion sessions: The teaching assistants will explain the difficult knowledge in class and add some supplementary materials which may not be covered in class. Also, there will be exercises from exams of previous years. All the exercises are written in LaTeX with solutions.
In CS61A, You don't need any prerequesites about CS at all. You just need to pay attention, spend time and work hard. The feeling that you do not know what to do, that you are not getting anything in return for all the time you put in, is gone. It suited me so well that I fell in love with self-learning.
Imagine that if someone could chew up the hard knowledge and present it to you in a vivid and straightforward way, with so many fancy and varied projects to reinforce your theoretical knowledge, you'd think they were really trying their best to make you fully grasp the course, and it was even an insult to the course builders not to learn it well.
If you think I'm exaggerating, start with CS61A, because it's where my dreams began.
Why write this book?
In the 2020 Fall semester, I worked as a teaching assistant for the class "Introduction to Computer Systems" at Peking University. At that time, I had been studying totally on my own for over a year. I enjoyed this style of learning immensely. To share this joy, I have made a CS Self-learning Materials List for students in my seminar. It was purely on a whim at the time, as I wouldn't dare to encourage my students to skip classes and study on their own.
But after another year of maintenance, the list has become quite comprehensive, covering most of the courses in Computer Science, Artificial Intelligence and Soft Engineering, and I have built separate repositories for each course, summarising the self-learning materials that I used.
In my last college year, when I opened up my curriculum book, I realized that it was already a subset of my self-learning list. By then, it was only two and a half years after I had started my self-learning journey. Then, a bold idea came to my mind: perhaps I could create a self-learning book, write down the difficulty I encountered and the interest I found during these years of self-learning, hoping to make it easy for students who may also enjoy self-learning to start their wonderful self-learning journey.
If you can build up the whole CS foundation in less than three years, have relatively solid mathematical skills and coding ability, experience dozens of projects with thousands of lines of code, master at least C/C++/Java/JS/Python/Go/Rust and other mainstream programming languages, have a good understanding of algorithms, circuits, architectures, networks, operating systems, compilers, artificial intelligence, machine learning, computer vision, natural language processing, reinforcement learning, cryptography, information theory, game theory, numerical analysis, statistics, distributed systems, parallel computing, database systems, computer graphics, web development, cloud computing, supercomputing etc. I think you will be confident enough to choose the area you are interested in, and you will be quite competitive in both industry and academia.
I firmly believe that if you have read to this line, you do not lack the ability and committment to learn CS well, you just need a good teacher to teach you a good course. And I will try my best to pick such courses for you, based on my three years of experience.
Pros
For me, the biggest advantage of self-learning is that I can adjust the pace of learning entirely according to my own progress. For difficult parts, I can watch the videos over and over again, Google it online and ask questions on StackOverflow until I have it all figured out. For those that I mastered relatively quickly, I could skip them at twice or even three times the speed.
Another great thing about self-learning is that you can learn from different perspectives. I have taken core courses such as architectures, networking, operating systems, and compilers from different universities. Different instructors may have different views on the same knowledge, which will broaden your horizon.
A third advantage of self-learning is that you do not need to go to the class, listening to the boring lectures.
Cons
Of course, as a big fan of self-learning, I have to admit that it has its disadvantages.
The first is the difficulty of communication. I'm actually a very keen questioner, and I like to follow up all the points I don't understand. But when you're facing a screen and you hear a teacher talking about something you don't understand, you can't go to the other end of the network and ask him or her for clarification. I try to mitigate this by thinking independently and making good use of Google, but it would be great to have a few friends to study together. You can refer to README for more information on participating a community group.
The second thing is that these courses are basically in English. From the videos to the slides to the assignments, all in English. You may struggle at first, but I think it's a challenge that if you overcome, it will be extremely rewarding. Because at the moment, as reluctant as I am, I have to admit that in computer science, a lot of high quality documentation, forums and websites are all in English.
The third, and I think the most difficult one, is self-discipline. Because have no DDL can sometimes be a really scary thing, especially when you get deeper, many foreign courses are quite difficult. You have to be self-driven enough to force yourself to settle down, read dozens of pages of Project Handout, understand thousands of lines of skeleton code and endure hours of debugging time. With no credits, no grades, no teachers, no classmates, just one belief - that you are getting better.
Who is this book for?
As I said in the beginning, anyone who is interested in learning computer science on their own can refer to this book. If you already have some basic skills and are just interested in a particular area, you can selectively pick and choose what you are interested in to study. Of course, if you are a novice who knows nothing about computers like I did back then, and just begin your college journey, I hope this book will be your cheat sheet to get the knowledge and skills you need in the least amount of time. In a way, this book is more like a course search engine ordered according to my experience, helping you to learn high quality CS courses from the world's top universities without leaving home.
Of course, as an undergraduate student who has not yet graduated, I feel that I am not in a position nor have the right to preach one way of learning. I just hope that this material will help those who are also self-motivated and persistent to gain a richer, more varied and satisfying college life.
Special thanks
I would like to express my sincere gratitude to all the professors who have made their courses public for free. These courses are the culmination of decades of their teaching careers, and they have chosen to selflessly make such a high quality CS education available to all. Without them, my university life would not have been as fulfilling and enjoyable. Many of the professors would even reply with hundreds of words in length after I had sent them a thank you email, which really touched me beyond words. They also inspired me all the time that if decide to do something, do it with all heart and soul.
Want to join as a contributor?
There is a limit to how much one person can do, and this book was written by me under a heavy research schedule, so there are inevitably imperfections. In addition, as I work in the area of systems, many of the courses focus on systems, and there is relatively little content related to advanced mathematics, computing theory, and advanced algorithms. If any of you would like to share your self-learning experience and resources in other areas, you can directly initiate a Pull Request in the project, or feel free to contact me by email (zhongyinmin@pku.edu.cn).
MIT18.06: Linear Algebra
Descriptions
- Offered by: MIT
- Prerequisites: English
- Programming languages: None
- Difficulty: 🌟🌟🌟
- Class Hour: Varying from person to person
Gilbert Strang, a great mathematician at MIT, still insists on teaching in his eighties. His classic text book Introduction to Linear Algebra has been adopted as an official textbook by Tsinghua University. After reading the PDF version, I felt deeply guilty and spent more than 200 yuan to purchase a genuine version in English as collection. The cover of this book is attached below. If you can fully understand the mathematical meaning of the cover picture, then your understanding of linear algebra will definitely reach a new height.

In addition to the course materials, the famous Youtuber 3Blue1Brown's video series The Essence of Linear Algebra are also great learning resources.
Resources
- Course Website: https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algebra-fall-2011/syllabus/
- Recordings: refer to the course website
- Textbook: Introduction to Linear Algebra, Gilbert Strang
- Assignments: refer to the course website
MIT18.06: Linear Algebra
Descriptions
- Offered by: MIT
- Prerequisites: English
- Programming languages: None
- Difficulty: 🌟🌟🌟
- Class Hour: Varying from person to person
Gilbert Strang, a great mathematician at MIT, still insists on teaching in his eighties. His classic text book Introduction to Linear Algebra has been adopted as an official textbook by Tsinghua University. After reading the PDF version, I felt deeply guilty and spent more than 200 yuan to purchase a genuine version in English as collection. The cover of this book is attached below. If you can fully understand the mathematical meaning of the cover picture, then your understanding of linear algebra will definitely reach a new height.

In addition to the course materials, the famous Youtuber 3Blue1Brown's video series The Essence of Linear Algebra are also great learning resources.
Resources
- Course Website: fall2011
- Recordings: refer to the course website
- Textbook: Introduction to Linear Algebra, Gilbert Strang
- Assignments: refer to the course website
On May 15th, 2023, revered mathematics professor Gilbert Strang capped his 61-year career as a faculty member at MIT by delivering his final 18.06 Linear Algebra lecture before retiring at the age of 88. In addition to a brief review for the course final exam, the overflowing audience (both in person and on the live YouTube stream) heard recollections, appreciations, and congratulations from Prof. Strang’s colleagues and former students. A rousing standing ovation concluded this historic event.
MIT6.050J: Information theory and Entropy
Descriptions
- Offered by: MIT
- Prerequisites: None
- Programming Languages: None
- Difficulty: 🌟🌟🌟
- Class Hour: 100 hours
This is MIT's introductory information theory course for freshmen, Professor Penfield has written a special textbook for this course as course notes, which is in-depth and interesting.
Course Resources
- Course Website: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-050j-information-and-entropy-spring-2008/index.htm
- Textbook: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-050j-information-and-entropy-spring-2008/syllabus/MIT6_050JS08_textbook.pdf
- Assignments: see the course website for details, including written assignments and Matlab programming assignments.
MIT6.050J: Information theory and Entropy
Descriptions
- Offered by: MIT
- Prerequisites: None
- Programming Languages: None
- Difficulty: 🌟🌟🌟
- Class Hour: 100 hours
This is MIT's introductory information theory course for freshmen, Professor Penfield has written a special textbook for this course as course notes, which is in-depth and interesting.
Course Resources
- Course Website: spring2008
- Textbook: Information and Entropy
- Assignments: see the course website for details, including written assignments and Matlab programming assignments.
MIT 6.042J: Mathematics for Computer Science
Descriptions
- Offered by: MIT
- Prerequisites: Calculus, Linear Algebra
- Programming Languages: Python preferred
- Difficulty: 🌟🌟🌟
- Class Hour: 50-70 hours
This is MIT‘s discrete mathematics and probability course taught by the notable Tom Leighton (co-founder of Akamai). It is very useful for learning algorithms subsequently.
Course Resources
- Course Website: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/
- Recordings: https://www.youtube.com/playlist?list=PLB7540DEDD482705B
- Assignments: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/assignments/
MIT 6.042J: Mathematics for Computer Science
Descriptions
- Offered by: MIT
- Prerequisites: Calculus, Linear Algebra
- Programming Languages: Python preferred
- Difficulty: 🌟🌟🌟
- Class Hour: 50-70 hours
This is MIT‘s discrete mathematics and probability course taught by the notable Tom Leighton (co-founder of Akamai). It is very useful for learning algorithms subsequently.
Course Resources
- Course Website: spring2015, fall2010, fall2005
- Recordings: Refer to the course website
- Assignments: Refer to the course website
CS61B: Data Structures and Algorithms
Descriptions
- Offered by: UC Berkeley
- Prerequisites: CS61A
- Programming Languages: Java
- Difficulty: 🌟🌟🌟
- Class Hour: 60 hours
It is the second course of UC Berkeley's CS61 series. It mainly focuses on the design of data structures and algorithms as well as giving students the opportunity to be exposed to thousands of lines of engineering code and gain a preliminary understanding of software engineering through Java.
I took the version for 2018 Spring. Josh Hug, the instructor, generously made the autograder open-source. You can use gradescope invitation code published on the website for free and easily test your implementation.
All programming assignments in this course are done in Java. Students without Java experience don't have to worry. There will be detailed tutorials in the course from the configuration of IDEA to the core syntax and features of Java.
The quality of homework in this class is also unparalleled. The 14 labs will allow you to implement most of the data structures mentioned in the class by yourself, and the 10 homework will allow you to use data structures and algorithms to solve practical problems. In addition, there are 3 projects that give you the opportunity to be exposed to thousands of lines of engineering code and enhance your Java skills in practice.
Resources
Course Resources
- Course Website: https://sp18.datastructur.es/
- Recordings: refer to the course website
- Textbook: None
- Assignments: Slightly different every year. In the spring semester of 2018, there are 14 Labs, 10 Homework and 3 Projects. Please refer to the course website for specific requirements.
Personal resources
All resources and homework implementations used by @PKUFlyingPig in this course are summarized in PKUFlyingPig/CS61B - GitHub.
CS61B: Data Structures and Algorithms
Descriptions
- Offered by: UC Berkeley
- Prerequisites: CS61A
- Programming Languages: Java
- Difficulty: 🌟🌟🌟
- Class Hour: 60 hours
It is the second course of UC Berkeley's CS61 series. It mainly focuses on the design of data structures and algorithms as well as giving students the opportunity to be exposed to thousands of lines of engineering code and gain a preliminary understanding of software engineering through Java.
I took the version for 2018 Spring. Josh Hug, the instructor, generously made the autograder open-source. You can use gradescope invitation code published on the website for free and easily test your implementation.
All programming assignments in this course are done in Java. Students without Java experience don't have to worry. There will be detailed tutorials in the course from the configuration of IDEA to the core syntax and features of Java.
The quality of homework in this class is also unparalleled. The 14 labs will allow you to implement most of the data structures mentioned in the class by yourself, and the 10 homework will allow you to use data structures and algorithms to solve practical problems. In addition, there are 3 projects that give you the opportunity to be exposed to thousands of lines of engineering code and enhance your Java skills in practice.
Resources
Course Resources
- Course Website: spring2024, fall2023, spring2023, spring2018
- Recordings: refer to the course website
- Textbook: None
- Assignments: Slightly different every year. In the spring semester of 2018, there are 14 Labs, 10 Homework and 3 Projects. Please refer to the course website for specific requirements.
Personal resources
All resources and homework implementations used by @PKUFlyingPig in this course are summarized in PKUFlyingPig/CS61B - GitHub.
CS61A: Structure and Interpretation of Computer Programs
Descriptions
- Offered by: UC Berkeley
- Prerequisites: None
- Programming Languages: Python, Scheme, SQL
- Difficulty: 🌟🌟
- Class Hour: 50 hours
This is the first course in the Berkeley CS61 series, and my introductory course to Python.
The CS61 series is composed of introductory courses to the CS major at Berkeley, where
- CS61A: Emphasizes abstraction and equips students to use programs to solve real-world problems without focusing on the underlying hardware details.
- CS61B: Focuses on algorithms and data structures and the construction of large-scale programs, where students combine knowledge of algorithms and data structures with the Java language to build large-scale projects at the thousand-line code level (such as a simple Google Maps, a two-dimensional version of Minecraft).
- CS61C: Focusing on computer architecture, students will understand how high-level languages (e.g. C) are converted step-by-step into machine-understandable bit strings and executed on CPUs. Students will learn about the RISC-V architecture and implement a CPU on their own by using Logism.
CS61B and CS61C are both included in this guidebook.
Going back to CS61A, you will note that this is not just a programming language class, but goes deeper into the principles of program construction and operation. Finally you will implement an interpreter for Scheme in Python in Project 4. In addition, abstraction will be a major theme in this class, as you will learn about functional programming, data abstraction, object orientation, etc. to make your code more readable and modular. Of course, learning a programming language is also a big part of this course. You will master three programming languages, Python, Scheme, and SQL, and in learning and comparing them, you will be equiped with the ability to quickly master a new programming language.
Note: If you have no prior programming experience at all, getting started with CS61A requires a relatively high level of learning ability and self-discipline. To avoid the frustration of a struggling experience, you may choose a more friendly introductory programming course at first. For example, CS10 at Berkeley or CS50 at Harvard are both good choices.
Course Resources
- Course Website: https://inst.eecs.berkeley.edu/~cs61a/su20/
- Recordings: refer to the course website
- Textbook: https://www.composingprograms.com/
- Assignments: refer to the course website
Personal Resources
All the resources and assignments used by @PKUFlyingPig in this course are maintained in PKUFlyingPig/CS61A - GitHub
CS61A: Structure and Interpretation of Computer Programs
Descriptions
- Offered by: UC Berkeley
- Prerequisites: None
- Programming Languages: Python, Scheme, SQL
- Difficulty: 🌟🌟
- Class Hour: 50 hours
This is the first course in the Berkeley CS61 series, and my introductory course to Python.
The CS61 series is composed of introductory courses to the CS major at Berkeley, where
- CS61A: Emphasizes abstraction and equips students to use programs to solve real-world problems without focusing on the underlying hardware details.
- CS61B: Focuses on algorithms and data structures and the construction of large-scale programs, where students combine knowledge of algorithms and data structures with the Java language to build large-scale projects at the thousand-line code level (such as a simple Google Maps, a two-dimensional version of Minecraft).
- CS61C: Focusing on computer architecture, students will understand how high-level languages (e.g. C) are converted step-by-step into machine-understandable bit strings and executed on CPUs. Students will learn about the RISC-V architecture and implement a CPU on their own by using Logism.
CS61B and CS61C are both included in this guidebook.
Going back to CS61A, you will note that this is not just a programming language class, but goes deeper into the principles of program construction and operation. Finally you will implement an interpreter for Scheme in Python in Project 4. In addition, abstraction will be a major theme in this class, as you will learn about functional programming, data abstraction, object orientation, etc. to make your code more readable and modular. Of course, learning a programming language is also a big part of this course. You will master three programming languages, Python, Scheme, and SQL, and in learning and comparing them, you will be equiped with the ability to quickly master a new programming language.
Note: If you have no prior programming experience at all, getting started with CS61A requires a relatively high level of learning ability and self-discipline. To avoid the frustration of a struggling experience, you may choose a more friendly introductory programming course at first. For example, CS10 at Berkeley or CS50 at Harvard are both good choices.
Course Resources
- Course Website: spring2024, fall2023, spring2023, fall2022
- Recordings:
- Textbook: https://www.composingprograms.com/
- Assignments: refer to the course website
Personal Resources
All the resources and assignments used by @PKUFlyingPig in this course are maintained in PKUFlyingPig/CS61A - GitHub

前言
最近更新:Release v1.1.0 已发布 🎉
这是一本计算机的自学指南,也是对自己大学三年自学生涯的一个纪念。
这同时也是一份献给北大信科学弟学妹们的礼物。如果这本书能对你们的信科生涯有哪怕一丝一毫的帮助,都是对我极大的鼓励和慰藉。
本书目前包括了以下部分(如果你有其他好的建议,或者想加入贡献者的行列,欢迎邮件 zhongyinmin@pku.edu.cn 或者在 issue 里提问):
- 必学工具:IDE, 翻墙, StackOverflow, Git, GitHub, Vim, LaTeX, GNU Make, 实用工具 ...
- 环境配置:PC端以及服务器端开发环境配置、各类运维相关教材及资料 ...
- 经典书籍推荐:看过 CSAPP 这本书的同学一定感叹好书的重要,我将列举推荐自己看过的计算机领域的必看好书与资源链接。
- 国外高质量 CS 课程汇总:我将把我上过的所有高质量的国外 CS 课程分门别类进行汇总,并给出相关的自学建议,大部分课程都会有一个独立的仓库维护相关的资源以及我的作业实现。
梦开始的地方 —— CS61A
大一入学时我是一个对计算机一无所知的小白,装了几十个 G 的 Visual Studio 天天和 OJ 你死我活。凭着高中的数学底子我数学课学得还不错,但在专业课上对竞赛大佬只有仰望。提到编程我只会打开那笨重的 IDE,新建一个我也不知道具体是干啥的命令行项目,然后就是 cin, cout, for 循环,然后 CE, RE, WA 循环。当时的我就处在一种拼命想学好但不知道怎么学,课上认真听讲但题还不会做,课后做作业完全是用时间和它硬耗的痛苦状态。我至今电脑里还存着自己大一上学期计算概论大作业的源代码 —— 一个 1200 行的 C++ 文件,没有头文件、没有类、没有封装、没有 unit test、没有 Makefile、没有 Git,唯一的优点是它确实能跑,缺点是“能跑”的补集。我一度怀疑我是不是不适合学计算机,因为童年对于极客的所有想象,已经被我第一个学期的体验彻底粉碎了。
这一切的转机发生在我大一的寒假,我心血来潮想学习 Python。无意间看到知乎有人推荐了 CS61A 这门课,说是 UC Berkeley 的大一入门课程,讲的就是 Python。我永远不会忘记那一天,打开 CS61A 课程网站的那个瞬间,就像哥伦布发现了新大陆一样,我开启了新世界的大门。
我一口气 3 个星期上完了这门课,它让我第一次感觉到原来 CS 可以学得如此充实而有趣,原来这世上竟有如此精华的课程。
为避免有崇洋媚外之嫌,我单纯从一个学生的视角来讲讲自学 CS61A 的体验:
-
独立搭建的课程网站: 一个网站将所有课程资源整合一体,条理分明的课程 schedule、所有 slides, hw, discussion 的文件链接、详细明确的课程给分说明、历年的考试题与答案。这样一个网站抛开美观程度不谈,既方便学生,也让资源公正透明。
-
课程教授亲自编写的教材:CS61A 这门课的开课老师将MIT的经典教材 Structure and Interpretation of Computer Programs (SICP) 用Python这门语言进行改编(原教材基于 Scheme 语言),保证了课堂内容与教材内容的一致性,同时补充了更多细节,可以说诚意满满。而且全书开源,可以直接线上阅读。
-
丰富到让人眼花缭乱的课程作业:14 个 lab 巩固随堂知识点,10 个 homework,还有 4 个代码量均上千行的 project。与大家熟悉的 OJ 和 Word 文档式的作业不同,所有作业均有完善的代码框架,保姆级的作业说明。每个 Project 都有详尽的 handout 文档、全自动的评分脚本。CS61A 甚至专门开发了一个自动化的作业提交评分系统(据说还发了论文)。当然,有人会说“一个 project 几千行代码大部分都是助教帮你写好的,你还能学到啥?”。此言差矣,作为一个刚刚接触计算机,连安装 Python 都磕磕绊绊的小白来说,这样完善的代码框架既可以让你专注于巩固课堂上学习到的核心知识点,又能有“我才学了一个月就能做一个小游戏了!”的成就感,还能有机会阅读学习别人高质量的代码,从而为自己所用。我觉得在低年级,这种代码框架可以说百利而无一害。唯一的害也许是苦了老师和助教,因为开发这样的作业可想而知需要相当的时间投入。
-
每周 Discussion 讨论课,助教会讲解知识难点和考试例题:类似于北京大学 ICS 的小班研讨,但习题全部用 LaTeX 撰写,相当规范且会明确给出 solution。
这样的课程,你完全不需要任何计算机的基础,你只需要努力、认真、花时间就够了。此前那种有劲没处使的感觉,那种付出再多时间却得不到回报的感觉,从此烟消云散。这太适合我了,我从此爱上了自学。
试想如果有人能把艰深的知识点嚼碎嚼烂,用生动直白的方式呈现给你,还有那么多听起来就很 fancy,种类繁多的 project 来巩固你的理论知识,你会觉得他们真的是在倾尽全力想方设法地让你完全掌握这门课,你会觉得不学好它简直是对这些课程建设者的侮辱。
如果你觉得我在夸大其词,那么不妨从 CS61A 开始,因为它是我的梦开始的地方。
为什么写这本书
在我2020年秋季学期担任《深入理解计算机系统》(CSAPP)这门课的助教时,我已经自学一年多了。这一年多来我无比享受这种自学模式,为了分享这种快乐,我为自己的小班同学做过一个 CS自学资料整理仓库。当时纯粹是心血来潮,因为我也不敢公然鼓励大家翘课自学。
但随着又一年时间的维护,这个仓库的内容已经相当丰富,基本覆盖了计科、智能系、软工系的绝大多数课程,我也为每个课程都建了各自的 GitHub 仓库,汇总我用到的自学资料以及作业实现。
直到大四开始凑学分毕业的时候,我打开自己的培养方案,我发现它已经是我这个自学仓库的子集了,而这距离我开始自学也才两年半而已。于是,一个大胆的想法在我脑海中浮现:也许,我可以打造一个自学式的培养方案,把我这三年自学经历中遇到的坑、走过的路记录下来,以期能为后来的学弟学妹们贡献自己的一份微薄之力。
如果大家可以在三年不到的时间里就能建立起整座CS的基础大厦,能有相对扎实的数学功底和代码能力,经历过数十个千行代码量的 Project 的洗礼,掌握至少 C/C++/Java/JS/Python/Go/Rust 等主流语言,对算法、电路、体系、网络、操统、编译、人工智能、机器学习、计算机视觉、自然语言处理、强化学习、密码学、信息论、博弈论、数值分析、统计学、分布式、数据库、图形学、Web开发、云服务、超算等等方面均有涉猎。我想,你将有足够的底气和自信选择自己感兴趣的方向,无论是就业还是科研,你都将有相当的竞争力。
因为我坚信,既然你能坚持听我 BB 到这里,你一定不缺学好 CS 的能力,你只是没有一个好的老师,给你讲一门好的课程。而我,将力图根据我三年的体验,为你挑选这样的课程。
自学的好处
对我来说,自学最大的好处就在于可以完全根据自己的进度来调整学习速度。对于一些疑难知识点,我可以反复回看视频,在网上谷歌相关的内容,上 StackOverflow 提问题,直到完全将它弄明白。而对于自己掌握得相对较快的内容,则可以两倍速甚至三倍速略过。
自学的另一大好处就是博采众长。计算机系的几大核心课程:体系、网络、操统、编译,每一门我基本都上过不同大学的课程,不同的教材、不同的知识点侧重、不同的 project 将会极大丰富你的视野,也会让你理解错误的一些内容得到及时纠正。
自学的第三个好处是时间自由,具体原因省略。
自学的坏处
当然,作为 CS 自学主义的忠实拥趸,我不得不承认自学也有它的坏处。
第一就是交流沟通的不便。我其实是一个很热衷于提问的人,对于所有没有弄明白的点,我都喜欢穷追到底。但当你面对着屏幕听到老师讲了一个你没明白的知识点的时候,你无法顺着网线到另一端向老师问个明白。我努力通过独立思考和善用 Google 来缓解这一点,但是,如果能有几个志同道合的伙伴结伴自学,那将是极好的。关于交流群的建立,大家可以参考仓库 README 中的教程。
第二就是这些自学的课程基本都是英文的。从视频到slides到作业全是英文,所以有一定的门槛。不过我觉得这个挑战如果你克服了的话对你是极为有利的。因为在当下,虽然我很不情愿,但也不得不承认,在计算机领域,很多优质的文档、论坛、网站都是全英文的。养成英文阅读的习惯,在赤旗插遍世界之前,还是有一定好处的(狗头保命)。
第三,也是我觉得最困难的一点,就是自律。因为没有 DDL 有时候真的是一件可怕的事情,特别是随着学习的深入,国外的很多课程是相当虐的。你得有足够的驱动力强迫自己静下心来,阅读几十页的 Project Handout,理解上千行的代码框架,忍受数个小时的 debug 时光。而这一切,没有学分,没有绩点,没有老师,没有同学,只有一个信念 —— 你在变强。
这本书适合谁
正如我在前言里说的,任何有志于自学计算机的朋友都可以参考这本书。如果你已经有了一定的计算机基础,只是对某个特定的领域感兴趣,可以选择性地挑选你感兴趣的内容进行学习。当然,如果你是一个像我当年一样对计算机一无所知的小白,初入大学的校门,我希望这本书能成为你的攻略,让你花最少的时间掌握你所需要的知识和能力。某种程度上,这本书更像是一个根据我的体验来排序的课程搜索引擎,帮助大家足不出户,体验世界顶级名校的计算机优质课程。
当然,作为一个还未毕业的本科生,我深感自己没有能力也没有权利去宣扬一种学习方式,我只是希望这份资料能让那些同样有自学之心和毅力朋友可以少走些弯路,收获更丰富、更多样、更满足的学习体验。
特别鸣谢
在这里,我怀着崇敬之心真诚地感谢所有将课程资源无偿开源的各位教授们。这些课程倾注了他们数十年教学生涯的积淀和心血,他们却选择无私地让所有人享受到如此高质量的CS教育。没有他们,我的大学生活不会这样充实而快乐。很多教授在我给他们发了感谢邮件之后,甚至会回复上百字的长文,真的让我无比感动。他们也时刻激励着我,做一件事,就得用心做好,无论是科研,还是为人。
你也想加入到贡献者的行列
一个人的力量终究是有限的,这本书也是我在繁重的科研之余熬夜抽空写出来的,难免有不够完善之处。另外,由于个人做的是系统方向,很多课程侧重系统领域,对于数学、理论计算机、高级算法相关的内容则相对少些。如果有大佬想在其他领域分享自己的自学经历与资源,可以直接在项目中发起 Pull Request,也欢迎和我邮件联系(zhongyinmin@pku.edu.cn)。
关于交流群的建立
方法参见仓库的 README.md。
请作者喝杯下午茶
本书的内容是完全开源免费的,如果你觉得该项目对你真的有帮助,可以给仓库点个 star 或者请作者喝一杯下午茶。


前言
最近更新:Release v1.1.0 已发布 🎉
这是一本计算机的自学指南,也是对自己大学三年自学生涯的一个纪念。
这同时也是一份献给北大信科学弟学妹们的礼物。如果这本书能对你们的信科生涯有哪怕一丝一毫的帮助,都是对我极大的鼓励和慰藉。
本书目前包括了以下部分(如果你有其他好的建议,或者想加入贡献者的行列,欢迎邮件 zhongyinmin@pku.edu.cn 或者在 issue 里提问):
- 本书使用指南:由于书内涵盖资源众多,我根据不同人群的空闲时间和学习目标制定了对应的使用指南。
- 一份供参考的 CS 学习规划:我根据自己的自学经历制定的全面的、系统化的 CS 自学规划。
- 必学工具:一些 CSer 效率工具介绍,例如 IDE, 翻墙, StackOverflow, Git, GitHub, Vim, LaTeX, GNU Make, Docker, 工作流 等等。
- 经典书籍推荐:你是否苦于教材的晦涩难懂不知所云?别从自己身上找原因了,可能只是教材写得太烂。看过 CSAPP 这本书的同学一定会感叹好书的重要,我将列举推荐各个计算机领域的必看好书与资源链接。
- 国内外高质量 CS 课程汇总:我将把我上过的以及开源社区贡献的高质量的国内外 CS 课程分门别类进行汇总,介绍其课程内容特点并给出相应的自学建议,大部分课程都会有一个独立的仓库维护相关的资源以及作业实现供大家学习参考。
梦开始的地方 —— CS61A
大一入学时我是一个对计算机一无所知的小白,装了几十个 G 的 Visual Studio 天天和 OJ 你死我活。凭着高中的数学底子我数学课学得还不错,但在专业课上对竞赛大佬只有仰望。提到编程我只会打开那笨重的 IDE,新建一个我也不知道具体是干啥的命令行项目,然后就是 cin, cout, for 循环,然后 CE, RE, WA 循环。当时的我就处在一种拼命想学好但不知道怎么学,课上认真听讲但题还不会做,课后做作业完全是用时间和它硬耗的痛苦状态。我至今电脑里还存着自己大一上学期计算概论大作业的源代码 —— 一个 1200 行的 C++ 文件,没有头文件、没有类、没有封装、没有 unit test、没有 Makefile、没有 Git,唯一的优点是它确实能跑,缺点是“能跑”的补集。我一度怀疑我是不是不适合学计算机,因为童年对于极客的所有想象,已经被我第一个学期的体验彻底粉碎了。
这一切的转机发生在我大一的寒假,我心血来潮想学习 Python。无意间看到知乎有人推荐了 CS61A 这门课,说是 UC Berkeley 的大一入门课程,讲的就是 Python。我永远不会忘记那一天,打开 CS61A 课程网站的那个瞬间,就像哥伦布发现了新大陆一样,我开启了新世界的大门。
我一口气 3 个星期上完了这门课,它让我第一次感觉到原来 CS 可以学得如此充实而有趣,原来这世上竟有如此精华的课程。
为避免有崇洋媚外之嫌,我单纯从一个学生的视角来讲讲自学 CS61A 的体验:
-
独立搭建的课程网站: 一个网站将所有课程资源整合一体,条理分明的课程 schedule、所有 slides, homework, discussion 的文件链接、详细明确的课程给分说明、历年的考试题与答案。这样一个网站抛开美观程度不谈,既方便学生,也让资源公正透明。
-
课程教授亲自编写的教材:CS61A 这门课的开课老师将 MIT 的经典教材 Structure and Interpretation of Computer Programs (SICP) 用Python这门语言进行改编(原教材基于 Scheme 语言),保证了课堂内容与教材内容的一致性,同时补充了更多细节,可以说诚意满满。而且全书开源,可以直接线上阅读。
-
丰富到让人眼花缭乱的课程作业:14 个 lab 巩固随堂知识点,10 个 homework,还有 4 个代码量均上千行的 project。与大家熟悉的 OJ 和 Word 文档式的作业不同,所有作业均有完善的代码框架,保姆级的作业说明。每个 Project 都有详尽的 handout 文档、全自动的评分脚本。CS61A 甚至专门开发了一个自动化的作业提交评分系统(据说还发了论文)。当然,有人会说“一个 project 几千行代码大部分都是助教帮你写好的,你还能学到啥?”。此言差矣,作为一个刚刚接触计算机,连安装 Python 都磕磕绊绊的小白来说,这样完善的代码框架既可以让你专注于巩固课堂上学习到的核心知识点,又能有“我才学了一个月就能做一个小游戏了!”的成就感,还能有机会阅读学习别人高质量的代码,从而为自己所用。我觉得在低年级,这种代码框架可以说百利而无一害。就是苦了老师和助教,因为开发这样的作业可想而知需要相当大的时间投入和多年的迭代积累。
-
每周 Discussion 讨论课:助教会讲解知识难点和考试例题,习题全部用 LaTeX 撰写,相当规范并且会给出详细的解答,让学生及时查漏补缺巩固知识点。
这样的课程,你完全不需要任何计算机的基础,你只需要努力、认真、花时间就够了。此前那种有劲没处使的感觉,那种付出再多时间却得不到回报的感觉,从此烟消云散。这太适合我了,我从此爱上了自学。
试想如果有人能把艰深的知识点嚼碎嚼烂,用生动直白的方式呈现给你,还有那么多听起来就很 fancy,种类繁多的 project 来巩固你的理论知识,你会觉得他们真的是在倾尽全力想方设法地让你完全掌握这门课,你会觉得不学好它简直是对这些课程建设者的侮辱。
如果你觉得我在夸大其词,那么不妨从 CS61A 开始,因为它是我的梦开始的地方。
为什么写这本书
在我2020年秋季学期担任《深入理解计算机系统》(CSAPP)这门课的助教时,我已经自学一年多了。这一年多来我无比享受这种自学模式,为了分享这种快乐,我为自己的研讨班学生做过一个 CS自学资料整理仓库。当时纯粹是心血来潮,因为我也不敢公然鼓励大家翘课自学。
但随着又一年时间的维护,这个仓库的内容已经相当丰富,基本覆盖了计科、智能系、软工系的绝大多数课程,我也为每个课程都建了各自的 GitHub 仓库,汇总我用到的自学资料以及作业实现。
直到大四开始凑学分毕业的时候,我打开自己的培养方案,我发现它已经是我这个自学仓库的子集了,而这距离我开始自学也才两年半而已。于是,一个大胆的想法在我脑海中浮现:也许,我可以打造一个自学式的培养方案,把我这三年自学经历中遇到的坑、走过的路记录下来,以期能为后来的学弟学妹们贡献自己的一份微薄之力。
如果大家可以在三年不到的时间里就能建立起整座 CS 的基础大厦,能有相对扎实的数学功底和代码能力,经历过数十个千行代码量的 Project 的洗礼,掌握至少 C/C++/Java/JS/Python/Go/Rust 等主流语言,对算法、电路、体系、网络、操统、编译、人工智能、机器学习、计算机视觉、自然语言处理、强化学习、密码学、信息论、博弈论、数值分析、统计学、分布式、数据库、图形学、Web开发、云服务、超算等等方面均有涉猎。我想,你将有足够的底气和自信选择自己感兴趣的方向,无论是就业还是科研,你都将有相当的竞争力。
因为我坚信,既然你能坚持听我 BB 到这里,你一定不缺学好 CS 的能力,你只是没有一个好的老师,给你讲一门好的课程。而我,将力图根据我三年的体验,为你挑选这样的课程。
自学的好处
对我来说,自学最大的好处就在于可以完全根据自己的进度来调整学习速度。对于一些疑难知识点,我可以反复回看视频,在网上谷歌相关的内容,上 StackOverflow 提问题,直到完全将它弄明白。而对于自己掌握得相对较快的内容,则可以两倍速甚至三倍速略过。
自学的另一大好处就是博采众长。计算机系的几大核心课程:体系、网络、操统、编译,每一门我基本都上过不同大学的课程,不同的教材、不同的知识点侧重、不同的 project 将会极大丰富你的视野,也会让你理解错误的一些内容得到及时纠正。
自学的第三个好处是时间自由。大学的课余时间本就相对自由,再加上不用去上课的话更是可以放飞自我地安排自学时间和进度。我大二的时候赶上疫情在家窝了大半年,返校之后也基本没有线下去过教室上课,对绩点也毫无影响。
自学的坏处
当然,作为 CS 自学主义的忠实拥趸,我不得不承认自学也有它的坏处。
第一就是交流沟通的不便。我其实是一个很热衷于提问的人,对于所有没有弄明白的点,我都喜欢穷追到底。但当你面对着屏幕听到老师讲了一个你没明白的知识点的时候,你无法顺着网线到另一端向老师问个明白。我努力通过独立思考和善用 Google 来缓解这一点,但是,如果能有几个志同道合的伙伴结伴自学,那将是极好的。关于交流群的建立,大家可以参考仓库 README 中的教程。
第二就是这些自学的课程基本都是英文的。从视频到课件再到作业全是英文,所以有一定的门槛。我尽量在汇总课程视频资源的时候寻找带中文字幕的搬运视频,但大多数课程还是只有机翻或者生肉,而课件和作业肯定都是英文的。不过我觉得这是个值得努力克服的挑战,因为在当下,虽然我很不情愿,但也不得不承认,在计算机领域,很多优质的文档、论坛、网站都是英文居多。养成英文阅读的习惯,在赤旗插遍世界之前,还是有一定好处的(狗头保命)。
第三,也是我觉得最困难的一点,就是自律。因为没有 DDL 有时候真的是一件可怕的事情。特别是随着学习的深入,国外的很多课程是相当虐的。你得有足够的驱动力强迫自己静下心来,阅读几十页的 Project Handout,理解上千行的代码框架,忍受数个小时的 debug 时光。而这一切,没有学分,没有绩点,没有老师,没有同学,只有一个信念 —— 你在变强。
这本书适合谁
正如我在前言里说的,任何有志于自学计算机的朋友都可以参考这本书。如果你已经有了一定的计算机基础,只是对某个特定的领域感兴趣,可以选择性地挑选你感兴趣的内容进行学习。当然,如果你是一个像我当年一样对计算机一无所知的小白,初入大学的校门,我希望这本书能成为你的攻略,让你花最少的时间掌握你所需要的知识和能力。某种程度上,这本书更像是一个根据我的体验来排序的课程搜索引擎,帮助大家足不出户,体验世界顶级名校的计算机优质课程。
当然,作为一个还未毕业的本科生,我深感自己没有能力也没有权利去宣扬一种学习方式,我只是希望这份资料能让那些同样有自学之心和毅力朋友可以少走些弯路,收获更丰富、更多样、更满足的学习体验。
特别鸣谢
在这里,我怀着崇敬之心真诚地感谢所有将课程资源无偿开源的各位教授们。这些课程倾注了他们数十年教学生涯的积淀和心血,他们却选择无私地让所有人享受到如此高质量的 CS 教育。没有他们,我的大学生活不会这样充实而快乐。很多教授在我给他们发了感谢邮件之后,甚至会回复上百字的长文,真的让我无比感动。他们也时刻激励着我,做一件事,就得用心做好,无论是学习、科研、还是为人。
你也想加入到贡献者的行列
一个人的力量终究是有限的,这本书也是我在繁重的科研之余熬夜抽空写出来的,难免有不够完善之处。另外,由于个人做的是系统方向,很多课程侧重系统领域,对于数学、理论计算机、高级算法相关的内容则相对少些。如果有大佬想在其他领域分享自己的自学经历与资源,可以直接在项目中发起 Pull Request,也欢迎和我邮件联系(zhongyinmin@pku.edu.cn)。
关于交流群的建立
本书支持页面评论功能,因此如果你想自学某课程,可以自己建立群聊后(QQ 微信皆可)在对应的课程页面下方发表评论,注明你的学习目标以及加入交流群的途径。此外,过去已有不少朋友在 issue 里建立了类似群聊,可以自行选择直接加入。
请作者喝杯下午茶
本书的内容是完全开源免费的,如果你觉得该项目对你真的有帮助,可以给仓库点个 star 或者请作者喝一杯下午茶。

MIT18.06: Linear Algebra
课程简介
- 所属大学:MIT
- 先修要求:英文
- 编程语言:无
- 课程难度:🌟🌟🌟
- 预计学时:因人而异
数学大牛 Gilbert Strang 老先生年逾古稀仍坚持授课,其经典教材 Introduction to Linear Algebra 已被清华采用为官方教材。我当时看完盗版 PDF 之后深感愧疚,含泪花了两百多买了一本英文正版收藏。下面附上此书封面,如果你能完全理解封面图的数学含义,那你对线性代数的理解一定会达到新的高度。

配合油管数学网红 3Blue1Brown 的线性代数的本质系列视频食用更佳。
课程资源
- 课程网站:https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algebra-fall-2011/syllabus/
- 课程视频:参见课程网站
- 课程教材:Introduction to Linear Algebra. Gilbert Strang
- 课程作业:参见课程网站
MIT18.06: Linear Algebra
课程简介
- 所属大学:MIT
- 先修要求:英文
- 编程语言:无
- 课程难度:🌟🌟🌟
- 预计学时:因人而异
数学大牛 Gilbert Strang 老先生年逾古稀仍坚持授课,其经典教材 Introduction to Linear Algebra 已被清华采用为官方教材。我当时看完盗版 PDF 之后深感愧疚,含泪花了两百多买了一本英文正版收藏。下面附上此书封面,如果你能完全理解封面图的数学含义,那你对线性代数的理解一定会达到新的高度。

配合油管数学网红 3Blue1Brown 的线性代数的本质系列视频食用更佳。
课程资源
- 课程网站:fall2011
- 课程视频:参见课程网站
- 课程教材:Introduction to Linear Algebra. Gilbert Strang
- 课程作业:参见课程网站
2023年5月15日,Gilbert Strang 上完了他在 18.06 的最后一课,以88岁高龄结束了在其 MIT 61年的教学及科研生涯。但他的线性代数课已经并且还将继续影响一代代青年学子,让我们向老先生致以最崇高的敬意。
MIT6.050J: Information theory and Entropy
课程简介
- 所属大学:MIT
- 先修要求:无
- 编程语言:无
- 课程难度:🌟🌟🌟
- 预计学时:100 小时
MIT 面向大一新生的信息论入门课程,Penfield 教授专门为这门课写了一本教材作为课程 notes,内容深入浅出,生动有趣。
课程资源
- 课程网站:https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-050j-information-and-entropy-spring-2008/index.htm
- 课程教材:https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-050j-information-and-entropy-spring-2008/syllabus/MIT6_050JS08_textbook.pdf
- 课程作业:详见课程网站,包含书面作业与 Matlab 编程作业。
MIT6.050J: Information theory and Entropy
课程简介
- 所属大学:MIT
- 先修要求:无
- 编程语言:无
- 课程难度:🌟🌟🌟
- 预计学时:100 小时
MIT 面向大一新生的信息论入门课程,Penfield 教授专门为这门课写了一本教材作为课程 notes,内容深入浅出,生动有趣。
课程资源
- 课程网站:spring2008
- 课程教材:Information and Entropy
- 课程作业:详见课程网站,包含书面作业与 Matlab 编程作业。
MIT 6.042J: Mathematics for Computer Science
课程简介
- 所属大学:MIT
- 先修要求:Calculus, Linear Algebra
- 编程语言:Python preferred
- 课程难度:🌟🌟🌟
- 预计学时:50-70 小时
MIT 的离散数学以及概率综合课程,导师是大名鼎鼎的 Tom Leighton ( Akamai 的联合创始人之一)。学完之后对于后续的算法学习大有裨益。
课程资源
- 课程网站:https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/
- 课程视频:https://www.bilibili.com/video/BV1L741147VX
- 课程作业:https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/assignments/
MIT 6.042J: Mathematics for Computer Science
课程简介
- 所属大学:MIT
- 先修要求:Calculus, Linear Algebra
- 编程语言:Python preferred
- 课程难度:🌟🌟🌟
- 预计学时:50-70 小时
MIT 的离散数学以及概率综合课程,导师是大名鼎鼎的 Tom Leighton ( Akamai 的联合创始人之一)。学完之后对于后续的算法学习大有裨益。
课程资源
- 课程网站:spring2015, fall2010, fall2005
- 课程视频:spring2015, fall2010
- 课程作业:参考课程网站
CS61B: Data Structures and Algorithms
课程简介
- 所属大学:UC Berkeley
- 先修要求:CS61A
- 编程语言:Java
- 课程难度:🌟🌟🌟
- 预计学时:60 小时
伯克利 CS61 系列的第二门课程,注重数据结构与算法的设计,同时让学生有机会接触上千行的工程代码,通过 Java 初步领会软件工程的思想。
我上的是 2018 年春季学期的版本,该课的开课老师 Josh Hug 教授慷慨地将 autograder 开源了,大家可以通过网站公开的邀请码在 gradescope 免费加入课程,从而方便地测评自己的代码。
这门课所有的编程作业都是使用 Java 完成的。没有 Java 基础的同学也不用担心,课程会有保姆级的教程,从 IDEA(一款主流的 Java 编程环境)的配置讲起,把 Java 的核心语法与特性事无巨细地讲授,大家完全不用担心跟不上的问题。
这门课的作业质量也是绝绝子。14 个 lab 会让你自己实现课上所讲的绝大部分数据结构,10 个 Homework 会让你运用数据结构和算法解决实际问题, 另外还有 3 个 Project 更是让你有机会接触上千行的工程代码,在实战中磨练自己的 Java 能力。
课程资源
- 课程网站:https://sp18.datastructur.es/
- 课程视频:https://sp18.datastructur.es/,每节课的链接详见课程网站
- 课程教材:无
- 课程作业:每年略有不同,18 年春季学期有 14 个 Lab,10 个 Homework以及 3 个 Project,具体要求详见课程网站。
资源汇总
@PKUFlyingPig 在学习这门课中用到的所有资源和作业实现都汇总在 PKUFlyingPig/CS61B - GitHub 中。
CS61B: Data Structures and Algorithms
课程简介
- 所属大学:UC Berkeley
- 先修要求:CS61A
- 编程语言:Java
- 课程难度:🌟🌟🌟
- 预计学时:60 小时
伯克利 CS61 系列的第二门课程,注重数据结构与算法的设计,同时让学生有机会接触上千行的工程代码,通过 Java 初步领会软件工程的思想。
我上的是 2018 年春季学期的版本,该课的开课老师 Josh Hug 教授慷慨地将 autograder 开源了,大家可以通过网站公开的邀请码在 gradescope 免费加入课程,从而方便地测评自己的代码。
这门课所有的编程作业都是使用 Java 完成的。没有 Java 基础的同学也不用担心,课程会有保姆级的教程,从 IDEA(一款主流的 Java 编程环境)的配置讲起,把 Java 的核心语法与特性事无巨细地讲授,大家完全不用担心跟不上的问题。
这门课的作业质量也是绝绝子。14 个 lab 会让你自己实现课上所讲的绝大部分数据结构,10 个 Homework 会让你运用数据结构和算法解决实际问题, 另外还有 3 个 Project 更是让你有机会接触上千行的工程代码,在实战中磨练自己的 Java 能力。
课程资源
- 课程网站:spring2024, fall2023, spring2023, spring2018
- 课程视频:原版视频参见课程网站,B站有中文翻译搬运。
- 课程教材:无
- 课程作业:每年略有不同,18 年春季学期有 14 个 Lab,10 个 Homework以及 3 个 Project,具体要求详见课程网站。
资源汇总
@PKUFlyingPig 在学习这门课中用到的所有资源和作业实现都汇总在 PKUFlyingPig/CS61B - GitHub 中。
CS61A: Structure and Interpretation of Computer Programs
课程简介
- 所属大学:UC Berkeley
- 先修要求:无
- 编程语言:Python, Scheme, SQL
- 课程难度:🌟🌟🌟
- 预计学时:50 小时
伯克利 CS61 系列的第一门课程,也是我的 Python 入门课。
CS61 系列是伯克利 CS 专业的入门课,其中:
- CS61A: 强调抽象,让学生掌握用程序来解决实际问题,而不关注底层的硬件细节。
- CS61B: 注重算法与数据结构以及大规模程序的构建,学生会用 Java 语言结合算法与数据结构的知识来构建千行代码级别的大型项目(一个简易的谷歌地图,一个二维版的 Minecraft)。
- CS61C: 关注计算机体系结构,让学生理解高级语言(例如 C)是如何一步步转换为机器可以理解的 01 串并在 CPU 执行的,学生将会学习 RISC-V 架构并自己用 Logisim 实现一个 CPU。
CS61B 和 CS61C 在本书中均有收录。
回到 CS61A,注意这不仅仅是一门编程语言课,而是会深入到程序构造与运行的原理。最后你将在第 4 个 Project 中用 Python 实现一个 Scheme 的解释器。此外,抽象将是这门课的一大主题,你将学习到函数式编程、数据抽象、面向对象等等知识来让你的代码更易读,更模块化。当然,学习编程语言也是这门课的一大内容,你将会掌握 Python、Scheme 和 SQL 这三种编程语言,在它们的学习和比较中,相信你会拥有快速掌握一门新的编程语言的能力。
注意:如果此前完全没有编程基础,直接上手 CS61A 需要一定的学习能力和自律要求。为避免课程难度过高而导致的信心挫折,可以选择一个更为友好的入门编程课程。例如伯克利的 CS10 或者哈佛大学的 CS50。
课程资源
- 课程网站:https://inst.eecs.berkeley.edu/~cs61a/su20/
- 课程视频: 参见课程网站链接
- 课程教材:https://www.composingprograms.com/
- 课程教材中文翻译:https://composingprograms.netlify.app/
- 课程作业:课程网站会有每个作业对应的文档链接以及代码框架的下载链接。
资源汇总
@PKUFlyingPig 在学习这门课中用到的所有资源和作业实现都汇总在 PKUFlyingPig/CS61A - GitHub 中。
CS61A: Structure and Interpretation of Computer Programs
课程简介
- 所属大学:UC Berkeley
- 先修要求:无
- 编程语言:Python, Scheme, SQL
- 课程难度:🌟🌟🌟
- 预计学时:50 小时
伯克利 CS61 系列的第一门课程,也是我的 Python 入门课。
CS61 系列是伯克利 CS 专业的入门课,其中:
- CS61A: 强调抽象,让学生掌握用程序来解决实际问题,而不关注底层的硬件细节。
- CS61B: 注重算法与数据结构以及大规模程序的构建,学生会用 Java 语言结合算法与数据结构的知识来构建千行代码级别的大型项目(一个简易的谷歌地图,一个二维版的 Minecraft)。
- CS61C: 关注计算机体系结构,让学生理解高级语言(例如 C)是如何一步步转换为机器可以理解的 01 串并在 CPU 执行的,学生将会学习 RISC-V 架构并自己用 Logisim 实现一个 CPU。
CS61B 和 CS61C 在本书中均有收录。
回到 CS61A,注意这不仅仅是一门编程语言课,而是会深入到程序构造与运行的原理。最后你将在第 4 个 Project 中用 Python 实现一个 Scheme 的解释器。此外,抽象将是这门课的一大主题,你将学习到函数式编程、数据抽象、面向对象等等知识来让你的代码更易读,更模块化。当然,学习编程语言也是这门课的一大内容,你将会掌握 Python、Scheme 和 SQL 这三种编程语言,在它们的学习和比较中,相信你会拥有快速掌握一门新的编程语言的能力。
注意:如果此前完全没有编程基础,直接上手 CS61A 需要一定的学习能力和自律要求。为避免课程难度过高而导致的信心挫折,可以选择一个更为友好的入门编程课程。例如伯克利的 CS10 或者哈佛大学的 CS50。
课程资源
- 课程网站: spring2024, fall2023, spring2023, fall2022
- 课程视频: spring2023, fall2022
- 课程教材: https://www.composingprograms.com/
- 课程教材中文翻译:https://composingprograms.netlify.app/
- 课程作业: 课程网站会有每个作业对应的文档链接以及代码框架的下载链接。
资源汇总
@PKUFlyingPig 在学习这门课中用到的所有资源和作业实现都汇总在 PKUFlyingPig/CS61A - GitHub 中。