Weather text generation
A job advertised as 50% science, 50% programming — in practice it was close to 100% programming, and it's what completed my move from scientist to programmer. The main work was turning structured weather data into natural-language forecast text under hard constraints, for example a forecast that had to fit inside a single SMS message. This was pre-LLM, rule-based text generation: fixed templates and branching rules, not a statistical model. The diagram below runs one forecast through that pipeline — watch the draft text blow through its 160-character budget and get trimmed back down to fit.
- Data in — Keswick, 06:00 forecast run
- Rain prob 80% → include shower clause
- Gust 40mph → include wind detail
- Draft assembled — 186 chars
- Over budget: 186/160 — trimming required
- Drop gust clause (lowest priority) → 162 chars
- Still over: 162/160 — simplify further
- Wind clause shortened → 151 chars
- Fits: 151/160 — approved for send
- “Keswick: cloudy with heavy showers this morning, 80% chance of rain, easing during the afternoon before a clear evening. Max 14C min 6C. Wind SW 25mph.” — SENT