CDS 210, one lecture at a time

One short visual explanation and one small exercise for each lecture of CDS 210, Fall 2026, plus the tools for projects and exams.

You are in week 5 of 15. Today is lecture 12. Next deadlines: Project 1, due Friday, October 2. Midterm 1, Friday, October 9. A strong finish can outweigh a rough start.

How to use this page

Each lecture below has two main items. Watch is a short visual explanation, 15 minutes or less. Do is a small exercise that tells you right away if your code works. Together they take about half an hour. Go deeper items are optional.

Do the course pre-work before each lecture, because it counts for your grade. Use this page after the lecture, or any time a topic did not make sense.

Why an exercise every time? On the exams, you write Rust by hand with no computer. Videos build understanding, but only writing code builds that skill.

The next ten days: Project 1 and Midterm 1

  1. Now to Friday, October 2: finish Project 1

    Run the tests often. cargo test --bin game runs all of them. The project commands show how to run only the tests for one function.

    Commit and push each time something works. Your code review looks at your commit history.

    If the ideas behind the strategies feel fuzzy, two short videos help. Big O Notation by HackerRank (9 min) shows why some programs slow down much faster than others as the input grows. Binary Search Animated by Dreams of Code (7 min) counts the steps that a halving search needs, compared with checking one number at a time.

    That second video asks “is it this one?” at every step, so follow the handout's own rules for each strategy. Work out your writeup answers from your own plot first. If a video helps you, cite it in your README, as the course requires.

    If you are stuck, go to office hours before Friday. The times are in Where to get help. Work that is up to 48 hours late can still earn up to 80% of the credit.

  2. Saturday and Sunday: catch up on lectures 6 to 13

    Do the Watch and Do items for each lecture in weeks 3 to 5. If time is short, start with lectures 7, 8, 11, 12, and 13. The midterm asks you to write that kind of code by hand.

  3. Monday to Wednesday: prepare for your Project 1 code review

    Your code review is in your discussion section this week: Tuesday for B sections, Wednesday for A sections. Open each function that you wrote. Say out loud what it does, why you wrote it that way, and one other way to write it. Get ready for a code review lists the kinds of questions.

    You must attend. If you miss your code review, the whole project scores zero.

  4. Monday to Thursday: practice writing code on paper

    Redo the Discussion 4 problems without notes. Then do the practice problems below. Write each answer on paper first. Then type it into the Rust Playground to test it.

    The course's Activity 9 is Big-O practice in the format of the exam, with solutions at the end. For more, these problems match lectures 6 to 13. Exercism and LeetCode need a free account to run your code. Without an account, write the function on paper, and then test it in the Rust Playground with a few assert_eq! lines.

    • grains (Exercism): lecture 6, u64 and powers of 2.
    • raindrops (Exercism): lecture 8, if and %.
    • Richest Customer Wealth (LeetCode 1672): lecture 8, nested loops over a Vec<Vec<i32>>.
    • collatz-conjecture (Exercism): lectures 8 and 13, a loop that returns an Option. Then write it again with recursion, for lecture 10.
    • nth-prime (Exercism): lecture 9. It counts from 0, but the lecture counts from 1.
    • difference-of-squares (Exercism): lecture 9, a loop compared with a formula.
    • Fibonacci Number (LeetCode 509): lecture 10, recursion.
    • health-statistics (Exercism): lecture 11, a struct with methods.
    • high-scores (Exercism): lectures 11 and 13, a struct around a Vec, an Option, and .sort().
    • yacht (Exercism, medium): lecture 12, an enum and match.
  5. Wednesday, October 7: bring questions to the review lecture

    Lecture 15 reviews everything before the midterm. Write down the topics that still feel shaky, and ask about them.

  6. Friday, October 9: Midterm 1

    The exam is in class. You cannot use notes, a calculator, scrap paper, or any device, and you cannot wear a smart watch or smart glasses.

Set up once

Most Do items use one of these four tools.

If you like video better than reading, Let's Get Rusty made one video for each chapter of the Rust Book. The videos are from 2021, but chapters 1 to 16 still match the book.

Every week

The weeks follow the course schedule. The page opens the current week for you.

Week 1, Sep 2 to 4: Tools and your first program

Discussion: No discussion.

L1. Welcome: what this course is, and why RustWed Sep 2

