Grading and Policies Updated April 5, 2017

Honor Code

Please respect the spirit and the letter of Stanford’s honor code. You’re welcome to talk to classmates about labs conceptually, but the implementation must be your own unless otherwise noted. For example, speaking with a classmate about why some bug might be present in your program is okay as long as your classmate doesn’t share with you a program that fixes your bug. You should not use any existing code that we don’t supply, whether it is online or otherwise. Further, copying verbatim from places like Stack Exchange is prohibited: you will learn much more if you write your own programs.

Grading Policy

60% of your grade will come directly from passing the unit tests that are distributed with the lab. Another 20% of your grade will come from passing unit tests that were not distributed with the lab. The final 20% of your grade will come from a manual code quality and style pass: you should not have memory errors and you should follow the style present in the lab template. When in doubt, run your program through Valgrind and follow the relevant Google Style Guide.

Late Policy

You have 100 late hours per lab. If your lab is n hours late, your score on the lab will be capped at max(0, 100 - n)%. Hence, the later you are, the better off you are submitting an imperfect assignment. For instance, if you submit 12.7 hours late and receive a base (before adjustment) score of 72%, your score will be capped at max(0, 100 - 12.7) = 87.3%, so the final score will be the full 72%. Similarly, if you submit your assignment 28.2 hours late and receive a base score of 95%, your final score will be capped at max(0, 100 - 28.2) = 71.8%, and so your score will be 71.8%.

Work Load

Each lab should contribute about 3 hours of work a week. If you are investing significantly more time than this, it is likely prudent to ask for help at office hours or via email.


You may be wondering why CS240 has decided to add labs to its curriculum. Quite simply, we want you to practice what you learn. We believe complex systems’ concepts are best and most easily understood when they are implemented.


Mondays and Wednesdays
1:30pm - 2:50pm
Skilling 80


Join the CS240 Google group.

Staff List


David Mazières
Gates 290
(415) 490-9451
Office Hours:
Friday 3:30pm-5:30pm

Sergio Benitez
Gates 288
(650) 723-8777
Office Hours:
Monday 5pm-6pm
Wednesday 5pm-6pm

Matthew Volk
Course Assistant
Office Hours:
Wednesday 6:15-8:15pm
Thursday 1:45-3:45pm
Lathrop Tech Lounge
Google Hangout

Previous Terms

Spring 2016
Spring 2015
Spring 2014
Winter 2013
Spring 2013
Spring 2012
Spring 2011
Spring 2010