zettelkasten

Search IconIcon to open search
Dark ModeDark Mode

CMU Course Wiki

Course experiences (and perhaps along with other commitments) at CMU, grouped by semesters1. Note these are only my personal experiences and opinions.

H2 Spring 2024

H3 15-411 Compiler Design

You literally implement an entire C0 compiler in this course, in a team of up to two. It took tons of time, but it was the class project I had the most fun with so far. 600+ commits, 10,000+ test cases, 10,000+ lines of code, 80+ pull requests—these are just ridiculous numbers compared to most other CS courses—but probably expected if your compiler needs to handle all the fun compiler stuff like lexing, parsing, typechecking, translation, optimisation, code generation, register allocation, etc.

I often miss the theory part when building software and miss the coding part when talking about algorithms or theory. Building a compiler is just a perfect place where I can stop complaining because it’s both about engineering a piece of software with countless design decisions to make but also one that requires the theory to work correctly. For example, assigning variables to registers on the CPU (i.e. register allocation) likely involves implementing provably correct graph algorithms, and the typechecker likely involves implementing formal inference rules in code.

Ultimately, the compiler needs to produce correct and sufficiently efficient x64 assembly from well-formed C0 source code, or crash for ill-formed ones. There is no concurrency involved—no mess, but this process can take lots of steps—lots of mess.

There are 6 labs in this course, with Labs 1 to 4 incrementally adding more language features in C0, Lab 5 requiring a level of optimisation close to -O1 in GCC, and Lab 6 being a self-defined compiler project. Personally, I find the optimisation lab (Lab 5) the hardest and time-consuming. For Lab 6, we added concurrency features like coroutines, inter-thread channels for message passing, and mutexes, creating the new Co language.

Notes: directory
Workload: 287.78 hours
Course Average: 97.47%

H3 15-445 Database Systems

It’s densely packed and fast-paced. Perhaps it’s one of the best databases courses out there. It goes over lots of useful database concepts and database systems’ major components: from storage model to distributed databases, and from the buffer pool manager to the execution engine. Having used databases when building applications, I did not realise before the course how complex the underlying system is and how the design and implementation of a particular database system can influence what workflows it’s suitable for.

Only the first two lectures are about SQL—after that, it’s all about the underlying system that runs SQL queries while providing guarantees such as serialisability when running queries concurrently, recoverability when hardware can fail, etc. I would say there are definitely lots of interesting areas in databases that are worth delving deeper into.

The projects are in C++ and are cumulative. Most of them involve implementing missing pieces in the BusTub database. I think it was helpful and challenging to learn a new language (I didn’t know C++ before taking 15-445) and look at how a database code base is structured.

Observation: there are at least 20 skulls on the lecture slides.

Notes: directory
Workload: 185.63 hours
Course Average: 92.91%

H3 11-711 Advanced Natural Language Processing

The course structure can be thought of as a speedy introduction to NLP followed by a survey of many topics in NLP. It is definitely a research-focused course aimed at getting you up to speed for NLP research. In fact, the final project is to produce a paper on par with a publishable conference paper.

Surprisingly, there is no prerequisite for this course, and Transformer is in lecture 5. Personally, I was familiar with a lot of the concepts in deep learning and NLP, but I would not be able to imagine how things would have gone otherwise. Lectures are usually interesting and informative, and I enjoyed learning a broad range of ongoing research in NLP.

Assignment 1 was reimplementing part of Llama, which was fun other than having to implement rotary embedding. Assignment 2 was to build a RAG system that answers questions about CMU or LTI. There was quite some engineering and prompt engineering involved, and I do not know how we ended up with the best-performing system. The final project is split into Assignments 3 and 4, which basically involve picking a topic for research, reviewing literature, implementing a novel idea, running experiments, and writing a paper. It definitely took a lot of time, perhaps too much (I always think that research takes an infinite amount of time and end up spending an infinite amount of time), but I was quite satisfied with the paper.

Notes: directory
Workload: 215.01 hours
Course Average: 98.45%

H3 76-270 Writing for the Professions

A light and hopefully useful course that teaches you how to communicate effectively in the workspace. Major assignments include writing a resume, a professional email, some instructions, and a communication plan.

Workload: 52.08 hours

H3 15-150 TA

polly polly polly polly

Workload: 131.80 hours

H3 Research

Workload: 245.13 hours

H2 Fall 2023

H3 15-251 Great Ideas in Theoretical Computer Science