Watch
Rust in 100 Seconds by Fireship, 3 min. A fast, animated tour of what Rust is and why people choose it. It mentions ownership and borrowing, which come in October, so do not worry about those parts yet.
Go deeper
Rust for the impatient by No Boilerplate, 11 min. A very fast slide tour of Rust syntax. Watch it now for the big picture, and again before Midterm 1 as a review.

L2. Hello shell: talking to your computerFri Sep 4

Watch
Linux Directories Explained in 100 Seconds by Fireship, 3 min. An animated folder tree from the root / down to your home folder ~, with cd, ls, and which beside it. On a Mac, your home folder is /Users/ plus your name. In Git Bash, the C: drive shows up as /c.
Do
Command Challenge: do the first nine challenges. Each answer runs in a real bash shell, and the site tells you at once if it is right.
Go deeper
Absolute and Relative Paths by Udacity, 2 min. A hand-drawn folder tree that shows how to write a path with ., .., and ~. Julia Evans's comic unix permissions decodes an ls -l line. If you liked bashcrawl, try Terminus, a similar game from MIT.

Week 2, Sep 7 to 11: Tools and your first program

Due: Project 1 released Friday. Discussion: Install session. Monday, September 7: Labor Day, no class.

L3. Hello Rust: your first program, and why it is fastWed Sep 9

Watch
Interpreters and Compilers by Bits and Bytes, a 1983 TV show, 4 min. A short cartoon. An interpreter starts right away but runs slowly. A compiler needs time first, but then the program runs fast. That is why Rust beats Python at adding up ten million numbers.
Do
The quizzes in Brown 1.2 Hello, World and 1.3 Hello, Cargo. Then install Rustlings (see Set up once) and pass intro1 and intro2. If the terminal says "command not found", that is the PATH problem from this lecture.
Go deeper
An Introduction to Coding In Rust for Pythonistas by ArjanCodes, 21 min. Turns a Python class into Rust, side by side. The second half goes past your lectures, into traits.

L4. Hello git: save points for your codeFri Sep 11

Watch
How Git Works: Explained in 4 Minutes by ByteByteGo, 4 min. Animated lanes for your files, the staging area, your local repository, and GitHub, with the command that moves code between each pair. This is the lecture's “one repo, two copies, and a staging area”. The last minute uses git switch, which does the same job as git checkout.
Do
Drill the everyday loop in a practice folder, for example your hello_rust project. Change one line. Then run git status, git diff, git add, git commit -m, and git log, in that order. Read what each command prints. Then change a line again, and undo the change with git restore.
Go deeper
Julia Evans's comic the staging area draws the path from a changed file to a commit.

Week 3, Sep 14 to 18: Building programs

Due: Project 1 checkpoint 1, Friday. Discussion: Git basics.

L5. Start to finish: build it, break it, fix itMon Sep 14

Watch
Git Will Finally Make Sense After This by LearnThatStack, 13 min. Fully animated, close to the 3Blue1Brown style. A commit is a snapshot, a branch is a sticky note that points at a commit, and git revert undoes a commit by adding a new one. Skip the parts on reset --hard, rebase, and reflog, because the course does not use them.
Do
Repeat the lecture's compiler error hunt at home. Paste the program into the Rust Playground, and run it. Break it in one small way, run it again, and read the error. Undo the change, and break it another way. Aim for eight different errors.
Go deeper
How to create a pull request in 4 min by GitHub, 4 min. The official walkthrough: make a branch, commit, push, open a pull request, and merge it.

L6. Variables: types and their propertiesWed Sep 16

Watch
Twos complement: Negative numbers in binary by Ben Eater, 14 min. Worked out by hand, on paper. It shows why computers store negative numbers in two's complement, which is the lecture's “Why Two's Complement?” slide.
Do
Rustlings 01_variables (variables1 to variables6) and 04_primitive_types (primitive_types1 and primitive_types2). Then take the quiz in Brown 3.2 Data Types, and read its box on integer overflow.
Go deeper
Floating Point Visually Explained by Fabien Sanglard, a short article with diagrams of how an f32 uses its 32 bits. Then try Float Exposed: type a number and watch its bits change.

L7. Functions: parameters, returns, and expressionsFri Sep 18

Watch
Rust for the impatient, from 2:50 to 4:00 by No Boilerplate, 1 min. A fast slide show of the semicolon rule. A block is an expression, and a semicolon turns it into a statement. Pause often. One slide says “void”, where Rust says the unit type ().
Do
Rustlings 02_functions (functions1 to functions5). functions5 is the extra-semicolon mistake. Then take the quiz in Brown 3.3 Functions.
Go deeper
Common Programming Concepts in Rust, from 7:45 to 10:05 by Let's Get Rusty, 2 min. A slower walk through functions. The parts before and after it review lectures 6 and 8.

