A Self-Learning, Modern Computer Science Curriculum

1 Introduction

"The great idea of constructive type theory is that there is no distinction between programs and proofs… Theorems are types (specifications), and proofs are programs" (Robert Harper)

This is a collection of modern resources on various undergrad level computer science topics, for someone with an interest in theory. Use WorldCat or LibGen if you can't buy these books. You don't have to do everything here, just whatever interests you. If I list a resource here it's because I either completed the whole resource or I used parts of it for something I needed to learn and found it a quality enough resource to include here for somebody else who wants deeper coverage of these topics.

1.1 Studying Strategies

On Isaac Newton's iteration method to self-learn geometry:

"He bought Descartes' Geometry and read it by himself .. when he was got over 2 or 3 pages he could understand no farther, than he began again and got 3 or 4 pages father till he came to another difficult place, than he began again and advanced farther and continued so doing till he made himself master of the whole without having the least light or instruction from anybody" (King's Cam.,Keynes MS 130.10,fol. 2/v/)

Numerous anecdotes exist on studying strategies, like the Feynman method explained here "If you can’t, out loud or on paper, explain the idea without confusion or contradiction, stop and figure it out right there". There's some books that model that method, like Gilbert Strang's Calculus has you reciting back the entire chapter you just read.

If you ignore the copious amounts of marketing on his site, Cal Newport has some other interesting anecdotes on studying, such as how he was able to get the best grade in his Discrete Mathematics class, and the rest of the site is full of advice on studying, how to schedule yourself and deliberate practice.

My personal advice is just commit some time everyday to learning, and life will give you days off as things come up, you don't really need a schedule just do something daily and magically by the end of the year you will have achieved a huge amount of work. Always get the errata for what you're reading, even course notes sometimes have errata on the author's page, and always take something a little harder than your skill level so then it becomes a research exercise backfilling all the requirements. For example many people want to relearn math they forgot, so they start working through some enormous 1000+ page pre-calculus book and lose interest after the first few chapters. Instead make the goal to learn calculus, and start there, using the huge pre-calc book as your research project. This is what the exercises are for you pick up all the algebra from highschool you forgot while grinding through a calc book.

1.2 Discord channel

If you want to learn this material with a community, some anons have started a Discord channel.

2 Preliminaries

2.1 Introduction to Computer Science

I've rewritten this entire section into a workshop we work through Brown University's CS019 class and Tao's Analysis I, plus many other topics to fill in beginner blanks. They're draft quality notes but the idea is if you get stuck on something, you can look at them like asking a TA for help.

There is a torrent archive

2018 Lectures, labs

2.2 Tools

MIT's the missing semester of your CS education covers a lot of things you'll eventually need to know. Editors such as emacs/vim are also introduced here. The 1980s book The Unix Programming Environment by Kernighan & Pike walks through Awk/Grep/Sed and shell scripting too. You may want to take this after you learn to program or else it won't make sense.

2.3 Assumed Mathematical Background

"So I went to Case, and the Dean of Case says to us, it's a all men's school, "Men, look at, look to the person on your left, and the person on your right. One of you isn't going to be here next year; one of you is going to fail." So I get to Case, and again I'm studying all the time, working really hard on my classes, and so for that I had to be kind of a machine. In high school, our math program wasn't much, and I had never heard of calculus until I got to college. But the calculus book that we had was (in college) was great, and in the back of the book there were supplementary problems that weren't assigned by the teacher. So this was a famous calculus text by a man named George Thomas (second edition), and I mention it especially because it was one of the first books published by Addison-Wesley, and I loved this calculus book so much that later I chose Addison-Wesley to be the publisher of my own book. Our teacher would assign, say, the even numbered problems, or something like that (from the book). I would also do the odd numbered problems. In the back of Thomas's book he had supplementary problems, the teacher didn't assign the supplementary problems; I worked the supplementary problems. I was scared I wouldn't learn calculus, so I worked hard on it, and it turned out that of course it took me longer to solve all these problems than the kids who were only working on what was assigned, at first. But after a year, I could do all of those problems in the same time as my classmates were doing the assigned problems, and after that I could just coast in mathematics, because I'd learned how to solve problems" (Don Knuth )

Try the new Math Foundations from Scratch experimental curriculum we'll try and teach ourselves the math needed to try most of the courses here. The reasons I've rewritten this section a dozen+ times is because I've yet to find anything that satisfies the condition of "is this a self learner?" so I'm just going to wing it and write my own.

3 Functional Programming

3.1 Principles of Functional Programming

This course focuses on verification, parallelism and using pattern matching to implement things which normally would be difficult to do. Robert Harper keeps a blog and a follow up post on the success of teaching this material to undergrads. For me this is the best course here, you learn a totally different way of writing programs that I find much easier than manipulating memory states.

  • COMP 212 - Functional Programming
    • Dan Licata used to teach 15-150 at CMU, this course is similar but with some video lectures and the assignments/labs are all public
    • Programming in Standard ML book you can read with these course notes
    • There is also a book from Cornell Functional Programming in OCaml with similar content
    • See this talk Effective ML how to properly write interfaces, error handling. This is how I write programs
    • Functional Programming: Practice and Theory Bruce J. MacLennan, Addison-Wesley, 1990 will teach you functional programming using math notation
    • Prabhakar Ragde's flâneries the Teach Yourself Racket notes cover pure and impure functional programming

If you want a torrent with the recorded lectures, labs and hw:

COMP212 Fall 2020:

4 Algebra

It is possible in a functional language like ML to do algebra with types, proving two types are isomorphic with the desired properties of reflexivity, symmetry, and transitivity. It's also possible to abstract Lists and Trees into polynomials, as every polynomial looks like a sum of terms. As you will learn in 15-150 Principles of Functional Programming "most functional datastructures have constant time access near the outer layer of their structure, ie: the head of a list or the root of a tree. However, access at some random point inside the structure is typically linear since looking at some element of a list is linear in the length of the list, and looking at some element of a tree is linear in the depth of the tree. Datatype derivatives allow constant time access to the entire structure."

4.1 Linear Algebra

Wildberger has a series of lectures to understand this topic geometrically that I highly recommend. Read Terence Tao's Linear Algebra notes as you go. We do this in the math workshop and some lectures from Poh-Shen Loh, who will demistify questions like 'Why is the determinant formula the way it is?' or 'Why is matrix multiplication done this specific way?'.

  • (Full Course) CS053 - Coding the Matrix
    • A lot of linear algebra over the complex field
    • Covers interesting applications like what was shown in Great Theoretical Ideas in Computer Science when you learned how a parity bit works.
    • No formal prerequisites except assumes you know how to do basic proofs, book uses python bu you can do this course in any language, they all have linear algebra libraries
      • A crash course in linear algebra if you've taken some before

4.2 Abstract Algebra

Some videos in this playlist introduce Abstract Algebra, walking through it's foundations distinguishing between descriptions, definitions and specifications of abstract algebraic objects. I used to have a course linked here but the school deleted it, and reuploads I did were also deleted, so my recommendation is get Artin's blue book and look on youtube for Harvard's Abstract Algebra course from a few years ago it's still a great course. Wildberger's channel has a lot of content on group theory, topology and rational hyperbolic geometry if you're interested.

5 Discrete Mathematics

Try going to the UCSD podcast website and searching for Discrete Math courses many are recorded with slides and screen like this course if you want a conventional discrete math course.

5.1 Introduction to Pure Mathematics

Good advice on writing mathematics, like how to write LaTeX. Cornell has a similar class with complete lectures notes though if your math background is very weak I recommend working through Chapter 2 and 3, and the appendix on mathematical logic of Terrence Tao's Analysis I to learn to write your own proofs constructing the natural numbers before trying this book, everything will be much easier.

5.2 Discrete Math with Standard ML

This book covers many topics in courses like CMU's 15-251 and 15-150, and teaches you to write proofs as programs. If you don't know how to program this book will teach you by modeling math functions in SML, polynomials into lists, sets into types, creating relations and proving their results with programs.

5.3 Great Theoretical Ideas in Computer Science

This is a crash course in multiple topics such as Probability, Linear Algebra, Modular Arithmetic, Polynomials, Cryptography and Complexity Theory. 15-251 assumes students have completed An Infinite Descent into Pure Mathematics though it is self contained. The best part about this course is old exams with solutions, and extensive notes.

6 Computer Systems & Architecture

"[Computer science] is not really about computers - and it's not about computers in the same sense that physics is not really about particle accelerators, and biology is not about microscopes and Petri dishes…and geometry isn't really about using surveying instruments. Now the reason that we think computer science is about computers is pretty much the same reason that the Egyptians thought geometry was about surveying instruments: when some field is just getting started and you don't really understand it very well, it's very easy to confuse the essence of what you're doing with the tools that you use." (Hal Abelson)

6.1 x86 Computer Systems

This covers architecture from a programmer's perspective, such as how to write cache friendly code/optimizations, assembly, how compilers work, return oriented programming (ROP) to bypass stack protections, the memory hierarchy, and networks. You could read K&R's The C Programming Language for a brief intro, though this course will explain C as you go anyway and fully covers pointers at the assembly language level making it self contained.

6.2 RISC-V Architecture

MIT's 6.004 course covers RISC-V: The free and open RISC Instruction Set Architecture. Take this if you are interested in programming FPGAs or cheap embedded modules.

6.3 Operating Systems

MIT teaches OS engineering using a rewrite of the sixth edition Unix(v6) similar to the classic Lions' Commentary but in ANSI-C called xv6. The idea is you read the source as you read book, to understand the system. MIT has a full course w/YouTube lectures here.

The latest xv6 source and text are available via:

  • git clone git://github.com/mit-pdos/xv6-riscv.git
  • git clone git://github.com/mit-pdos/xv6-riscv-book.git
    • If you have problems building the book, get the pdf

7 Compilers

The course has a recorded screencast

8 Database Systems

Interesting post on the future of database systems by Andy Pavlo.

8.1 Advanced Database Systems

CMU abandoned Peloton and now is building a new disk-oriented storage prototype for education called BusTub DB. At the end of the semester the grading scripts are publically available.

  • (Full Course) 15-721 Advanced Database Systems
    • Recorded lectures on YouTube
    • Everything is in C++17 which you can teach yourself from the bounty of books/documentation available via search engine.
    • Purpose of this course is to learn how to design and build your own dbms

9 Web

Here are the (poor) notes I took for MIT's 6.148 Web Programming Competition and MIT's 6.170 Software Studio. I did most of these assignments on a phone using Eruda since I wrote this while on lunch breaks. The MIT workshop and 6.170 are actually pretty good, giving you just enough to make a MVP yourself, expecting you to fill in the rest of the details on your own now that you know the basics of express, react, CSS etc.

  • An advanced introduction to JavaScript

10 Data Science

10.1 Practical Data Science

Uses Python, teaches a crash course in linear algebra and probability

  • (Full Course) 15-388 Practical Data Science
    • Recorded lectures are here and archived here
    • Introduction to the 'full stack' of data science analysis: data collection and processing, data visualization and presentation, statistical model building using machine learning, and big data techniques for scaling these methods.
    • Cornell also has a free text with interactive jupyter notebooks (in Python)
    • Jupyter notebook is a literate programming paradigm tool, you can freely write using LaTeX or markdown and run the code cells in any order to not interrupt the flow of documentation.
      • This course teaches the Python libraries, but you can do the assignments in Julia if you want, or experiment in OCaml
      • A draft book Foundations of Data Science

10.2 Introduction to Computational Thinking

MIT course featuring the 3blue1brown linear algebra guy as a lecturer. I've only done a few lectures so far but this is live, and yes you as a pleb can ask questions in the live stream without actually going to MIT

  • (Full Course) 18.S191 Introduction to Computational Thinking
    • Lectures are live right now! (Oct 2020)
    • If you haven't done CS019 this seems too difficult, but you never know try it anyway
    • I'm still going through it, Julia is a great language (Lisp) and makes this content simple to reason about and write yourself

10.3 Advanced Data Science

Cozma Shalizi is an ex Physicist, so he approaches statistics from that viewpoint, which is refreshing. He is a research statistician so this won't be a recipe book.

11 Introduction to Computer Music

Nyquist is worth looking into, a lisp that allows dynamic computations that produce sound, and dynamically optimizes so a real-time control system, that is stateless, that does non-sequential lazy eval. I played around with it to test making a little game that generated it's own dynamic sound and it worked.

12 Meta-Linguistic Abstraction

A classic introductory computer science book on magic things you can do with a simple yet highly abstract language, such as writing your own interpreter for the language you're using with the language itself.

12.1 Advanced SICP

If you liked SICP, you'll enjoy the advanced version MIT's 6.945 Adventures in Advanced Symbolic Programming but you will have to dig around to find the lecture notes from previous years or search github. The course primarily uses the new book by Sussman & Hanson Software Design for Flexibility as class notes and since the book isn't released until Mar 2021 these are behind school logins.

13 Natural Language Processing

14 Programming Language Theory

Read these reasons for studying programming languages. In this book you study things like Modernized Algol and the lambda calculus to better understand modern languages which are for the most part just reinvented modernized Algol as you will see.

Try these notes they go with the book Programming Language Foundations in Agda you could do them in parallel with PFPL to help complete the exercises.

15 Isolating Software Failure, Proving Safety and Testing

How to verify software, and strategies of programming that minimize catastrophe during failure.

Brown's CS195y Logic For Systems I made a torrent for if you want to model state in a way similar to Alloy, where you can prove it's logic before writing the program. Think about designing a security level scheme where different users have different access levels, you don't want some unforseen combination of states to result in granting access that shouldn't be granted. The Software Abstractions book and 195y course help you with this by providing a way to model your security scheme before you write the code:

CS195y partial archive, some recorded lectures missing:

15.1 Physical Systems Software Security

16 Algorithms

I made a partial archive of 15-451 if you want to learn about NP-Completeness, approximation algorithms, online algorithms, graph compression, multiplicative weights, computational geometry, fast multiplication, embeddings, FFT some other topics:

Recorded lectures 
15-451 partial archive:

16.1 Introduction to Parallel and Sequential Algorithms

Search libgen for 'Parallel and Sequential Algorithms' and get latest version.

The book is excellent, it goes through many common algorithms you already know about and then teaches you how to make them more parallel and is used in CMU's 15-210 course which now is sealed up behind campus logins. 15-853 Algorithms in the Real World is another excellent resource that covers some 15-210 content and more.

16.2 Functional Data Structures

"A stroll through intermediate data structures and their associated algorithms, from the point of view of functional programming." Note how pattern matching makes implementing these seemingly complicated structures a much easier task.

16.3 Advanced Data Structures

Taught by Erik Demaine's at MIT, mixes 2017 lectures with MIT OCW 2012 lectures, I used this course to learn cache-oblivious data structures while taking 15-853 Algorithms in the Real World.

16.4 Algorithm Design

The typical text for a graduate introductory course on algorithm core theory and analysis is The Design and Analysis of Algorithms by Kozen (1992). This is an excellent book to study with difficult problems well presented and clearly analyzed by Kozen.

  • (Full Course) CS224 Advanced Algorithms
    • Recorded lectures by Prof. Jelani Nelson walking through the design and analysis of online algorithms, linear programming, approximation algorithms, hashing, randomized algorithms.
    • 15-451 some of the lectures are now on zoom (click the 19mar lecture and beyond zoom vids)
    • An interesting book on computational geometry that is surprisingly practical

17 Complexity Theory

17.1 Undergraduate Complexity Theory

Expands on the lectures in 15-251.

17.2 Graduate Complexity Theory

You may want to try solving some of the problems in this domain.

17.3 Useful Math for Theoretical CS

These scribed lecture notes give you a diverse background in math useful for theoretical CS, from the excellent book The Nature of Computation such as these slides from A Theorist's ToolKit which describe how to find research, how to write math in LaTeX, how to give a talk, resources on math.overflow etc.

Prof Ryan O'Donnell has now uploaded lectures.

18 Introduction to Quantum Computing

This is a graduate introduction to quantum computation/information theory, from the perspective of theoretical computer science.

  • (Full Course) 15-859BB: Quantum Computation
    • Recorded lectures on YouTube.
    • The prereqs are an undergrad background in complexity theory (15-251 or 15-455), linear algebra, and discrete probability.
    • "90% of the understanding of the quantum circuit model is achieved by reviewing three purely 'classical' topics: classical Boolean circuits; reversible classical circuits; and randomized computation"
      • A series of curated papers on Quantum Computing

19 Performance Engineering

If you've taken 15-213 Computer Systems or 6.004 RISC-V Architecture, and understand basic graph algorithms and matrix multiplication you will understand this course, as it covers performance analysis, instruction-level optimizations, caching optimizations, and other techniques for high performance, scalable systems. The course is done in C but the concepts apply to any compiled language.

20 Topics in Mathematics for Finance

Notice there's a button for "Export Materials ZIP". 18.642 also has an older course on Open CourseWare with lecture videos. You may also find interesting this Quantitative trading summary and this old post on pricing & hedging models.

21 Jobs

This service matches your skills to people who want to pay you. Jane Street Capital is a finance tech company that hires functional programmers worldwide, you may want to apply there. There are numerous opportunities to apprentice as a security researcher. There are also bounties for writing features available on topcoder, gitcoin or bountysource A large collection of remote job listing and consulting platforms is here.

I recommend checking local schools and labs in your area for research programmer positions, students often do not apply to these campus jobs as they are chasing internships and it's where I got started.

22 Graduate Research in Type Theory

Read these slides from A Theorist's ToolKit on how to find research, how to write math in LaTeX, how to give a talk, where to ask on stackexchange etc.

22.1 Basic Proof Theory

22.2 Intro to Category Theory

22.3 Type Theory Foundations

22.4 Higher Dimensional Type Theory

22.4.1 Computational Higher Type Theory (CHiTT)

The gist of this paper is explained here, CHiTT is a constructivist take on math foundations building an expressive enough model of mathematics so they can build the next generation of proof assistants but as you can see from the gist it will definitely have other applications.

22.4.2 Homotopy Type Theory (HoTT)

Start with this talk A Functional Programmer's Guide to Homotopy Type Theory with intro to Cubical Type Theory, aka (Cartesian) Cubical Computational Higher Type Theory. This is today regarded as a 'misadventure in formalism' by Prof Harper, due to HoTT being insufficiently expressive for programming, but everything you learn in this seminar will be necessary to understand computational higher type theory papers like the magic of paths extending other programs.

22.5 Further Research

  • Follow the research on Robert Harper's CMU page or see CMU's Principles of Programming Group for more graduate course offerings
  • Watch the recorded lectures at the yearly Oregon Programming Languages Summer School, search through Google Scholar for computational/cubical higher type theory research.

23 Graduate Research in Machine Learning/AI

23.1 General AI

You can still watch Berkeley's CS188 on Youtube, uses Norvig's new 4th edition book out in 2020 but any edition you can find will do including the old Lisp addition that is available free on github. Just write your own autonomous agents for exercises. Sussman's grad course is the perfect match to CS188 reviewing older papers with unsolved problems or deep ideas, like his own Art of the Propagator paper and implementation. There is also AI readings to explain intelligence from a computational point of view both these are nice compliments.

23.2 Math Background for ML

This free book Mathematics for Machine Learning will describe the math often used in ML. There's also a series of recorded lectures and recommended texts from CMU and a crash course in linear algebra here and a set of notes. You may also enjoy the Vector Boot Camp from Brown for the multivariable calculus content. Strang now has a big picture of Linear Algebra lectures as well.

23.3 Statistics Theory

  • (Full Course) 36-705 Intermediate Statistics
    • The author of All of Statistics Larry Wasserman covers Chapters 1 - 12 from his book and more covering the fundamentals of theoretical statistics in these recorded lectures
    • The lectures assume you already read Chapter 1 - 2
    • There are many probability lectures around to go with the beginning chapters such as here
    • The quality of these can be changed to 1080p but the audio is terrible, however you can extract the audio easily, and use Audacity (free) to suppress some of the background noise and boost his voice.

23.4 Modern Regression

CMU professor Cosma Shalizi has a great set of lecture notes The Truth About Linear Regression in fact if you go through his extremely large page on notebooks he will explain the insight to virtually everything statistics related such as what are stochastic differential equations and notes about teaching statistics which books are recommended. I wish more professors did this.

23.5 Introduction to Machine Learning

Torrent archive:

Recorded zoom lectures, homework:

23.6 Introduction to Practical Machine Learning

"This course will teach you basic skills to decide which learning algorithm to use for what problem, code up your own learning algorithm and evaluate and debug it." You don't have to use Python, the prof in these lectures shills Julia for students to try instead.

23.7 Advanced Introduction to ML

There is also Cornell's advanced ML class though they deleted the recorded lectures like most other schools post-covid19

23.8 Advanced Statistical learning theory

23.9 Convex Optimization

Used to work on a variety of problems, recently research is in non-convex optimization of neural networks, search google scholar for 'non-convex'.

23.10 Deep Learning

  • (Full Course) 11-785 Introduction to Deep Learning
    • Recorded lectures here to learn to build and tune deep learning models
      • If the playlist is deleted, which is frequently, (use youtube-dl to archive) search YouTube for "CMU 11-785"
      • Some slides on techniques for making deep learning robust to adversarial manipulation
      • Thorough lecture notes and jupyter books on scalable machine learning systems

23.11 Further Research

24 Graduate Research Elective: Cryptography

Read these slides from A Theorist's ToolKit on how to find research, how to write math in LaTeX, how to give a talk, where to ask on stackexchange etc.

24.1 Graduate Cryptography Intro

This course covers post-quantum crypto, elliptic curve crypto, and is taught by premiere researcher Tanja Lange (TU/e)

24.2 Applied Cryptography

  • Read all Daniel J. Bernstein's (and Peter Gutmann's) posts on the IETF Crypto Forum Research Group [Cfrg] archive, it's a master class in modern cryptanalysis and he rips apart bad standards/protocol designs.

24.3 Future Research

  • Follow whatever the PhD students of djb and Tanja Lange are working on
  • Try the Cryptopals challenges
  • See if you can get into TU/e and be a student of Prof Lange/Bernstein