Syllabus


Hi there đź‘‹ and welcome to CS106B!

Course Overview

A nonprofit needs to assign tasks to its volunteers so they get completed as fast as possible. A political scientist wants to determine how to allocate city council seats based on a popular vote. A climatologist wants to estimate how many trees are in a forest. A city planner wants to see whether a proposed development will be underwater as sea levels rise. A physicist wants to know why perturbations to a system cause cascading effects.

How can we use computing power to answer these questions?

This course is about transitioning from “I know how to write programs” to “I know how to solve problems with computers.” Over the course of ten weeks, we’ll explore an array of techniques, tools, and perspectives useful for modeling and solving problems. We’ll explore recursion and see how it can be used both to model the intricacies of nature and to optimally allocate resources. We’ll develop a rich vocabulary of structures that can both capture the position of a dancer in space and compress a data file. And we’ll see how to put these techniques to use in problems drawn from a range of disciplines. By the time you’ve completed this course, you’ll learn how to look at problems in fundamentally different ways and how to use those perspectives to create clean and elegant computational solutions.

Teaching Team

Photo of Keith Schwarz
Keith
Photo of Neel Kishnani
Neel

Our wonderful undergraduate section leaders lead sections and staff LaIR starting Week 2.

Websites and Technology

The main CS106B website is where you are right now, cs106b.stanford.edu. We have links to a bunch of other tools here. Here's the quick rundown:

  • Our main course website cs106b.stanford.edu is the main hub for course information. It contains links to everything you’ll need.
  • We use Canvas to host lecture videos.
  • We use Ed as our Q&A forum.
  • You will need to download and install Qt Creator to complete the coding assignments.
  • You'll submit your work online through Paperless.

Prerequisites

CS106B assumes that you have a familiarity with programming at the level of CS106A or the AP Computer Science exam. Check out our course placement page for more information about deciding whether CS106B is right for you. As always, feel free to get in touch with us if you have any questions.

A note: although this class uses C++, this class is primarily designed to teach abstraction, recursion, and algorithmic analysis. If you already know those topics and just want to learn C++, you may want to opt to take CS106L instead of CS106B.

Lectures

CS106B meets Monday, Wednesday, and Friday from 11:00AM - 12:00PM noon in Hewlett 200. The first two weeks of the quarter will be run online through Zoom. (Visit the course Canvas page to get the Zoom meeting ID.) Throughout the quarter, lectures will be recorded throughout the quarter and made available on Canvas.

Discussion Sections

In addition to lecture, you must also sign up for a weekly discussion section. Section signups are handled online and run from Thursday, January 6th at 5:00PM Pacific time to Sunday, January 9th at 5:00PM Pacific time. After a matching process, your section assignment will be emailed by Tuesday, January 11th at 5:00PM Pacific time. Sections begin the second week of classes. This link is also available on the CS106B web page.

Although Axess lists discussion sections for this course, we don't look at Axess section enrollments when assigning sections. Even if you're enrolled in a section through Axess, you need to sign up through our system as well to make sure that someone will be grading your assignments.

Getting Help

Learning to program is like learning any skill – it takes practice, and it’s normal to need some help from time to time.

You can get one-on-one help from our staff through “LaIR Hours.” LaIR hours run from 7:00PM - 11:00PM Pacific time, Sundays through Thursdays. We'll release details about how LaIR will run this quarter once LaIR hours begin.

In addition to the LaIR, you can get help asynchronously on our online EdStem forum. This is a Q&A site that we’re constantly monitoring, and we’re happy to take conceptual questions there. Visit Canvas to get a link to the EdStem page. Our EdStem forum is primarily for conceptual questions. If you have a coding question, please post it privately so you don’t share your code with everyone else in the class.

And finally, you’re welcome to call into Neel or Keith’s office hours each week. We’re looking forward to meeting you and are happy to help out!

Units

If you are an undergraduate or a non-matriculated graduate student, you need to enroll in CS106B for five units (these are department and university policies, respectively). If you are a matriculated graduate student, you may enroll for anywhere between three and five units, depending on what best fits into your schedule. Regardless of how many units you are enrolled for, the course content and requirements will be the same. The unit flexibility is simply to make scheduling easier for matriculated graduate students.

Five-unit courses at Stanford vary greatly in their difficulty. Based on past student experiences, you should expect that this course probably will require a time investment proportional to its unit load. Expect to put in around 10 – 15 hours each week working on CS106B. We'll offer a lot of support through office hours, extra practice problems, and the like, and if you're willing to put in the effort to learn the material, the course staff will be behind you every step of the way.

Readings

The required reading for this course is Eric Roberts' Programming Abstractions in C++. You can purchase a copy at the bookstore using this link:

https://www.bkstr.com/stanfordstore/search/keyword/programming%2520abstractions

You can also use this online version, which is a 2012 draft version of the book. It isn’t as polished as the final one, but should be sufficient for the quarter:

https://web.stanford.edu/dept/cs_edu/resources/textbook/

We assume that the majority of you have no prior programming experience in C++, and this textbook is a great resource to use at the start of the quarter as you’re transitioning into the language.

A helpful note from the School of Engineering:

“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 website.”

