Phase 0 — Refresh & Toolchain¶
Month 1 · Weeks W1–W4 · ~10–15 hours/week Start: 2026-07-06 · End of Phase: 2026-08-03
Mission¶
You have not written serious C++ in two years. Before you touch a single data structure, before you think about templates or move semantics or std::span, you need to get one thing back: the reflex of writing a small C++ program, compiling it, watching it fail, reading the error, and fixing it — without googling every semicolon.
That is the entire job of Month 1. Nothing more, nothing less. By 2026-08-03 you should be able to sit down cold on your MacBook, open a blank .cpp file, and produce a compiling, debuggable, warning-clean 200-line program in one sitting. If you can’t do that on August 3, do not move to Phase 1. Repeat the drills.
This phase is deliberately unglamorous. It’s not “learn modern C++.” It’s “make the tools disappear so modern C++ can happen.” Every phase after this assumes your fingers, your compiler flags, and your debugger workflow are automatic. Fix them here, once, or they will haunt you for twelve months.
What most people get wrong about returning to C++¶
Callout — read this twice.
The returning developer’s biggest failure mode is not forgotten syntax. It is overconfidence about how much they remember. You will read a
std::unique_ptrexample, think “yes, ownership, got it,” and skip the drill. Three weeks later you will write a rawnewinside a constructor and leak memory in a class you designed yourself.The second failure mode is AI dependence. You spent two years letting agents write code for you. Your fingers no longer know where the semicolons go. If you let Copilot autocomplete every line in M1, you will finish M1 knowing nothing you didn’t already know. Hard rule for this phase: no AI coding assistance. Not Copilot, not Claude, not Cursor tab. Hand-typed only. Details in
05_common_pitfalls_returning_dev.md.The third: skipping the debugger and relying on
std::coutprintf-debugging like it’s 2005. You will fight this instinct all month. Win.
Exit criteria — Phase 0 done¶
You are done with Phase 0 when every one of these is true. Not “mostly true.” True.
brew,llvm@21(or newer),cmake,ninja,gitinstalled;clang++ --versionreports the Homebrew LLVM version, not Apple Clang.~/.zshrchas the correctPATHexport and you understand what it does.You can compile a C++20 file with
-std=c++20 -Wall -Wextra -Wpedantic -Werror -O2 -gand explain each flag from memory.VSCode is configured with
clangd(not the MS C/C++ extension) and CodeLLDB. Autocomplete, go-to-definition, and inline diagnostics all work in a fresh CMake project.You can set a breakpoint in
lldb(or the VSCode UI), step over/into/out, inspect astd::vectorand a raw pointer, and print a backtrace — without notes.You’ve completed all 30 drills in
03_syntax_refresh_drills.md. Every one compiles clean with-Werror.P0.1 (Word Counter) matches Unix
wcbyte-for-byte on 5 test files.P0.2 (JSON pretty-printer) produces byte-identical output to
python -m json.toolon 3 flat JSON inputs.P0.3 (Log Tail Filter) runs against a growing log file, filters by regex, exits cleanly on Ctrl-C.
You have read
05_common_pitfalls_returning_dev.mdtwice and can name at least five of its pitfalls without looking.
If any box is unchecked on 2026-08-03, spend the first week of August closing it before starting Phase 1.
Weekly breakdown¶
Each week is roughly 12 hours of focused work: 5 evenings at ~2 hours plus a longer Saturday block. Adjust to your calendar, but treat total hours as a floor, not a target.
W1 (2026-07-06 → 2026-07-12) — Toolchain and first fires¶
The week where you install nothing you don’t understand and compile everything with warnings on.
Day |
Target |
Deliverable |
|---|---|---|
Mon–Tue |
Work through |
|
Wed |
Work through |
Fresh CMake project builds & debugs |
Thu–Fri |
Drills 1–8 from |
8 |
Sat (long) |
Drills 9–12 + set breakpoint, step through, inspect a |
Debugger workflow feels ordinary |
Sun |
Rest or slack day. Do not push through fatigue. |
— |
W2 (2026-07-13 → 2026-07-19) — Muscle memory + first project¶
Drills continue. First real deliverable ships this week.
Day |
Target |
Deliverable |
|---|---|---|
Mon–Tue |
Drills 13–20 (structured bindings, lambdas, |
8 more compiling drills |
Wed–Thu |
Drills 21–24 (rule-of-zero, rule-of-five, |
4 drills; ownership begins to click |
Fri |
Start P0.1 — CLI Word Counter. Design pass; skeleton compiles. |
|
Sat (long) |
Finish P0.1. Match Unix |
P0.1 acceptance passes |
Sun |
Write a short retro: what surprised you? Log it. |
1-page notes file |
W3 (2026-07-20 → 2026-07-26) — Parsing and streams¶
Move from primitive I/O to structured parsing. Second project ships.
Day |
Target |
Deliverable |
|---|---|---|
Mon–Tue |
Drills 25–28 ( |
4 drills |
Wed |
Start P0.2 — JSON pretty-printer. Restrict to flat objects/arrays. |
Tokenizer skeleton |
Thu–Fri |
Complete P0.2. Byte-identical output vs |
P0.2 acceptance passes |
Sat (long) |
Debug session: intentionally break P0.2, use |
Debugger fluency confirmed |
Sun |
Rest. |
— |
W4 (2026-07-27 → 2026-08-03) — Systems edges and closeout¶
You touch signals, file descriptors, and the standard regex engine. Then you audit.
Day |
Target |
Deliverable |
|---|---|---|
Mon |
Drills 29–30 (signal handling with |
2 drills |
Tue–Wed |
Start P0.3 — Log Tail Filter. |
Follows a growing file |
Thu–Fri |
Finish P0.3. Clean Ctrl-C exit. No leaked file descriptors (verify with |
P0.3 acceptance passes |
Sat (long) |
Phase 0 audit: walk the exit criteria checklist. Fix any red boxes. |
All boxes checked |
Sun |
Re-read |
Retro committed |
Files in this folder¶
Work through them in order. Do not skim 05_common_pitfalls_returning_dev.md — it’s short on purpose.
01_toolchain_setup.md— Apple Silicon toolchain, brew LLVM vs Apple Clang,~/.zshrc, firsthello.cpp, every compiler flag explained.02_editor_and_debugger.md— VSCode + clangd + CodeLLDB (or CLion),.clangdconfig,compile_commands.json, debugger workflow.03_syntax_refresh_drills.md— 30 targeted drills, 4 weekly batches, each with acceptance criterion.04_first_projects.md— P0.1 Word Counter, P0.2 JSON pretty-printer, P0.3 Log Tail Filter.05_common_pitfalls_returning_dev.md— The seven things you will get wrong. Read twice.
How to fail Phase 0¶
Install five extensions on day one, tune nothing, and never touch the debugger.
Skip drills because “I remember this.”
Ship P0.1 without matching
wc— “close enough” is not the acceptance criterion.Let Copilot autocomplete anything, ever, this month.
Reach for
printfwhen a breakpoint would answer the question in five seconds.
If you catch yourself doing any of the above, stop, close the editor, and re-read the callout above.
How to succeed¶
Show up five evenings a week. Compile everything with -Werror. Read the compiler’s messages instead of pattern-matching them. When something surprises you, write down what surprised you before you fix it — that log is worth more than the fix. And when you finish a file, close the laptop; do not burn out in Month 1.
Return to Master README · Next: 01_toolchain_setup.md