Writing

Write-ups about real problems I’ve hit in production and how I solved them, across AI agents, mobile apps, crawlers and embedded firmware.

I added my ESP32 board to Arduino, CircuitPython, Zephyr and PlatformIO. Each one found a different bug in my assumptions.

My Waveshare ESP32-S3 AMOLED board wasn’t supported by Arduino, CircuitPython, Zephyr or PlatformIO, so I added it to all four. Each one caught a different wrong assumption, from copied bugs to pins that weren’t really free.

My ESP32 gadget crashed every time it refreshed a token. The bug was in where the task's stack lived.

Every token refresh rebooted my ESP32-S3 desk gadget. Nothing was corrupted, and my code had no bug: one task’s stack lived in PSRAM, and a flash write disables the cache that PSRAM sits behind.

My crawler said 1 in 7 websites were down. They weren't, and retrying made it worse.

Fresh Leads told customers about 1 in 7 websites were down when they weren’t. Retries recovered none of them, waiting six hours made it worse, and the real fix was an error code I had been throwing away.

The token refresh bug that kept logging our users out, and took me 3+ weeks to solve

Users with a valid seven-hour refresh token kept getting logged out. The cause was parallel 401s racing to refresh the token at once, and the fix was a single in-flight refresh with a request queue.

I built a browser agent that plays a game by looking at pixels

A Python Playwright agent that plays a canvas game with nothing but a mouse and a screen: nested iframes, page-global coordinates, humanlike drags and a board read from pixels.

Shorter code snippets live in my GitHub gists (opens in new tab).

Get in touchFollow on dev.to (opens in new tab)