Week 4, Sep 21 to 25: Judging programs

Due: Project 1 checkpoint 2, Friday. Discussion: Leetcode practice.

L8. Control flow: branching and loopingMon Sep 21

Watch
Why You Shouldn't Nest Your Code by CodeAesthetic, 8 min. Animated. It flattens nested if statements by returning early, which is the same rewrite as the lecture's “Same checks, returning early”. The code is not Rust, but the idea is the same. At 2:20, the comparison must be <=, not <, as the creator corrected.
Do
Rustlings 03_if (if1 to if3). Then take the quiz in Brown 3.5 Control Flow, which asks about if as an expression, labeled loops, and for loops over arrays.

L9. Complexity: how to compare two programsWed Sep 23

Watch
Big O Notation by HackerRank, 9 min. Hand-drawn, animated examples of linear, quadratic, and other growth rates, by the author of Cracking the Coding Interview. It does not cover debug versus release mode.
Do
Redo the course's Activity 9 on paper: the time and space complexity of five short Rust functions. Then compare your answers with its Solutions section.
Go deeper
What Is Big O Notation? by Reducible, 18 min. Made with the animation library of 3Blue1Brown. It is the closest thing to 3Blue1Brown for this topic.

L10. Sorting: complexity and recursionFri Sep 25

Watch
Merge sort in 3 minutes by Michael Sambol, 3 min. The same picture as the lecture: split the pile into levels, then merge back up, which gives O(n log n).
Do
VisuAlgo sorting: enter the lecture's cards 60,30,80,10,50,20,70,40, and step through selection sort, insertion sort, and merge sort. Then take the easy sorting quiz. It needs no login.
Go deeper
Call Stacks by CS50, 8 min. Shows the stack frames of a recursive function, the same idea as the lecture's trace of sum_to(3). The examples are in C. If you read the Rust documentation, it names the algorithm behind .sort() driftsort, a newer mix of merge sort and quicksort. On the exam, give the lecture's answer.

Week 5, Sep 28 to Oct 2: Structuring data

Due: Project 1, Friday, October 2. Discussion: Project 1 work session.

L11. Structs: bundling data with methodsMon Sep 28

Watch
Methods for Structs by Francesco Ciulla, 11 min. Uses the Rust Book's Rectangle example: methods with &self at 1:20, and constructors called with :: at 7:37. It is a person talking over code, because no good animated video on structs exists.
Do
Rustlings 07_structs (structs1 to structs3) and 05_vecs (vecs1 and vecs2). structs3 turns plain functions into &mut self methods, with a new constructor. If you read Brown chapter 5, skip the part called Methods and Ownership. It needs the ownership lectures from October.
Go deeper
Rust for Python Programmers, chapter 5 compares Rust structs with Python classes, and Vec with Python lists.

L12. Enums: variants and matchWed Sep 30

Watch
Rust Data Modelling Without Classes, from 0:00 to 3:05 by No Boilerplate, 3 min. Shows why an enum beats a struct full of true-or-false flags, and how match makes the compiler catch a missing case. Stop at the “Part 1” title card.
Do
Rustlings 08_enums (enums1 to enums3). enums3 uses match to call &mut self methods, so it also reviews lecture 11. Then take the quiz in Brown 6.2 match.
Go deeper
Enums and Pattern Matching in Rust by Let's Get Rusty, 13 min. A slower walk through the same chapter: enums at 0:41, Option at 4:16, and match at 6:56.

L13. Errors: Result, Option, and reading a fileFri Oct 2

Watch
Debugging Rust with Recoverable Errors: Result, Match, ? by Francesco Ciulla, 14 min. Covers match on a Result at 2:04, unwrap and expect at 5:13, and the ? operator at 8:36. A person talking over code.
Do
Rustlings 12_options (options1) and 13_error_handling (errors1 to errors3). Then read Brown 9.2. It ends with fs::read_to_string, and its quiz asks what ? does.
Go deeper
Option - Rust Building Blocks by Max Taylor, 5 min. A short animation of a value that can be missing, compared with how Python and TypeScript handle missing values. Reading Files in Rust by Francesco Ciulla, 8 min. Reads a file three ways: with no error handling, with match, and line by line.

Week 6, Oct 5 to 9: Review and Midterm 1

