Week 0 · before week 1
Week 0: setup
Before week 1, take a week or three to make sure you are ready and set up. This path is hard. That is fine, it is supposed to be. But it should be hard because Knuth is hard, not because you are fighting Java syntax or git at the same time. Take the quiz honestly, fill any gaps with the free resources below, and do the setup checklist.
Setup checklist
Sign up to tick these off; some tick themselves.
-
Create a GitHub account and sign in with itAutomatic2 steps
Your work is verified from a public GitHub repo.
Create a free account at github.com.
Sign in here with GitHub, or link it in Settings.
-
Pick your start date and paceAutomatic3 steps
Every week is dated from your start.
Pick a start date; a Monday works best.
Pick a pace: about 8 to 12 hours a week at full pace.
Plan around holidays; a realistic start beats a heroic one.
-
Install a JDK and a C compiler5 steps
jlox is Java, clox is C. Both toolchains are free.
Install a JDK: Eclipse Temurin 21 (LTS) from adoptium.net.
macOS: run xcode-select --install.
Linux: sudo apt install build-essential.
Windows: install WSL, then build-essential inside Ubuntu.
Check: java -version shows 21+ and cc --version prints a version.
Adoptium Temurin JDKInstall WSL (Microsoft)MSYS2Xcode resources (Apple)
-
Create your public lox repoAutomatic3 steps
One repo holds both interpreters; the book's tests run on it.
Use the starter template: name it lox, keep it public.
Clone it, or open it in a Codespace (Java, C and Dart ready).
Push a commit, then connect the repo on the Verify page.
Use the starter templateWhat is in the starterCreate an empty repositoryVerify setup
-
Add the cracked.guide workflow and .cracked.jsonAutomatic3 steps
The workflow runs the book's tests on every push.
From the starter? It is already there: skip to step 3. Otherwise copy it from the Verify page into .github/workflows/.
Add .cracked.json from the Verify page at the repo root.
Commit, push, and check the Actions tab shows a run.
-
Set your LeetCode usernameAutomatic3 steps
Two NeetCode problems a week, checked on your public profile.
Create a free LeetCode account.
Enter your LeetCode username on the Verify page.
7 problems are Premium-only: solve those free on neetcode.io.
-
Get the books2 steps
Crafting Interpreters is free online; TAOCP waits until week 29.
Bookmark craftinginterpreters.com.
Plan how you'll get TAOCP Vol 1: library, used or new.
-
Get the first game on the Play track2 steps
TIS-100 starts in week 1; buy the rest as you reach them.
Buy TIS-100 on Steam or GOG ($6.99).
Open the manual PDF that comes with it. Reading it is part of the game.
-
Put the path in your calendarAutomatic3 steps
A dated plan works when you see it.
Subscribe to your calendar feed from the schedule page.
Or import the path into Things.
Block the same study slot each week.
-
Join your cohort and say hi3 steps
People who study together finish.
Open Introductions in the discussions.
Post a hello with your start date.
Find your cohort's thread and agree to check in.
Tools
OptionalDoesn't count toward your weeks or streakA side quest, not a requirement. The path assumes you can get around a terminal, an editor and git; if any of these feel shaky, an evening or two here pays for itself all the way through clox.
The Missing Semester of Your CS Education (MIT)Free lectures with notes, videos and exercises, about an hour each. Pick the ones you need; skip the rest.
-
The shell
Every week you build, run tests and push from a terminal. Moving around, reading a man page and piping one command into another should feel automatic.
Lecture: Course Overview + Introduction to the Shell
Try it
pwd && ls -la man ls grep -rn "TODO" jlox/ | wc -l -
tmux and the command-line environment
Editor in one pane, the test runner in another, and a session that survives closing the terminal or dropping an SSH connection.
Lecture: Command-line Environment
Try it
tmux new -s lox Ctrl-b % split side by side; Ctrl-b " split top and bottom Ctrl-b d detach; tmux attach -t lox come back -
Your editor (Vim, or Vim keys in yours)
You will type two interpreters by hand. Any editor works; knowing one well, with search, multiple files and jump-to-definition, saves hours.
Lecture: Development Environment and Tools
Try it
vimtutor VS Code, Zed and JetBrains IDEs all have a Vim mode if you want the keys without leaving them -
Git
Your chapters are verified from what you push, and small commits make it easy to find the change that broke a test.
Lecture: Version Control and Git
Try it
git status git add -p git log --oneline --graph -n 20 git bisect start find the commit that broke a test -
Debugging
clox is C: a debugger and the sanitizers turn a mysterious crash three chapters later into a line number now. The clox weeks have Tool tips for each when you need them.
Lecture: Debugging and Profiling
Try it
macOS: lldb --version (comes with the Xcode Command Line Tools: xcode-select --install) Linux: gdb --version (sudo apt install gdb valgrind on Debian and Ubuntu)
Warm-up quiz
Answer in your head, then open the answer. Nothing is recorded.
What does this print? x = 0; for i in 1..4 (inclusive) { x = x + i * i }; print x
Show answer
30 (1 + 4 + 9 + 16).
Write a recursive function that returns the n-th Fibonacci number. Why is the naive version slow for n = 50?
Show answer
fib(n) = n if n < 2, else fib(n - 1) + fib(n - 2). It is slow because it recomputes the same values exponentially many times; memoize or loop instead.
In Java, what is the difference between an interface and an abstract class, and what does @Override mean?
Show answer
An interface declares methods a class promises to implement (a class can implement many); an abstract class can hold state and partial implementations (a class extends only one). @Override marks a method that replaces one from a superclass or interface, and the compiler checks it.
In C, given int a[3] = {1, 2, 3}; int p = a; what is (p + 2), and what does p++ do?
Show answer
*(p + 2) is 3. p++ moves p to point at the next int, a[1].
What is wrong with this C function? char *make() { char buf[16]; strcpy(buf, "hi"); return buf; }
Show answer
It returns a pointer to a local array that no longer exists once the function returns. Allocate with malloc (and have the caller free it) or have the caller pass in a buffer.
Prove by induction that 1 + 2 + ... + n = n(n + 1)/2.
Show answer
Base case n = 1: 1 = 1. Step: assume it holds for n; then 1 + ... + n + (n + 1) = n(n + 1)/2 + (n + 1) = (n + 1)(n + 2)/2, which is the formula for n + 1.
What is log2(1024)? Roughly how many times can you halve 1,000,000 before reaching 1? Is log2(n^2) the same as 2 log2(n)?
Show answer
10; about 20 times (2^20 is about a million); yes.
What is 1 + 2 + 4 + ... + 2^k? And what is the sum 1/2 + 1/4 + 1/8 + ... forever?
Show answer
2^(k+1) - 1, and 1.
Put these in order of growth: n log n, n^2, log n, 2^n, n. Why is binary search O(log n)?
Show answer
log n < n < n log n < n^2 < 2^n. Binary search halves the remaining range each step, so it takes about log2(n) steps.
You changed two files. What commands put those changes on GitHub?
Show answer
git add (the files), git commit -m "message", git push. Bonus: git status shows what changed.