CS 190 Course Information

The CS curriculum here has several classes that teach you the mechanics of writing programs (if statements, recursion, inheritance, etc.). We have classes that teach you how to write correct code, how to write efficient code, and how to use various software engineering tools such as make and git. However, we have no other class that teaches software design: how to decompose a complex problem into modules that can be implemented and maintained relatively independently. In CS 190, the primary focus is on complexity: how can we build systems that are as simple as possible, so they can be written quickly and maintained easily?

At the beginning of the class you will learn a set of philosophical principles to guide software design. You will then attempt to apply these principles in a series of programming projects. We will use code reviews and project revisions to improve your ability to work with the design principles. The overall goal for the class is to change the way you think about software design and to give you a foundation that can help you develop into an elite programmer.


This course is based on the material in the book A Philosophy of Software Design, which can be purchased from Amazon. I will not go over the material of the book in lecture, but the material is essential for the class; I will refer to it extensively during the course. You should read Chapters 1–18 and familiarize yourself with this material by the first Friday of the quarter.


The class is organized around three programming projects, which you will carry out in teams of two. In the first project you will build a substantial system from scratch. We will then perform code reviews of the projects in class. I will also write a detailed code review for each project and meet individually with each team to discuss your code. In the second project, you will revise your code based on the code reviews, and you will also add a few more features. Then we will perform another round of code reviews. In the third project, you will design a new system from scratch, and we will review the results.

This class has a fairly high workload. The only way to learn software design is to build something substantial, and that takes time. Each of the three projects is a significant undertaking. The projects are intentionally open-ended, so it's easy to spend a lot of time on them (15-20 hours per week or more).

All of the programming for this class will be in C++; prior C++ experience is essential.


The most important element of this class is iteration: you will write some code, get feedback, and rewrite, much like an English writing class. Most of your learning will come from the feedback and rewriting, and both giving and receiving criticism are good ways to learn. It's important to be constructive on both sides of this process. First, when criticizing others' code, focus on the code and how to improve it; don't attack the person who wrote it. Second, when receiving criticism, try to listen carefully and internalize the criticism in a constructive way. This can be difficult: it's easy to become defensive when code on which you worked very hard gets dissected in front of the whole class. No-one's code will be anywhere near perfect and everyone will receive intense criticism. Don't become discouraged because you're getting a lot of criticism; just focus on how to learn from the criticism so you can make your code better. Your grade for the class will not be affected by how much criticism you receive, but it will be affected by how insightfully you analyze others' code and how effectively you learn from criticism to improve your own code.

Class Meetings

There are three 80-minute meeting times reserved for the class per week. However, we will not use all of reserved time. A few class periods (mostly at the beginning of the quarter) will be used for lectures: I will try to keep these to 50 minutes. Most class periods will be used for studio activities such as code reviews; these will usually require the full 80 minutes. Some class periods will not be used at all, in order to allow more time for project work. See the class schedule for precise information on class meetings. Class attendance is mandatory; if you must miss a class, please let me know ahead of time.

Lecture notes are available in advance for all of the lectures. These provide an outline for much of the material that will be presented in class; I recommend that you print out the notes and bring them to class so you can mark them up with additional notes during lecture. Or, you can copy them into Word documents and edit them during lecture to add notes.


There will be no exams in this class. Your grade will be determined in part by the quality of your code at the end of the quarter and in part by your participation in class. The material in the class is highly subjective, which makes it hard to assign grades objectively. I don't plan to spend a lot of time on grading per se: I plan to focus my time on helping you to become better programmers. Students who put a sincere effort into the class are likely to receive grades of A- or A.

Late Days

Each student is allowed a total of 3 late days for this class, which may be spent in units of one day (24 hours) on any project(s) throughout the quarter. Once your late days have been used up, late work will not receive any credit. Late days are intended to handle all issues, including unexpected problems such as illness. If you decide to use one or more late days for a project, it's important that you let me know before the project deadline so I can plan dependent activities such as code reviews: send me an email with information about how many late days you will be using for that project.


Course enrollment will be limited to 18 students. This is necessary so that I can read all of your code and so that everyone can participate in class discussions. In order to be admitted to the class, you must submit an application, and I will select students based on the applications. Click here for information about the application, and be sure to submit by the deadline indicated on the application information page.

Honor Code

As in all Stanford classes, you are expected to follow the Stanford Honor Code. For example, the following activities are prohibited and will be treated as Honor Code violations (this is not intended to be a complete list of Honor Code violations):

We reserve the right to use computer software such as MOSS to analyze material that you submit in order to detect duplication with other students or existing solutions.

Students with Documented Disabilities

Students who may need an academic accommodation based on the impact of a disability must initiate the request with the Student Disability Resource Center (SDRC) located within the Office of Accessible Education (OAE). SDRC staff will evaluate the request with required documentation, recommend reasonable accommodations, and prepare an Accommodation Letter for faculty dated in the current quarter in which the request is being made. Students should contact the SDRC as soon as possible since timely notice is needed to coordinate accommodations. The OAE is located at 563 Salvatierra Walk (phone: 723-1066).

Course-Related Expenses and Financial Aid

All students should retain receipts for books and other course-related expenses, as these may be qualified educational expenses for tax purposes. If you are an undergraduate receiving financial aid, you may be eligible for additional financial aid for required books and course materials if these expenses exceed the aid amount in your award letter. For more information, review your award letter or visit the Student Budget Web site.