Due: Midterm 1, Friday, October 9, in class. Discussion: Project 1 code review. Project 2 is released on Friday.

L14. Read and review code: a real repo, and your ownMon Oct 5

Watch
understand ANY programming project (from an open source maintainer) by bashbunni, 4 min. Practical steps for finding your way around code that someone else wrote. A person talking, with text on screen.
Do
Review your own Project 1 code with Google's checklist What to look for in a code review. Look at the names, the comments, and the complexity in strategies.rs. Then answer the Discussion 4 mock-review questions about your own code, out loud.
Go deeper
How to Read Complex Code? by Felienne Hermans at GOTO 2021, 33 min. A talk based on research, by the author of the book The Programmer's Brain.

L15. Review: everything before Midterm 1Wed Oct 7

Watch
Rust for the impatient by No Boilerplate, 11 min. The fast tour from lecture 1 again, as a syntax review. You now know most of it.
Do
Redo Discussion 4 and Activity 9 on paper, with no notes, and compare your work with their answers. Then do the practice problems in The next ten days.

Week 7, Oct 12 to 16: Memory

Due: Project 2 checkpoint 1, Friday. Discussion: A sections only: extra practice. Monday, October 12: holiday. Tuesday follows the Monday schedule.

L17. The stack: frames, and why it is fastTue Oct 13

Watch
Why Is the Stack So Fast? by Core Dumped, 14 min. Animated. What a stack frame is, and why the stack is fast. It works at the level of C and the operating system, not Rust.
Do
Step through a recursive factorial in C in Python Tutor. Before each click on Next, predict the frames on the stack and the values of n and rest.
Go deeper
Variables Live in the Stack in Brown 4.1 shows the same idea in Rust. Visualizing memory layout of Rust's data types, from 6:57 to 10:16 by Sreekanth, 3 min. Slides of the stack at work.

L19. Pointers: references, dereferencing, and unsafeFri Oct 16

Watch
Pointers, visually explained by Code Words, 11 min. A visual tour of values, references, memory, the stack, and the heap, in no particular language.
Do
The quiz after Dereferencing a Pointer Accesses Its Data in Brown 4.2. Read its memory diagrams for Box and & first.
Go deeper
you will never ask about pointers again after watching this video by Low Level, 8 min. Pointer syntax in C, which prepares you for lecture 20. For unsafe, read Dereferencing a Raw Pointer in Brown 20.1.

Week 8, Oct 19 to 23: Memory and ownership

Due: Project 2 checkpoint 2, Friday. Discussion: Midterm 1 corrections.

L20. Pointer danger: five ways C loses your memoryMon Oct 19

Watch
how can memory safe code STOP HACKERS? by Low Level, 8 min. The memory bugs of C, and how Rust prevents them. A person talking over code. The Do item is the visual part of this lecture.
Do
Each of these links runs a tiny C program in Python Tutor that has one bug: use after free, double free, buffer overflow, and uninitialized pointer. Predict the line that fails. Then click Next until Python Tutor reports the error. It cannot show the fifth bug, a memory leak: the leaked block just disappears from the drawing.
Go deeper
From Missingno to Heartbleed: Buffer Exploits and Buffer Overflows by Tom Scott, 6 min. Real bugs, from a Pokémon glitch to a famous security hole, all caused by reading or writing past the end of a buffer.

L21. Ownership: the three rules, moves, and copiesWed Oct 21

Watch
Visualizing memory layout of Rust's data types, from 26:27 to 29:21 by Sreekanth, 3 min. Diagrams of what let b = a; does in memory, for a Copy type and for a type that moves.
Do
Rustlings 06_move_semantics (move_semantics1 to move_semantics3). In move_semantics2, both vectors must stay usable.
Go deeper
Understanding Ownership in Rust, from 6:53 to 12:23 by Let's Get Rusty, 6 min. The three ownership rules, then move, clone, and copy. Variables Cannot Be Used After Being Moved in Brown 4.1 steps through a move, with a quiz after it.

L22. Owning collections: Vec, String, and capacityFri Oct 23

Watch
The Simple and Elegant Idea behind Efficient Dynamic Arrays by Reducible, 8 min. Made with the same animation library as 3Blue1Brown. It shows how a growing array doubles its capacity, and why a push is still fast on average. Ideas only, no code.
Do
The quizzes in Brown 8.1 Vectors. They ask whether small programs compile, for example one that pushes to a Vec while it loops over it.
Go deeper
Rust Avoids Simultaneous Aliasing and Mutation in Brown 4.2 draws a full Vec that moves to new memory when you push, which leaves an old reference pointing at nothing. Visualizing memory layout of Rust's data types, from 17:22 to 21:09 by Sreekanth, 4 min. Vec, slices, and String, drawn in memory.

