I Put My Son in a Swamp

nickstinemates1 pts0 comments

I Put My Son in a Swamp | Neil HanlonSkip to content<br>~/posts<br>I Put My Son in a Swamp<br>I modeled my newborn as a typed resource with a sync method and a stack of reports. It's the newest of five ways I track one baby, and somewhere in the absurdity there's a real reason two exhausted people instrument everything.<br>July 11, 2026<br>6 min read

My son is a typed resource now. He has a sync method that pulls the last seven<br>days of his life into a versioned snapshot, a stack of reports that summarize how<br>he slept and ate, and — I did think about this — a delete that&rsquo;s careful to be<br>idempotent, because deleting the same diaper twice shouldn&rsquo;t be an error.<br>I did not set out to put a baby in a swamp. It followed, the way these things do,<br>from having already put everything else in one.<br>What &ldquo;in a swamp&rdquo; means<br>swamp models real resources as typed<br>objects with methods, and records every run as versioned data other models can<br>read. You write extensions in TypeScript. I used it last week to automate my home<br>certificate authority,<br>and the whole time I kept thinking about the thing I actually spend all night<br>dealing with, which is not a certificate.<br>We run Baby Buddy at home — a small,<br>self-hosted app for tracking a newborn&rsquo;s feedings, diapers, sleep, pumping, meds.<br>It has a clean REST API. A clean REST API, at 2am, to a certain kind of brain, is<br>a dare.<br>So I wrote @kneel/babybuddy: one model that reads the whole instance into a<br>snapshot and writes new entries back, with a stack of reports that run over the<br>snapshot. Log a feeding, fix a mis-logged one, patch a bad timestamp, then ask it<br>questions.<br>The reports tell on you<br>Summarizing a week of a newborn produces numbers that are, on their own, a little<br>unhinged. In the last seven days: ninety-six feedings. Sixty-five separate sleep<br>sessions. His longest unbroken stretch was four hours and forty-six minutes,<br>which I know to the minute because there&rsquo;s a report called sleep-longest-stretch<br>and I run it the way other people check the weather.<br>The one that got me was the medication report. I built it to answer &ldquo;are we giving<br>the vitamin D on schedule,&rdquo; and it answered a question I hadn&rsquo;t asked, which is<br>&ldquo;when does Neil actually remember the vitamin D.&rdquo; Not on schedule, it turns out.<br>It&rsquo;s a little cluster of timestamps at midnight, 2am, 3am — whenever I surfaced<br>enough to think of it. The schedule in my head and the schedule in the database<br>were not the same schedule, and only one of them keeps records.<br>That&rsquo;s the actual value of instrumenting anything: some night the dashboard hands<br>you back a picture of yourself you weren&rsquo;t planning to volunteer.<br>This isn&rsquo;t the first interface. It&rsquo;s the fifth.<br>Here&rsquo;s the genuinely stupid part, and I say that with affection for the man who<br>did it: the swamp extension is the newest way I have to track this kid, not the<br>only one, and not by a wide margin.<br>There&rsquo;s a mobile app — a Capacitor wrapper around Baby Buddy with the sharp<br>edges filed down. Biometric lock, so a phone left on the couch doesn&rsquo;t show the<br>whole night&rsquo;s log. Log-a-diaper you can say out loud, because your hands are full,<br>because your hands are always full. A running feed timer on the lock screen next<br>to the elapsed time you&rsquo;re trying not to look at. iOS and Android, because of<br>course iOS and Android.<br>There&rsquo;s a Pebble watchapp , because the best possible interface for logging a<br>feed at 3am is a physical button on your wrist that emits about four photons.<br>Start a timer, stop it, pick the amount, done, without the wake-your-whole-nervous-<br>system glare of a phone. I&rsquo;ll admit the watchapp is currently ahead of my<br>hardware — I don&rsquo;t have the watch yet. There&rsquo;s a ring interface too. I don&rsquo;t have<br>the ring yet either. I wrote software for two devices I&rsquo;m still waiting on, which<br>tells you roughly everything about the state of mind here.<br>There&rsquo;s a conversational server — an MCP that lets me, or Claude, or the voice<br>assistant it hangs off of, just say what happened. &ldquo;He ate ninety at eleven.&rdquo; It<br>writes the same feeding record the app would, the same one the watch would, the<br>same one the swamp model syncs back out.<br>And there&rsquo;s Home Assistant , the layer that nags. At 10:30 it reminds whoever&rsquo;s<br>still upright to make the overnight bottle. At 11 it reminds us the vitamin D goes<br>in it. If nobody acknowledges, it asks again. It&rsquo;s a very polite robot with a<br>clipboard, and right now it has a better memory than either of us.<br>None of these sit on a stock Baby Buddy, either — the one underneath isn&rsquo;t stock<br>anymore. Somewhere in here I ended up bolting push notifications onto it via FCM,<br>adding per-record audit fields so I can see who logged what, soft-deleting timers<br>so a fat-fingered stop doesn&rsquo;t just vanish, and writing a handful of new reports.<br>&ldquo;Track the baby&rdquo; quietly became...

rsquo swamp baby because reports ldquo

Related Articles