CS 190 Course Information

Motivation For This Course

Other CS classes teach you how to write correct code and how to write efficient code. This class will teach you how to write beautiful code: code that is clean, simple, and obvious, so it is easy to understand, maintain, and extend. The skills you will learn in this class will also allow you to solve difficult problems more quickly.

There are two reasons behind the creation of this course. First, it is well-known that the best programmers are 10-100x better than average programmers, when considering the quality of their code and how quickly they produce it. However, we do little to teach our students the skills required to become elite programmers. Second, the most important idea in all of Computer Science is problem decomposition: how to take a complex problem and divide it up into modules that can be implemented and maintained relatively independently. Unfortunately, none of our classes teach students how to decompose problems.

These two issues are related: an extraordinary ability to design clean and simple software is what separates elite programmers from average programmers. Many people think this ability cannot be taught, that it is an innate skill, and either you have it or you don't.

CS 190 is an experiment to see if it is possible to teach the art of software design. Can we teach students how to decompose problems and write clean, simple, and obvious code? In addition, can we provide students with a foundation that they can build upon to become elite programmers?

Class Meetings

There are three 75-minute meeting times reserved for the class per week. However, we will not use all of reserved time. Some class periods (mostly at the beginning of the quarter) will be used for lectures: these will be 50 minutes long. Some class periods will be used for studio activities such as code reviews; these may require the full 75 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.

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.


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 Twitter-like Web service from scratch. We will then perform code reviews of the projects in class, and I will read all of the projects to provide additional feedback. In the second project, you will revise your code based on the code reviews and feedback. Then we will perform another round of code reviews. In the third project, I will select a few of the projects and scramble them, so that each team is assigned the code from a different team. You will then extend the existing code with additional features, and you will also have an opportunity to make improvements to the existing code. Finally, we will review the results.

The work for this class is front-end loaded: the most intensive part of the quarter will be the first three weeks, when you are constructing the basic Web service. Plan on spending at least 10-20 hours per week on CS 190 during this period.

All of the programming for this class will be in Java; prior Java 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 important parts of this process. 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, not on the person who wrote it. Second, when receiving criticism it's important to listen carefully and internalize the criticism in a constructive way; this can be difficult, particularly when code on which you worked very hard gets dissected in a public setting such as an in-class code review. 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.


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.


Course enrollment will be limited to 20 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).