Week 9, Oct 26 to 30: Borrowing

Due: Project 2, Friday, October 30. Discussion: To be announced.

L23. Strings: why text is harder than it looksMon Oct 26

Watch
Unicode, in friendly terms by Studying With Alex, 11 min. Characters, code points, and bytes, and why “the first character of a string” is not a simple question. At 7:52 it shows the same ideas in Python.
Do
Rustlings 09_strings (strings1 to strings4). strings4 asks you to label each value as a String or a &str.
Go deeper
Characters, Symbols and the Unicode Miracle by Computerphile, 10 min. Tom Scott tells the story of UTF-8 with great energy. All Rust string types explained, from 0:32 to 8:47 by Let's Get Rusty, 8 min. String versus &str in memory.

L24. Borrowing: using data without owning itWed Oct 28

Watch
Understanding Ownership in Rust, from 12:23 to 18:34 by Let's Get Rusty, 6 min. References and borrowing: & versus &mut, the borrowing rules, and dangling references. A screen recording with a voice-over.
Do
Rustlings 06_move_semantics (move_semantics4 and move_semantics5). In move_semantics4, you fix two overlapping &mut borrows only by reordering lines.
Go deeper
References Change Permissions on Places in Brown 4.2 draws read, write, and own permissions for each line. The RustViz borrowing tutorial from the University of Michigan draws each borrow as a timeline.

L25. Borrow checker: the rules and the errorsFri Oct 30

Watch
Rust Demystified: Simplifying The Toughest Parts by Code to the Moon, 14 min. Small examples of move errors, &mut errors, and lifetime errors, each with its fixes.
Do
Brown 4.3 Fixing Ownership Errors, a chapter that only the Brown edition has. For each of its six case studies, decide if the program is really unsafe, and then pick the fix.
Go deeper
When you meet a borrow checker error, read its page in the error index. These are the common ones: E0382 (use after move), E0499 (two &mut at once), E0502 (& and &mut at once), E0505 (move while borrowed), E0506 (assign while borrowed), E0597 (value dropped while borrowed), and E0106 (missing lifetime). but what is 'a lifetime? by leddoo, 12 min. A way to think about lifetimes. It is more abstract than the other picks.

Week 10, Nov 2 to 6: Tests and Midterm 2

Due: Midterm 2, Friday, November 6, in class. Discussion: Project 2 code review. Project 3 is released on Friday.

L26. Tests: writing them, and what to testMon Nov 2

Watch
Testing in Rust by Let's Get Rusty, 15 min. Walks through the Rust Book's chapter on tests: #[test], assert!, assert_eq!, and #[should_panic]. A person talking over code, because no animated video on Rust tests exists.
Do
Rustlings 17_tests (tests1 to tests3). tests3 adds tests for edge cases, such as a negative width.
Go deeper
Testing in Rust - Part 2 by Let's Get Rusty, 14 min. Shows how running tests by name works, which is what cargo test --bin game cp2::binary did in Project 1. Then try the Luhn algorithm exercise from Comprehensive Rust. Its code has bugs but passes its two tests. Write tests for edge cases until they fail, and then fix the bugs.

L27. Review: everything before Midterm 2Wed Nov 4

Do
Draw memory by hand, because the exam asks you to reason about the stack and the heap without a computer. In Brown 4.1 and Brown 4.2, cover each diagram. Draw the stack and the heap for that line on paper. Then compare your drawing with the diagram.
Go deeper
Visualizing memory layout of Rust's data types, from 6:57 to 29:21 by Sreekanth, 22 min. One pass through the stack, the heap, references, Vec, String, Box, and moves: lectures 17 to 23 in one video.

Week 11, Nov 9 to 13: Abstraction

Due: Project 3 checkpoint 1, Friday. Discussion: To be announced.

Project 3 ideas: how computers play games

These explain the ideas behind a game-playing agent, with no project code. Code tutorials for a tic-tac-toe AI exist. Skip them, because your code review asks you to explain every line that you wrote.

