CS107 is the third course in Stanford's introductory programming sequence. Our CS106 courses provide students with a solid foundation in programming methodology and abstractions and CS107 follows on to build up their programming maturity and expand breadth and depth of experience. The course will work from the C programming language down to the microprocessor to de-mystify the machine. With a complete understanding of how computer systems execute programs and manipulate data, you will become a more effective programmer, especially in dealing with issues of debugging, performance, portability, and robustness. Topics covered include: the C programming language, data representation, machine-level code, computer arithmetic, elements of code compilation, optimization of memory and runtime performance, and memory organization and management.
The class has two lectures a week and a weekly lab designed for hands-on learning and experimentation. There will be significant programming assignments and you can expect to work hard and be challenged by this course. Your effort can really pay off - once you master the machine and advance your programming skills to the next level, you will have powerful mojo to bring to any future project!
The CS107 web site is being prepared and will be published here when ready. In the meantime, here are answers to questions commonly asked by potential students.
Questions about enrollment
When is CS107 offered?
CS107 is scheduled for every quarter in the 2017-18 academic year. The course has two 80-minute lectures and a 2-hour lab each week. Fall quarter lectures meet Monday and Friday 1:30-2:50pm in Cubberley Aud. Labs are held TWTh at various morning, afternoon, and evening times.
Will the lectures be recorded and available to watch online?
CS107 is typically offered by SCPD only one quarter per year, as dictated by industry demand for the online offering. In 2017-18, spring quarter is scheduled to be recorded; the other quarters are not. SCPD may keep lecture recordings from a prior quarter accessible, but we don't recommend you make a habit of relying on these as their continued availability is uncertain and they may not be a good match for the current quarter's coverage.
I have a conflict with the lecture time. Can I watch online or get notes from a friend?
Lecture is an important part of the course and students find it most effective when they can join us in person. (An ode to "did I miss anything?") My earnest recommendation is that you wait or re-arrange your schedule to permit your full participation in all of your courses. Enrolling in conflicting courses is disallowed by university policy. We don't police your schedule to reject conflicts, but this does not mean we encourage or enable it. CS107 will not offer any alternate or makeup exams so you must arrange to be present for our scheduled midterm and final exams. If you've got an unresolvable conflict with lectures or exams, holding off on 107 shouldn't be catastrophic--- we are offering the class every quarter, so you have lots of other chances without much delay!
Do you allow auditors?
Auditors are welcome to attend lecture, access our materials, and complete labs and assignments on their own, but work is not handed in. We will not be able to grade work from auditors, nor be able to accommodate them in the lab sections.
The course is listed as being offered for 3 to 5 units, what does this mean?
All undergraduates are required to take the course for 5 units. Graduate students may opt to enroll for 3 or 4 units to squeeze into a limited tuition allowance, however this is solely a bookkeeping change and has no effect on the course requirements.
What course grade options are available?
You may enroll for either a letter grade or CR/NC option. Students are graded on the same standards during the quarter without consideration of which grading option has been chosen. A CR course grade is earned for any course letter grade of C- or higher.
Questions about course content
What are the learning objectives for the course?
The goals for CS107 are for students to gain mastery of
- writing C programs with complex use of memory and pointers
- an accurate model of the address space and compile/runtime behavior of C programs
to achieve competence in
- translating C to/from assembly
- writing programs that respect the limitations of computer arithmetic
- identifying bottlenecks and improving runtime performance
- writing code that correctly ports to other architectures
- working effectively in unix development environment
and have exposure to
- a working understanding of the basics of computer architecture
What are the course prerequisites?
Successful completion of CS106B/X (or equivalent) and eagerness to advance to the next level. You should be an accomplished programmer who has practical C/C++ skills using recursion, dynamic data structures (pointers, linked lists, trees, graphs), data abstraction, classic data structures (lists, stacks, queues, sets, maps), and standard algorithms (searching, sorting, hashing). You should have an appreciation of the intrinsic value of good engineering and design and you will be expected to produce well-decomposed, readable code. You're welcome to talk with me if you need help determining the right placement for you.
What are the course textbooks? Are they required?
The required text is Computer Systems: A Programmer's Perspective by Bryant and O'Hallaron 3rd edition. This text was written for a similar course at Carnegie Mellon and provides readable and thorough coverage of the core topics with an emphasis on acquiring practical skills. The bookstore is stocking a custom version commissioned for our course that includes only the chapters we cover (this keeps your cost down); you can also use the regular full 3rd edition. The 3rd edition has substantial updates for x86-64 from IA32; attempting to use the outdated first/second editions will not work well. There will be assigned readings from B & O that are important preparation for lecture and lab. We strongly recommend you have a "C language goto" in whatever form works best for you: textbook, tutorial, reference sheet, website etc. As one suggestions, The C Programming Language by Kernighan and Ritchie is the classic text and a digital copy of K&R is available to Stanford students via Safari Books Online.
Questions for SCPD students
Note: CS107 is offered on SCPD once per year. In 2017-18 that quarter is expected to be spring.
How do SCPD students participate in lab?
If you are local to the Bay Area, you are welcome (and encouraged) to attend lab in person. If that isn't possible, you can work through the lab exercises on your own. The lab materials are posted online and the TAs will prepare a webcast of the lab highlights each week. You may work alone or are welcome to arrange to work on the labs in collaboration with another SCPD student. Use the forum to find a buddy if you'd like.
How do SCPD students take exams?
Local students join us on campus for the regular exam. Remote students take exams on-site, proctored by the SCPD site administrator. The remote exam is administered on the same day as the regular exam; we can usually be somewhat flexible on the exact timeslot.
Still have questions?
If your question is not answered here, email us at cs107 at cs dot stanford dot edu and we can help you out!