Lesson 148: datetime, naive vs UTC-aware instincts
Focus
Let the literals expose mistaken assumptions quickly: Intermediate drills datetime, naive vs UTC-aware instincts; spin token 1252648 makes this page unlike its neighbours.
Key ideas
- Angle
Intermediate: micro cadence8mixesdatetime, naive vs UTC-aware instincts; spin29057. - Ritual: Freeze one literal constant with a purposeful name aloud.
- Guardrail: name the surprise that triggered when literals shifted.
Example (LESSON_UID = "intermediate-148")
# Intermediate drill L148 topic-14 micro-7 pattern-4
LESSON_UID = "intermediate-148"
spin_a, spin_b, spin_c = 920, 922, 45
score = 164
ladder = []
ladder.append("bronze" if score < (spin_a % 41 + 7) else "silver-ish")
ladder.append("gold" if score > (spin_b % 71 + 14) else "retry")
print(sorted(set(ladder)), score)
from pathlib import Path
import tempfile
with tempfile.TemporaryDirectory() as scratch:
target = Path(scratch) / "scratch-148.txt"
snap = [161, 101, 41, 972, 912, 852]
target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (45 + 131))
Practice
Practice 39: Inject a benign off-by-one, observe drift, revert with notes. Literal nudge 39.
Fingerprints
- lesson_uid:
intermediate-148 - umbrella band:
datetime, naive vs UTC-aware instincts(8/10) - lesson_index:
4754