Watch
Minimax: How Computers Play Games by Spanning Tree, 15 min. Animated game trees for tic-tac-toe. It covers minimax, alpha-beta pruning, and evaluation functions, in pseudocode only.
Do
Alpha-beta pruning practice from UC Berkeley makes random game trees. Mark the branches that alpha-beta pruning skips, and it tells you at once if you are right.
Go deeper
Algorithms Explained – minimax and alpha-beta pruning by Sebastian Lague, 11 min. The classic walkthrough of alpha-beta pruning. Iterative Deepening by John Levine, 4 min. Searches to depth 1, then 2, then 3, which helps when a search has a time limit.

L29. Traits: shared behavior across typesMon Nov 9

Watch
Traits in Rust by Let's Get Rusty, 12 min. Defines a trait, implements it for two types, and adds a default method. A person talking over code.
Do
Rustlings 15_traits (traits1 to traits3). Then take the quizzes in Brown 10.2 Traits.
Go deeper
The logger trait exercise from Comprehensive Rust. You write a type that wraps a logger and implements the same trait.

L30. Generics: one function, many typesWed Nov 11

Watch
Rust Powered Polymorphism With Traits by Code to the Moon, 10 min. One function that works for many vehicle types, written three ways. The generic version, with <T: LandCapable>, is the one this lecture teaches. The dyn version goes beyond the lecture.
Do
Rustlings 14_generics (generics1 and generics2). Then the generic min exercise from Comprehensive Rust: write fn min<T: Ord>(l: T, r: T) -> T so that its tests pass.
Go deeper
Generic Types in Rust by Let's Get Rusty, 15 min. The Rust Book's chapter 10.1: generic functions, structs, and enums. The types, traits, and generics section of cheats.rs has diagrams, but it is dense.

L31. Collections: Vec, HashMap, and what they costFri Nov 13

Watch
Hash Tables and Hash Functions by Computer Science Lessons, 14 min. Diagrams of how a key picks a slot, and what happens when two keys want the same slot. This is why a HashMap lookup is O(1) on average.
Do
Two Sum (LeetCode 1). Solve it first with nested loops, which is O(n²). Then solve it with a HashMap, which is O(n). Explain the difference in one sentence.
Go deeper
ArrayList vs LinkedList by Core Dumped, 21 min. Animated. A growable array, like Vec, compared with a linked list, down at the level of memory.

Week 12, Nov 16 to 20: Data structures

Due: Project 3 checkpoint 2, Friday. Discussion: Midterm 2 corrections.

L32. Heaps: building a collection from a VecMon Nov 16

Watch
Data Structures: Heaps by HackerRank, 11 min. A hand-drawn heap. Inserting swaps a value up, and removing swaps a value down. Then it stores the tree in an array, where the parent of index i is at (i - 1) / 2. The second half is Java code. This heap is a data structure, not the memory heap from lecture 18.
Do
VisuAlgo binary heap: switch between the tree view and the array view, and run Insert and ExtractMax. Then take the easy heap quiz.

L33. Linear structures: stacks, queues, ring buffersWed Nov 18

Watch
Circular Queue Implementation - Array by Blue Tree Code, 10 min. Draws the array as a ring, with markers for the front and the rear. The next slot is (rear + 1) % length.
Do
Valid Parentheses (LeetCode 20), with a stack built on a Vec. Then Design Circular Queue (LeetCode 622), a ring buffer on a fixed-size Vec. In its Rust template, change &self to &mut self for each method that changes the queue.
Go deeper
Data Structures: Stacks and Queues by HackerRank, 6 min. The basics of stacks and queues.

L34. Box: recursive types, lists, and treesFri Nov 20

Watch
The Box Smart Pointer in Rust, from 4:43 to 11:53 by Let's Get Rusty, 7 min. Why a list type that contains itself needs infinite space, and how a Box fixes that.
Do
Rustlings box1 in 19_smart_pointers. Newer versions of Rustlings call it smart_pointers1. Put the recursive variant in a Box so that it compiles, and then build an empty list and a list with items. For more practice, Exercism's simple-linked-list builds a list with push, pop, and peek.
Go deeper
Data Structures: Linked Lists by HackerRank, 8 min. Hand-drawn nodes and arrows, and why reaching the middle of a list is slower than in an array. Data Structures: Trees by HackerRank, 10 min. Binary trees, drawn by hand. Enabling Recursive Types with Boxes in Brown 15.1 has diagrams and a quiz.

Week 13, Nov 23 to 27: Shipping code

Discussion: B sections only: extra practice. Wednesday to Friday: Thanksgiving recess. Nothing is due.

L35. Ship your code: modules, crates, and PythonMon Nov 23