Assignments

There are ten total assignments this quarter - one at the start of the quarter to help you get your computer set up to write C++ programs, then nine programming assignments. Assignments are due on Fridays at 10:30AM Pacific time. Check out our page on assignments for more details.

Working in Pairs

A few of the assignments in this course must be completed on an individual basis, but the majority allow you to optionally work in a pair with a partner. Each assignment will specify if it is to be done individually or allows working in pairs. Note that you are not required to work with a partner on assignments that allow it, but you are encouraged to do so. Working in pairs can improve your learning by giving you someone to talk to when you are stuck, or by letting you see a different way of approaching the same problem. You can also change partners between assignments. In other words, you don’t have to keep the same partner for every assignment that allows pairs (and you can even choose to do some in pairs and other individually).

If you choose to work with a partner, you must pair with another student who is currently taking the course and is in your discussion section. If you have a friend you want to work with, request the same section or request a section swap if necessary. Students auditing or sitting in on the course may not work in a pair with a student who is taking the course. No one who is not currently enrolled in the course may be part of any pair.

If you submit an assignment as a pair, each of you are expected to make a significant contribution toward solving that assignment. You should not claim to be part of a pair submission if you did not contribute significantly to the submission.

If you submit an assignment as a pair, you should make one submission and make sure that the names of both members of the pair are listed in the comments of the solution. Both members of a pair will receive the same grade and do their interactive grading session together.

It goes without saying that regardless of pairs, every student is still responsible for learning all course material. All exams are completed individually. More details about working in pairs will be discussed in class and additional information will be posted on the class web site. Please make sure that you follow its guidelines.

Late Policy

Each of the assignments is due at 10:30AM, Pacific time, on their specified due dates. If you submit by this time, we’ll award you a small “on time” bonus that will slightly increase your overall raw score at the end of the quarter.

There is a 24-hour grace period after this deadline during which you can submit the assignment for full credit, though we won’t award the “on time” bonus. You can think of this 24-hour grace period as a way of automatically granting yourself an extension on any assignment in which you need it. After this 24-hour grace period has expired, no late submissions will be accepted.

If you have a medical or family emergency and will need an extension beyond 24 hours, please contact the head TA Neel (neelk@stanford.edu), no more than 24 hours before the normal assignment deadline. Only Neel can approve extensions. In particular, please do not ask your section leader for an extension, since they don't have the authority to grant you one.

Access and Accommodations

Stanford is committed to providing equal educational opportunities for disabled students. Disabled students are a valued and essential part of the Stanford community. We welcome you to our class.

If you experience disability, please register with the Office of Accessible Education (OAE). Professional staff will evaluate your needs, support appropriate and reasonable accommodations, and prepare an Academic Accommodation Letter for faculty. To get started, or to re-initiate services, please visit oae.stanford.edu.

If you already have an Academic Accommodation Letter, we invite you to share your letter with us. Academic Accommodation Letters should be shared at the earliest possible opportunity so we may partner with you and OAE to identify any barriers to access and inclusion that might be encountered in your experience of this course. Please send any letters to Neel (neelk@stanford.edu).

Honor Code Policy

Please see our Honor Code page for more information.

Exams

There will be two exams in CS106B, one midterm exam and a final exam. Both exams are take-home exams.

  • The midterm exam goes out on Friday, February 4 at 10:30AM Pacific time and comes due on Sunday, February 6 at 10:30AM Pacific time. This gives you 48 hours to complete the exam.
  • The final exam goes out on Friday, March 11 at 10:30AM Pacific time and comes due on Monday, March 14 at 10:30AM Pacific time. This gives you 72 hours to complete the exam.

Unlike the problem sets, the take-home exams are strictly individual work. Even course staff assistance will be limited to clarifying questions of the kind that might be allowed on a traditional in-person exam.

Withdraw / Incomplete Policy

If a serious emergency arises and you cannot complete the work in this course, you may contact Keith – not the TA and not your section leader – to request an incomplete. We reserve incompletes for emergencies, so we do not grant incomplete grades for poor performance on the assignments or exams, nor do we offer incompletes for busy work schedules. Withdrawing is the appropriate option in those circumstances.

In order to be eligible for an Incomplete, University policy says you must have completed a “substantial” part of the course work in “satisfactory” fashion. This means that incompletes are appropriate for serious medical or family emergencies that occur late in the quarter, which prevent you from completing the course despite having done well up to that point.

Grading

Overall, your grade for this course will be determined as

  • 40% Programming Assignments
  • 25% Midterm Exam
  • 30% Final Exam
  • 5% Section Participation

We assign letter grades as follows. We first determine a grading curve over raw scores to assign initial grades. We never assign grades that are lower than the decile of your raw score; for example, a 90% will never map to anything lower than an A-. Assuming that both your assignment score and your composite exam score represent passing work, you will receive the letter grade assigned by the grading curve. Otherwise, you will receive a non-passing grade. (The numbers denoting “passing work” are set at the discretion of the instructor. We will likely use 60% as a cutoff for passing work for programming assignments and 50% as a cutoff for passing work for exams, subject to change.) Your final grade will be determined solely as mentioned above. We do not offer any make-up work.