Course Information

Instructor: Thea Rossman (she/her; they/them also fine)

Email: tcr6 “at” [alumni “dot”] stanford “dot” edu

Office hours: By Appointment

Lectures: Monday/Wednesday, 5:30pm-6:30pm; Hewlett 101

Units: 2 units, satisfactory/no credit

Summary

CS110L a supplemental, 2-unit, C/NC class intended for those who have recently taken or are concurrently taking CS110. The goal is to offer an approachable and engaging exposure to effective, robust, and secure systems programming.

Our focus is on safety and robustness in systems programming: Where do things often go wrong in computer systems? How can we avoid common pitfalls? We will introduce and use the Rust programming language as a vehicle to teach mental models and paradigms that have been shown to be helpful in preventing errors, and we will examine how these features have made their way back into C++. 

The first three weeks will focus on preventing many of the types of problems that you encountered in CS 107: how can we prevent buffer overflows, memory leaks, use-after-free bugs, and other sorts of memory errors? (note: it’s okay if you’re a bit rusty on CS107 material! we’ll review everything you need to know.) Then, we will focus on preventing common mistakes that arise in the programming settings CS 110 covers: how do we write safe code when multiprocessing and multithreading are involved? Check out the syllabus for an overview of course material.

Outside of lecture, there will be small weekly programming exercises to help you reinforce the material; I expect these to take 1-3 hours to complete (and I’ll be generous with partial credit and extensions – this is not meant to be a stressful class!).

In addition, there will be two projects throughout the quarter, which may be completed in small groups: in the first project, you’ll implement a simple version of gdb; in the second, you’ll implement a high-performance load balancer for a server. (Both of these may sound intimidating right now, but I promise that you’ll have all of the tools you need to complete them!) You are also welcome to propose your own project to replace either of these. There are no exams.

Corequisite

This class is intended for those who have recently taken or are concurrently taken CS110. We will draw on some CS 107 material in the first half of the quarter, but it’s okay if you’re a bit rusty. (Can you find two bad puns in that sentence?)

This class is particularly designed for you if you’re new to and curious about systems programming and security (whether or not those terms mean anything to you right now), especially if you think you’d benefit from a bit more engagement with CS110 and CS107 material – this course is one opportunity to review while digging deeper.

Programming assignments in the class will use Rust, and you are not expected to have any prior exposure to Rust. (In engaging with Rust, we’ll focus on the philosophies and practices it encourages and how they can support more robust systems programming in general.) We’ll refer to examples written in C and C++ to compare different approaches to solving problems, and we expect some basic familiarity with both of these languages or willingness to work with me to get caught up.

Requirements and Grading

This class is graded on a CR/NC basis; you need to earn a 70% to pass. The grade breakdown is:

I want this to be an enjoyable and non-stressful class for you! If you make a reasonable attempt at all the work and communicate when things come up, you will have no problem passing.

Finally: note that the course is in person. If you miss a few classes during the quarter, we have plans in place for how you can continue to learn the material and participate; I’ll say more at the beginning of the quarter, but feel free to reach out if you have any questions about this. Additionally, if you’re interested in the course but can’t attend the first week of class (covid risk, flight prices, etc.), please reach out!

Slack

All communication, including asking and answering questions, will take place on Slack. We’re a small class, and part of the fun of taking a small class is getting to know other people! We’ll set up Slack at the beginning of the quarter. You’ll be able to join the Slack through the Slack tab on our Canvas; please email me if you are having trouble.

Software

If you would like to follow along on your personal computer, you may install the Rust toolchain on your computer by following the instructions here. However, the Rust toolchain is also installed on myth.stanford.edu, and you can work on assignments there just as you do in CS 107 and CS 110.

I recommend working on myth, because it can be tricky to get tools such as gdb to run properly on your own computer, and I’ll be better at helping you troubleshoot on the myth machines. However, you are not required to do so.

We’ll also use Git and GitHub for version control, collaboration, and assignment submissions. Version control software is really common in industry and open-source projects; and if you haven’t used it before, we think 110L will offer a light and useful introduction. (We’ll teach you everything you need to know!)

Textbooks and Resources

This class has no textbook. However, if you are interested in additional readings, Programming Rust and the free, online Rust book are both excellent resources.

Honor Code

This portion was adopted from the CS 110 course information handout.

The honor code policy for this class is the same as that of CS 110. Although you are encouraged to discuss ideas with others, your work is to be completed independently and should represent fully original work. Whenever you obtain help, you should credit those who helped directly in your program, e.g. in a program comment. Any assistance that is not given proper citation is considered plagiarism, and a violation of the Stanford Honor Code. The following activities are examples of what we consider to be honor code violations:

  1. Looking at another student’s code.
  2. Showing another student your code.
  3. Discussing assignments in such detail that you duplicate a portion of someone else’s code in your own program.
  4. Uploading your code to a public repository (e.g. github.com or bitbucket.com) so that others can easily discover it via word of mouth or search engines. If you’d like to upload your code to a private repository, you can do so on Github or some other hosting service that provides free-of-charge private hosting.

Unfortunately, the CS department sees more than its fair share of Honor Code violations. Because it’s important that all cases of academic dishonesty be identified for the sake of those playing by the rules, we exercise our right to use software tools to compare your submissions against those of other students.