Watch
Unboxing Rust Crates, Packages, Modules & Workspaces by Code to the Moon, 3 min. Package, crate, and module in three minutes, and how Cargo.toml adds a dependency. Python Rust Extensions: Massively Speed Up Your Code by NeuralNine, 13 min. Builds a Rust module with PyO3 and maturin, imports it in Python, and times the speed-up. This is the goal that the course set on day one.
Do
Rustlings 10_modules (modules1 to modules3).
Go deeper
Clear explanation of Rust's module system, an article with diagrams that map folders and files to modules. For Python, the official PyO3 getting started guide and the maturin tutorial, and the PyO3 part of Rust for Python Programmers, chapter 14.

Week 14, Nov 30 to Dec 4: Iterators and threads

Due: Project 3, Friday, December 4. Discussion: To be announced.

L36. Iterators: closures, laziness, and filesMon Nov 30

Watch
Iterators in Rust by Let's Get Rusty, 13 min. next(), lazy adapters such as map and filter, and collect. A person talking over code.
Do
Rustlings 18_iterators: iterators2 (map and collect), then iterators5, which replaces for loops with filter, a closure, and count.
Go deeper
read_lines in Rust by Example reads a file line by line with BufReader. Closures in Rust by Let's Get Rusty, 20 min. How closures capture values, and what move does.

L37. Threads: doing two things at onceWed Dec 2

Watch
Threads On Multicore Systems by Core Dumped, 11 min. Animated. Shows how several threads run at the same time on different cores. No Rust code.
Do
Rustlings 20_threads (threads1). Then take the quiz in Brown 16.1 Threads, which traces a move closure.
Go deeper
Concurrency in Rust - Creating Threads by Let's Get Rusty, 11 min. spawn, join, and move closures in Rust. Chapter 1 of Mara Bos's free book Rust Atomics and Locks explains threads with care. Its sections on Arc and mutexes fit lecture 38.

L38. Sharing data: Arc, Mutex, and data racesFri Dec 4

Watch
Why Python Is Removing The GIL by Core Dumped, 14 min. Animated. Python protects shared data with one big lock, and the video shows why and what that lock costs. Rust's Arc and Mutex solve the same problem in a different way.
Do
Rustlings threads2 in 20_threads: wrap the shared counter in Arc<Mutex<...>>, and lock it before you change it. Then arc1 in 19_smart_pointers. Newer versions of Rustlings call it smart_pointers3.
Go deeper
Concurrency in Rust - Sharing State by Let's Get Rusty, 9 min. The Mutex API, and why Arc works where Rc fails. The Weirdest Bug in Programming - Race Conditions by Core Dumped, 18 min. An animated look at the bug that Rust stops at compile time.

Week 15, Dec 7 to 11: Final review

Due: Final exam, Monday, December 14, 12 to 2 pm, CGS 505. Discussion: Project 3 code review.

L39. Review: rapid fire across the termMon Dec 7

Watch
Rust for the impatient by No Boilerplate, 11 min. The fast tour from lecture 1 again. Now you know almost every part of it.
Do
The three Rustlings quizzes. quiz1 covers variables, functions, and if. quiz2 covers strings, Vec, moves, modules, and enums. quiz3 covers generics and traits.
Go deeper
cheats.rs, a one-page visual reference for the whole language.

Toolkit for projects

Read the compiler error first

Every Rust compiler error has the same five parts:

  1. An error code, for example E0596.
  2. A one-line summary of the problem.
  3. The location, as file, line, and column.
  4. Your code, with carets (^^^) under the exact spot.
  5. Often, a suggested fix on a line that starts with help:.

To learn more about an error code, run rustc --explain E0596 in the terminal, or find the code in the Rust error index. Fix the first error first, because one mistake often causes more errors further down. The fix does not always belong on the line that the error names.

Two more commands help before you submit. cargo fmt formats your code in the standard style. cargo clippy points out code that works but can be simpler. Appendix D of the Rust Book explains both.

The commands the course expects you to know

This list comes from lecture 5. The exams can ask about any of them.

