CS106B: Programming Abstractions
Winter 2016
Monday, Wednesday, Friday 11:30am to 12:20pm in Dinklespiel Auditorium


Course Overview
icon Piazza
icon QT Creator
icon Stanford C++ Lib
Past Quarters
Blank Project
Help Hours
Spotify Playlist



Tuesday, Feb 9th

Monday, March 14th


Lecturer: Chris Piech
Gates 193
Mon 1:30-2:30pm, Wed 2:30-4:00pm

Head TA: Megan Faulk
Gates B02
Tue, Th 9:00-10:30am


Thank you

Tomorrow, as we push your knowledge into new frontiers, we will remember that something better awaits each and every one of us as long as we have the courage to keep going.

We will remember that we are not as divided as our education system would suggest; that you are one class; and together, you will be part of the next chapter in the computer science story :). It was fun CS106B. See you all around.

Symmetry Labs

Cheers symmetry labs for a one of a kind CS106B lecture. If you are interested in learning more or getting in contact with Kyle and Alex send me a message and I can put you in touch. The light code we wrote in class can be found here.

Final Info

The final is coming up (it is next Monday). We put together a handout on what to expect. It has logistics, topics and practice exams. We will keep updating it. Some more material will be posted before Sunday morning.


Assignment 7, Trailblazer goes out today. You will implement a series of search algorithms

Chris Out of Office

Chris is travelling with to a research conference in Tennessee where Mehran and I are presenting some findings. Megan is going to teach class on Friday and I will move my Wednesday office hours (March 2nd) to next Friday for extra final review.

Search Handout

I put together a demo of all the search algorithms (to be updated as we learn more). Check it out

Class location change

Our class location for tomorrow (Monday, Feb 29th) has been changed to Cubberley Auditorium. See you there at 11:30am. The class change is for one day, and one day only.


Assignment 6, Huffman goes out tomorrow. You will implement a compression algorithm that uses binary trees and priority queues

Evolvoing Art

When we talked about Priority Queues in class we chatted about how they are used for evolutionary algorithms and I showed you a demo of an evolving mona lisa. You can access the demo here.


Assignment 5, PQueue went out today. You will implement three different backends for this cool collection

President's Day

Today is presidents day. There is no class, no office hours but there will be LaIR tonight.

Binky Pointer Fun

Here is a nice little claymation video made by Stanford Lecturer Nick Parlante that helped me understand pointers back in the day. It explains pointers on non objects.

In class all of the pointers we have seen have been pointers to classes or structs like LinkedList (not primatives like ints). To dereference a class or struct we use the -> operator. To dereference a primative use the * operator. The primitive dereferencing operator should not to be confused with variables that are pointers which you declare as: typename *.

Midterm Info

The midterm is coming up (it is next Tuesday). We put together a handout on what to expect. It has midterm logistics, topics and review material. We will keep updating it. Most material will be posted by this Saturday and everything will be up by Sunday.


Assignment 4, Boggle went out today. In this classic assigment you will use recursive backtracking to program the game of Boggle and an AI engine that can beat it.

Alpha GO

Researchers at Deep Mind (part of Google) recently hit a big Computer Science milestone. They developed a program that can play the game of GO. It was claimed that GO was the last discrete "board game" that computers were unable to play. The fact that a computer can beat a profession is a huge milestone, and the way in which the solver works reinforces the idea that deep neural networks can be truly powerful at making complex decisions.

We talked briefly about how it works on class Friday, Jan 29th.

Meta Academy Assignment Out

Assignment 3, Meta Academy went out yesterday. You will build a platform to help users learn recursion. In order to build the Meta Academy you will solve a series of recursion problems yourself.

Introducing CLaIR (Conceptual LaIR) Hours

What: A place to get conceptual help, in contrast to debugging help that typically happens in the LaIR. Assignment code and debugging should stay in the LaIR, but CLaIR helpers can go over section and lecture code, offer high-level assignment help, and review class concepts.
When: Sunday 8PM-10PM (except 2/15), Tuesday 8PM-10PM, Thursday 8PM-10PM.
Where: Old Union 2nd Floor.
How: Speak to the section leader by the LaIR signup computer, who will direct you to the appropriate help area (CLaIR or LaIR).

Martin Luther King, Jr.

Reminder that tomorrow, Jan 18th, is MLK day so there will be no office hours or class. Here is a video of the last public speech MLK gave. The date was April 3, 1968 and he was assasinated the day after. Civil rights for all people, regardless of their ethnicity, is a cause that is still being faught for around the world.

Of course if you haven't seen the I Have a Dream Speech, that is worth watching.

Using Socrative

Last class we used socrative.com. I thought it was a nice way to get everyone interacting. Our new room name is 106BWIN16. We will use it again next class.

Serafini Assignment Out

Assignment 2, Serafini goes out today in class. You will implement both word ladders and random writters.

Contest Announced

This quarter we are going to hold an optional contest. Prizes will be awarded for problem solving and creativity.

Bananagrams Solution Posted

In class Wednesday I showed a program that I had written that autonomously played the first 21 tiles in a game called Bananagrams. I posted the code and a brief writeup. To the best of my knowledge this is the first Bananagrams AI to exist :). More importantly it is an example of a full length project (akin to your assignments) that I wrote and shows how I broke down the problem and my own style.

CS + Social Good

Interested in how technology can make the world a better place? Take the new CS 106 CS+Social Good Section. Each week, we'll host fun workshops exploring social good applications of computer science. The workshops will be led by engineers from local tech companies and nonprofits. Sign up here by midnight tonight (Monday).

Sign Up for Section

Section sign up are open! To sign up go to the section signup website. Section sign up closes Sunday at 5pm. We are happy to announce that we have 51 section leaders who are leading CS106B sections!

Life Assignment Out

Assignment 1, Life goes out today in class. In this program you will implement Conways Game of Life, an elegant cartoon model of cell life that has inspired an entire field of thinking on complex structures that can arise from simple rules.

First Class

Thanks for coming! That was exciting :). Here are the slides that went with the lecture. Also take a look at the course overview page for general course logistics. Future slide decks and lecture code will be posted in the schedule. Looking forward to Wednesday. Here is a cartoon of the syllabus:

One time office hour change.

Chris' Wednesday office hours for this week have been changed from Wednesday (5th of Jan) to Friday (7th of Jan) from 2:30pm to 3:30pm. This is a one time change. Things go back to normal next week. Come with early question on Life :).

Sign Up for Piazza

This quarter CS106B is using Piazza to facilitate questions. Go to piazza.com/stanford/winter2016/cs106b/home to sign up. You can ask course related questions and see answers to other student questions. For personal questions please feel free to email Megan or Chris.

Class Location

Class starts Monday January 4th at 11:30am in Dinklespiel.


Welcome to CS106B! We are looking forward to a fun quarter.