~/talk

Garfield's worst nightmare (or how a API difference caused a bad bug)

Talkat RustWeek 2025 · 2025-05-13..05-17· [rust, web-platform]
links:none on file
slides:none on file

A Discord bot that posts Garfield daily uses cached image-hashes keyed by days-since-first-comic; a recent rewrite swaps date libraries and computes keys by subtracting dates as an interval but only reads the interval’s days field, so different date differences collapse to the same key and the bot posted the 9/11 strip instead of the current comic. The fix is to use a proper day-count or epoch representation, add a collision test (300k days runs in ~1s), and add unit tests.

AI-written summary · about

  1. 0:00Introduction
  2. 0:44Garfield bot purpose
  3. 1:51Comic URL and date system
  4. 3:38Unexpected comic date bug
  5. 5:24Time vs EOS datetime libraries
  6. 7:11Root cause of key collision
  7. 8:33Why bug occurred with EOS
  8. 9:14Lessons learned and testing
  9. 10:36Writing the postmortem
  10. 12:21Second API change and redirect
  11. 14:30Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.