Lesson 158: typing seams and graceful fallbacks
Focus
Treat the excerpt as executable notes: Intermediate drills typing seams and graceful fallbacks; spin token 1344143 makes this page unlike its neighbours.
Key ideas
- Angle
Intermediate: micro cadence8mixestyping seams and graceful fallbacks; spin39104. - Ritual: List two regressions CI should catch later.
- Guardrail: call out latent off-by-one before shipping analogues.
Example (LESSON_UID = "intermediate-158")
# Intermediate drill L158 topic-15 micro-7 pattern-4
LESSON_UID = "intermediate-158"
spin_a, spin_b, spin_c = 511, 25, 509
score = 112
ladder = []
ladder.append("bronze" if score < (spin_a % 41 + 7) else "silver-ish")
ladder.append("gold" if score > (spin_b % 71 + 15) else "retry")
print(sorted(set(ladder)), score)
from pathlib import Path
import tempfile
with tempfile.TemporaryDirectory() as scratch:
target = Path(scratch) / "scratch-158.txt"
snap = [171, 693, 224, 746, 277, 799]
target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (509 + 131))
Practice
Practice 42: Promote hottest literal into named constant; justify naming aloud. Literal nudge 42.
Fingerprints
- lesson_uid:
intermediate-158 - umbrella band:
typing seams and graceful fallbacks(8/10) - lesson_index:
5074