A very good course that teaches you how to think like a theoretical computer scientist. It starts by motivating why we want to formalise mathematics, and how the quest to formalise mathematics gives rise to computer science. There is an emphasis on the idea of building a mathematical model for the real world, reasoning about it mathematically in the abstract world, and discovering new knowledge that could be relevant in the real world. It was fascinating to see in a sense the fundamental connection between computer science, mathematics, and the physical universe. As an introduction to theoretical computer science, it covers a wide range of topics that could be expanded upon by courses of their own. Some of my favourite topics include Limits of Computation and P vs NP. The TAs are awesome, and the professor is inspiring. The workload is on the heavy side, with proofs taking a substantial amount of time to come up with, but ultimately very rewarding. I ended up taking lecture notes by hand and typesetting them for a second pass, which helped with internalising the definitions and proof techniques.

Notes: pdf
Workload: 272.45 hours
Course Average: 97.47%

H3 15-210 Parallel and Sequential Data Structures and Algorithms

A pretty standard algorithm course? There are lots of “and"s in the course title but yes it does cover data structures and algorithms for parallel and sequential situations. Some techniques include divide and conquer, contraction, parallel graph search, parallel dynamic programming, etc.. The parallel part of 210 is arguably the more interesting part, though learning parallelism in SML doesn’t translate well to imperative languages, so it will be non-trivial work to apply what you learn in 210 in non-functional languages. Nonetheless, I enjoyed the programming tasks—most of which can be implemented in less than 100 lines of functional code but coming up with the algorithm is the hard part.

Notes: directory
Workload: 195.90 hours
Course Average: 96.94%

H3 21-325 Probability

A course that’s more on the mathematical side—lots of abstract, theoretical probability theory. I was hoping to find the probability content useful for computer science, but it did not quite work out that way. Initially, the course feels less structured than other math courses—there isn’t an outline of what you need to know, what you need to be able to prove, and strategies for solving problems. Instead, homework throws you into unfamiliar territories, makes you try things, and perhaps helps you discover more about probability on your own. Learning-wise it helps, but took a lot of time. The course also seems harder than it should, with some lectures going into things like multivariable calculus and infinite matrixes—beyond the scope of prerequisite courses. Even with a 100% average on Calc III, I couldn’t quite integrate; the continuous probability part of the course almost felt like real analysis. In the end, however, I think I have a good understanding of probability and can apply my probability toolbox to solve problems without relying on mechanical strategies I may learn from other courses. Looking back at my notes, they start making sense as a whole, perhaps because the language of probability is just somewhat different from other math I have seen. The professor is very nice, motivates lectures well, walks through concepts and problems slowly, and is helpful during office hours. Recommended course if you like spending the time thinking about hard problems.

Notes: pdf | summary sheet
Workload: 147.52 hours
Course Average: 99.83%

H3 98-317 Hype for Types

Lots of interesting programming language topics going on here, giving you a glimpse into what you can do with types and logic (and possibly an idea of what people in a PL concentration would learn). Some topics include type algebra, constructive logic, linear logic, category theory, and dependent types. My most memorable moments were differentiating a type, using continuations in proofs, and writing proofs with Lean. The instructors know a lot about PL and explain things very well.

Workload: 15.88 hours

H3 11-345 Independent Study

Did research, and submitted for publication, which was cool.

Workload: 142.40 hours

H3 15-150 TA

Functions are values~

Workload: 190.83 hours

H2 Summer 2023

H3 15-213 Introduction to Computer Systems

A good course to take during the summer. There is a lot of code to write and bugs to find, so expect to have to spend some non-trivial amount of time on the programming assignments. Some of the fun ones are malloclab, bomblab, cachelab, and proxylab. Other than that the writtens and exams are on the easy side compared to other CS core classes.

Notes: 15-213 Notes
Workload: 215.65 hours
Course Average: 98.13%

H2 Spring 2023

H3 15-150 Principles of Functional Programming

Course to experience a very different way of thinking about programming, if you only have experience with imperative programming. Recursions and code proofs can be tricky at first, but after taking the course I can’t think about computation without them. Types and higher-order functions are things I find particularly useful from the course. Continuation passing style is interesting, but perhaps not the most useful. Homework is challenging and fun, and they are written by TAs, which is very cool.

Notes: directory
Workload: 187.63
Course Average: 96.15%

H3 21-259 Calculus in Three Dimensions

A somewhat easy (?) calculus course covering what its title suggests—higher-dimensional, multi-variable differentiation and integrations. Some of the integrals can get tricky, but we are allowed to use Wolfram Alpha. Lectures have clear organisation and contents were easily digestable.

