Testing concurrency and cancellation without timing roulette
Replace sleeps and scheduler luck with barriers, events, bounded waits, and observable lifecycle assertions.
Independent field notes / Vol. 01
Precise explanations of the machinery, patterns, and tradeoffs that make Python feel deceptively simple.
Read the cover storyThe index
49 notes, edited for signal.
Replace sleeps and scheduler luck with barriers, events, bounded waits, and observable lifecycle assertions.
Choose a concurrency mechanism by locating blocked resources, ownership boundaries, and coordination costs.
Replace bookkeeping loops with comprehensions, aggregation, and pipelines when they state the result more directly.
Immutability, hashing, packing bytecode, shallow memory, and choosing records that communicate their shape.
Use weak references, weak containers, and finalizers without confusing reachability, equality, callbacks, or cache policy.
Hashes, collisions, compact entries, and the implementation choices behind Python's most important container.
Use guard clauses to make the happy path obvious and failures impossible to ignore.
What CPython locks, what it does not guarantee, and how free-threaded Python changes the decision.
Editorial policy
No listicles. No folklore. No just trust me abstractions.
Every note should leave you with a better model of the system, not just another snippet to paste.