CS107 Lab


Ben Yan (bbyan@stanford.edu)

🌺 Spring 2026 🌲 Stanford University πŸ₯¦ Welcome to Enchanted Troccoli Forest!

Hello and welcome! This is my homepage for CS107 lab slides, links to handouts, and general lab resources. If you have any questions, please reach out! So incredibly excited to meet you all and for a beautiful quarter & learning journey in CS107.

My two lab times are listed below, though you're only required to attend one :)

  • Wednesday, 1:30 - 2:50 PM, Encina West Room 202 πŸ›οΈ
  • Thursday, 3:30 - 4:50 PM, Littlefield Room 104 🌳

Schedule

Lab 1

πŸ‘Ύ Bits Don't Byte: Integer Representation & Bitmasks — April 9-10

Slides Lab Handout Check-Off Form Recording (Peter's Lab!)
Recap Notes Lab Syllabus Debugging Guide Emacs Guide

Lab 2

🧢 C Strings: Don't forget the null-terminator! — April 16-17

Slides Lab Handout Check-Off Form Recording
Recap Notes strtok Worksheet strtok Solution Valgrind Guide

Lab 3

πŸ‘‰ Pointer Fun with Spiderman, Arrays, and the Heap — April 23-24

Slides Lab Handout Check-Off Form Recording
Recap Notes GDB Guide Pointer Fun (1999)

Lab 4

🌠 Generics: Hey now, you're a void star! — April 30 - May 1

Slides Lab Handout Check-Off Form Recording
Recap Notes Practice Midterms

Prep

⭐ Midterm Review Session (JJK Perfect Preparation Arc) - May 1

Slides Ben's Practice Problems Recording Extra Videos
Practice Solutions C Playground

Lab 5

🐣 C Multiverse: Assembly and Tracing Machine-Level Code — May 7-8

Slides Lab Handout Check-Off Form Recording
Recap Notes x86-64 Reference

Lab 6

πŸ“š Runtime Stack, Hacking the Stack! (Smash Attack) — May 14-15

Slides Lab Handout Check-Off Form Recording
Recap Notes Stack Worksheet + Solution x86-64 Guide 🌲 Humor

Lab 7

πŸš… Optimization, Ethics, Heap Allocation, Parting Thoughts — June 4-5

Slides Lab Handout Check-Off Form Recording
Lecture Recap 🐞 Allocator Debugging Guide

Prep

πŸ€ Final Review Session (FreeRAM, Beyond Journey's End) — June 7th

Slides Ben's Final Practice Practice Solutions Recording Slides (Extended Play)

Lab Mechanics

Lab is graded on attendance and participation i.e. showing up and filling out an online check-off form as you work, with credit being awarded for a sincere effort as opposed to getting every detail correct. If you have any questions, please feel free to ask me!

For getting help in CS107 generally, please see the course website on the office hours mosaic each week and the EdStem forum. My office hours are typically:

  • Mondays, 2 - 4 PM, CoDa Basement β˜€οΈ
  • Wednesdays (with my own former SL Diego!), 7 - 9 PM, CoDa Basement πŸŒ™

The hours may vary by week, so the calendar has the most up-to-date information :)

Feedback

Please feel free to submit anonymous feedback at this πŸ“₯ form link! I'm always looking for ways to improve as a TA, so this'll help me a lot: thank you so much in advance!

Archived Pages

In case you're looking for the lab webpage for a previous quarter of CS107! :)

β˜ƒοΈ Winter 2025 🌱 Spring 2025 πŸ”οΈ Winter 2026