pwd
Prints the folder that you are in.
ls, ls -a, ls -l
Lists files. -a also shows hidden files. -l shows details, for example permissions.
cd, cd .., cd ~
Moves into a folder, up one level, or to your home folder.
cat, which
Prints a file. Shows where a program is installed.
mkdir, touch
Makes a folder. Makes an empty file.
cp, mv
Copies. Moves or renames.
rm, rm -rf
Deletes a file. Deletes a folder and everything in it. Before you use rm -rf, read the path twice, because there is no undo.
echo "text" >> file
Adds a line to the end of a file.
nano
Edits a file inside the terminal.
git init, git clone
Starts tracking a folder. Copies a repository from GitHub to your laptop.
git status
Shows what changed and what is staged. Run it before and after every other git command.
git add, git commit -m
Stages a change. Saves the staged changes with a message.
git push, git pull
Sends your commits to GitHub. Gets new commits from GitHub.
git log, git diff
Shows the history. Shows the exact lines that changed.
git restore
Throws away changes that you did not commit.
git revert
Undoes a commit by adding a new commit, so the history stays intact.
git branch, git checkout, git merge
Lists or makes branches. Switches branches. Combines another branch into the current one.
cargo new
Makes a new Rust project.
cargo check
Looks for errors without building. It is the fastest way to see errors.
cargo build, cargo run
Compiles your code. Compiles and runs it.
cargo run --release
Compiles with optimizations and runs. Use it when you measure speed.
cargo test
Runs the tests.
rustc
Compiles one file without Cargo.

Project commands

These come from the Project 1 handout. Later projects use the same pattern.

cargo test --bin game cp2           # all checkpoint 2 tests
cargo test --bin game cp2::binary   # only tests with this text in their names
cargo run --bin game -- --strategy random --min 2 --max 6
cargo run --bin plot                # draws plot.png and prints the table

Each test name tells you the function that it tests and one thing that can go wrong. Read the name of a failing test before you read its code. To see what your own strategy does, play it on a small range, where you can follow every question. The Rust Book explains name filters in Running a Subset of Tests by Name.

When git refuses

Read what git prints. It often includes the exact command that fixes the problem. Run git status to see where you are.

A merge conflict means that two versions changed the same lines, and git will not guess which one you meant. Git puts both versions in the file between <<<<<<<, =======, and >>>>>>> lines. Decide what the combined code must be, and delete all three marker lines. Then run the tests, git add the file, and git commit.

If git says “refusing to merge unrelated histories”, use the exact commands in the Project 1 handout. General guides for syncing a fork leave out the extra step that a template copy needs.

Set up VS Code the way the course asks

Your professor asks you to turn off Copilot's completions, because they do the struggling for you, and the struggle is how you learn. VS Code calls them inline suggestions. Click the Copilot icon at the bottom right of VS Code, and turn them off.

The VS Code instructions show the same steps. The Snooze button turns the suggestions off for only a few minutes.

Keep rust-analyzer on. It underlines errors as you type, and its inlay hints show the type of each variable in gray, for example : i32. If you do not see them, read the inlay hints section of the VS Code guide for Rust.

Use AI the way the course allows

The course lets you use AI to understand concepts, to debug your code, and to get ideas. You must understand every line that you submit, because the code reviews and the exams test that. Your professor's workflow, from lecture 5:

  1. Think on paper. What must the code do? What are the steps?
  2. Write the steps in plain English, as comments, before you write any Rust.
  3. Write the parts that you can.
  4. Ask for help with the specific thing that you are stuck on.
  5. Read the answer until you can write it yourself.

Good questions for an AI: "What does this compiler error mean?" "What is the name of the function that does this?" "Explain this concept in a different way." Tell the AI to answer your questions and not to edit your files.

If you use AI on a project, write in your README what you used and how. For example: "I asked ChatGPT to explain error E0308 in strategies.rs. I wrote the fix myself." Course staff will not help you debug code that AI wrote.

Get ready for a code review

Half of each project grade is a code review. A course staff member goes through your code and your commit history with you. The Discussion 4 practice guide shows three kinds of questions:

The real review also asks about git. Full marks go to answers that are correct and that explain why, without a hint.

To practice, take each function in your project. Say out loud what it does, why you wrote it that way, and one other way to write it. Then say what happens with an edge case (an unusual input at the limits), for example an empty list or the largest possible number.

Where to get help

Safety nets in the syllabus

The course gives you several ways to recover from a rough start:

These safety nets do not cover code reviews. You must attend each one. If you cannot, tell the staff at least two days before.

Coming from Python

Rust side by side with Python

Microsoft's free book Rust for Python Programmers shows each idea in Python first and then in Rust. These chapters match your lectures:

The book is new in 2026, and it calls itself training material. If it disagrees with your lecture notes, follow the lecture notes.

If Python itself feels shaky