LØRDAG
2026-08-08

Too many projects, too many ideas, too few hours — one learning a day anyway

Archive the inputs to a reduction, not its result

What I learned. Archive the inputs to a reduction, not its result.

My depth pipeline kept only the shoalest sounding per grid cell. That is exactly right for a safety display — a shoal must never be averaged away — and it destroys everything else: a per-cell minimum cannot be tide-corrected later, cannot be re-reduced to a datum, cannot join any future average. One reduction, chosen for one purpose, was quietly deciding for all purposes.

So the archive now stores one immutable row per observation, each carrying the sea level of that moment, so the reduction can be redone later with better knowledge. The rows are pulled off the Pi nightly and checksum-verified before they count as saved — because a retention clock was already running, and history that only exists in a time-windowed database is history being deleted on a schedule.