DEV Community

Cover image for The Otter Fact That Made Debugging More Fun
Izak T
Izak T

Posted on Edited on

The Otter Fact That Made Debugging More Fun

It was past midnight. I was debugging a Vue scheduling app — a job that runs past midnight draws a second block on the next day, and that block carried the day's slice of data instead of the real job: a 3-hour call from 11 PM to 2 AM showed "2 hours" on the next day, and Edit, Delete, and Complete silently did nothing while toasting "success."

I was tired and stuck. And at the bottom of my AI coding partner's reply, I found this:

Mind fact: Sea otters wrap themselves in kelp while sleeping so the current can't carry them away. (BBC)

I fixed the bug. But that little fact is the more interesting story.

The rule I invented

I work mostly alone. Nobody reviews my code except AI agents, and honestly, nobody gives me feedback except them either. So I asked my AI partner for a deal: end every substantive reply with a small fun fact — computer science, psychology, nature, LA history. Keep it weird, keep it short, never let it get too technical.

The fact isn't decoration. It's a rule I wrote into the system prompt, and it changed how debugging sessions feel.

Why it might work — two real findings that match

The ending weighs more than the middle. Daniel Kahneman and colleagues found that people remember an unpleasant experience by two moments: the peak and the end. (1996 study, PubMed) In a later randomized trial of 682 colonoscopy patients, adding a short, milder interval at the end — objectively more procedure — made patients rate the whole thing less unpleasant and slightly more likely to come back. (2003 trial, PubMed) (Kahneman on NPR)

A debugging session is the same shape. If it ends at the low point — stuck, tired, defeated — the whole session gets stored as "that was awful." A fact at the end changes the last page — at least, that's the pattern my sessions keep showing.

Positive emotions widen the lens. Barbara Fredrickson's broaden-and-build research found that positive emotions — interest, amusement, contentment — broaden the scope of attention and thought-action repertoires. Negative emotions narrow it. (Fredrickson, Cognition & Emotion) (PMC)

I said it before I knew the name: the facts "give my mind a little room to digest other concepts." That's a measured pattern — though it was measured on people watching mood-shifting film clips, not developers debugging with otter facts. The studies explain why the habit plausibly works, not that it does.

What the fact actually is

It's not a productivity hack from a listicle. It came from noticing:

  • Dense technical answers were wearing me down before the end.
  • A small surprise at the finish line kept me reading to the finish line.
  • The session's last feeling is what I carry to the next one.

The rule has rules now: keep it weird, keep it short, keep it earned. Mostly animals and LA history — CS facts get rationed, because they started feeling like homework. They only make the cut when they're about the thing itself. Cows have best friends — measured by heart rate, not vibes. (BBC) (McLennan's research) The bee waggle dance that inspired my "one clear signal, read by everyone" design instinct got its discoverer a Nobel Prize. (NobelPrize.org)

The CS fact that earned its seat

Phil Karlton's famous line — "There are only two hard things in Computer Science: cache invalidation and naming things" — got a famous riff: "...and off-by-one errors" (Fowler's collection, incl. Leon Bambrick's version).

My bug was all three at once. The segment object was a derived copy that should've been a view — cache invalidation. It carried a field called duration that wasn't the duration — naming things. And it only existed because a job crossed the midnight boundary — an off-by-one at the calendar edge. The joke isn't a joke. It's a maintenance log.

The honest part

I didn't get this from a book. I noticed that late-night debugging ends badly when the last thing I feel is "stuck," and I asked for something small and human at the end. The studies came after — they didn't invent the practice; they explained it.

Build your tools around how your mind actually works, not how the checklist says it should. Mine ends with an otter.

Still building, still learning.


Sources linked inline. The studies explain a pattern that matches my habit — they didn't test the habit itself. Match, not proof. Your mileage is your own.

Cover photo by Haim Charbit on Unsplash.

Top comments (0)