Notes: directory
Workload: 104.37
Course Average: 100.21%

H3 21-241 Matrices and Linear Transformations

A linear algebra as the title suggests. The lectures and homework were great, and exams were usually manageable. It’s a bit proof-heavy for a linear algebra course, so a solid understanding of Concepts will be very helpful. I did mess up the second midterm very badly, but after writing out all the theorems and making sure I understood all the concepts the remaining exams went smoothly.

Notes: directory
Workload: 107.68
Course Average: 92.89%

H3 80-285 Natural Language Syntax

It starts by motivating the study of syntax, going into early developments that make a lot of sense. The latter part of the course goes into modern syntax, which seemed very complicated and obscure. We read several syntax papers but mostly focused on analysing their logical structure.

Notes: directory
Workload: 56.10

H3 66-140 DC Grand Challenge Seminar (GCS)

A GenEd requirement during my time at Dietrich. The course concerns important issues (identities in higher education) and has some interesting projects, but the overall delivery was rather boring and repetitive.

Workload: 75.66

H3 15-113 Special Topics in Applied Python Programming

A great course going into some interesting content that could be left out in introductory CS courses because there is just limited time. We get to see things like A*, minimax, error correction, linear time non-comparison sort, etc., many of which are implemented live. There are also opportunities for student lectures. I gave some lectures on web development with Flask and machine learning with PyTorch.

Workload: 42.50

H3 98-043 StuCo Chess Tactics and Strategy

A fun and relaxing course to see some chess tactics and analyze some games together even if you’re not good at chess.

Workload: 10.78

H2 Fall 2022

H3 15-122 Principles of Imperative Computation

A very solid introduction to C programming. I find all the programming assignments fun and challenging. It’s very nice that we can see autograder output before the deadline. Professor Iliano also gives very interesting lectures. With a few bonus problems, I got more than 100% on the programmings. Written assignments and exams are on the scary side. It’s easy to miss some pointers or to be slightly off, especially given the time pressure.

Workload: 187.12 hours
Course Average: 96.64%

H3 21-127 Concepts of Mathematics

A roller coaster of pure evil mathematics. A concepts-heavy course that requires a clear understanding of mathematical reasoning and rigorous thinking, but a very rewarding one. Getting used to writing proofs took time and practice. Professor Newstead’s textbook and lectures are very well-structured and easy to follow. For the weeks I started the problem sets early, figuring things out is just enjoyable. But not looking at the problems until 48 hours before the due date on other weeks was a bad idea.

Notes: 21-127 Notes | pdf
Workload: 209.99 hours
Course Average: 97.21%

H3 76-106 Writing about Literature, Art and Culture & 76-107 Writing about Data

Two writing minis. Reading and writing about graphic literature was something new but entertaining. Writing about Data felt a bit more compressed and simplified, but understandable as a half-semester course that tries to teach about the entire research process.

76106 Workload: 66.17 hours
76106 Workload: 43.52 hours

H3 80-180 Nature of Language

A good introduction to linguistics, covering phonetics, morphology, sociolinguistics, semantics, etc. With some linguistics experience, this course is very manageable. Most assignments were interesting; some were… a bit confusing.

Workload: 86.85 hours

H3 85-102 Introduction to Psychology

Great course. Professor Oppenheimer cares a lot about students’ learning. Lectures are energetic, touching almost every major topic in psychology, and also inspiring in the sense that I feel empowered to look at the world through a psychological lens. Favourite GenEd course so far.

Notes: directory
Workload: 76.20 hours

H3 98-129 StuCo Introduction to Esoteric Programming Languages

A very fun course. Lectures cover a wide variety of esoteric programming languages, or just esoteric programming practices in general, and come packed with jokes. The final project was designing an esoteric programming language which you probably don’t get in other CS courses at CMU.

Workload: 15.23 hours

H2 AP Credits

APGot credit for…
AP Economics (Macro + Micro)73-011 AP Economics
AP Statistics36-200 Reasoning with Data
AP Physics C Mechanics33-141 Physics I for Engineering Students
AP Physics C Electricity and Magnetism33-142 Physics II for Engineering Students
AP Calculus BC21-120 Differential and Integral Calculus + 21-122 Integration and Approximation
AP CSP15-110 Principles of Computing
AP CSA15-112 Fundamentals of Programming
AP Chemistry09-105 Introduction to Modern Chemistry I
AP Seminar + AP Research99-004 AP Capstone Junior Seminar + 99-005 AP Capstone Senior Research Project
AP Biology03-011 AP 4 Biology
AP Languagenothing… :(