Day 084 — Month 3 Review + Tag v0.3.0¶
Month 3 · Week 4 · ⬅ Day 083 · Day 085 ➡ · Journal index
📋 Full structured reviews:
week-4-review.md·month-03-review.md
🎯 Learning Objective¶
Close out Month 3 (Concurrency & Parallelism): recall the whole toolkit closed-book, confirm the crawler capstone is -race-clean and profiled, write the month review, and tag the release v0.3.0.
📚 Topics¶
- Recap of the month: goroutines/channels/select → the
synctoolbox & atomics → concurrency patterns → the crawler project (pool, dedup, context, rate limiting, tests, profiling).
📝 Notes¶
- Re-ran every Month 3 example with
go runand the full exercise suite withgo test -race ./exercises/month-03/...— all green, no races. gofmt -l .clean;go vet ./...clean (context first-param, no lostcancel()/Stop(), no copied locks, no leaked goroutines).- Reimplemented the crawler's owner loop (dedup + outstanding-work counter) and the token bucket from memory — both correct first try.
- Wrote the week-4 review and the month-03 review; tagged
v0.3.0.
🧠 Closed-Book Recall (Month 3)¶
- Q: The channel axioms — send/receive/close on nil and closed channels?
A
Send/recv on nil blocks forever; send on closed panics; recv on closed yields zero value +ok=false; close of nil/closed panics. - Q: Single-owner dedup vs. mutex
Set— when each?A
Single owner (over channels) when one goroutine can hold the map; mutexSetwhen many goroutines need direct concurrent access — make check-and-insert one critical section. - Q: Does cancelling a context stop goroutines?
A
No; it closesDone(). Each goroutine must select on it and return. Alwaysdefer cancel(). - Q: Bounded parallelism vs. rate limiting?
A
How many at once (worker pool/semaphore) vs. how often over time (token bucket /time.Ticker). Orthogonal. - Q: Does a green
-racerun prove no races?A
No — only races on executed interleavings are caught. Stress the racy paths and assert invariants. - Q: Which profile for lock contention vs. leaks?
A
Mutex/block profile for contention (enable sampling); goroutine profile / climbingNumGoroutinefor leaks.
🪶 Feynman Reflection¶
Month 3 went from the atoms (a go statement, a channel, a select) to the molecules (mutexes, WaitGroup, atomics), to structures (pools, fan-in/out, pipelines, semaphores, context, rate limiting), and finally to a working machine — a bounded, cancellable, rate-limited, race-tested, profiled crawler. I can now design and defend a concurrent system, not just write a goroutine.
🕳️ Knowledge Gaps Carried Forward¶
- Real HTML parsing and per-host politeness (third-party / production concerns).
runtime/trace, pprof labels, and goroutine-leak detection in CI.
✅ Summary¶
Month 3 complete: concurrency toolkit consolidated and applied in a crawler capstone that is -race-clean, gracefully shutdown, rate-limited, and profiled. Released v0.3.0. Confidence on concurrency now ⅘.
⏭️ Next Steps¶
- Month 4: building networked services (HTTP servers, JSON APIs, middleware) on top of this concurrency foundation.
| Time spent | Difficulty | Confidence |
|---|---|---|
| 75 min | 🟦⬜⬜⬜⬜ | 🟦🟦🟦🟦⬜ |
Suggested commit: docs(journal): month 3 review (day 084) then git tag -a v0.3.0 -m "Month 3 complete: concurrency & parallelism"