Notes

A logbook of what I'm building: one problem, what I did, and what I took from it. Longer tutorials are on the blog.

5 entries, newest first. Each ends with what I kept from it.

  1. No. 05

    A crash bug in the Go version I was running

    Before deploying this site I ran govulncheck on it. It reported one finding in the Go standard library: a race in net/http that lets a remote request crash an HTTP/1 server that uses MaxBytesReader. My contact form and my assistant endpoint both use it to cap request bodies.

    The fix was one line, moving from Go 1.27.3 to 1.27.4, in go.mod and in the Dockerfile.

    govulncheck only reports problems in code your program can actually reach, so its output is short enough to read every time. It takes seconds and is worth running before every deploy.

    GoDevOps

  2. No. 04

    My CV builds from the same files as my site

    My old CV was a LaTeX file I updated by hand, so it was always a little behind and never quite matched my site.

    Now the server reads the same Markdown files as the About and Projects pages and renders a two-page PDF from them when it starts. If I change a role or add a project, the pages, the CV and the AI assistant all change together.

    The details that took the time were typographic: dates aligned to the right of each title, older roles reduced to one line, and never leaving a heading alone at the bottom of a page.

    Go

  3. No. 03

    Revolut writes September with four letters

    Today I put three years of my own bank exports into one ledger, to see where my money went. I wrote a small parser for the Revolut PDF statements, and the result looked fine. Then I compared my totals with the summary Revolut prints on the first page, and they did not match.

    144 transactions were missing, all from September. Revolut writes the month as “Sept”, with four letters, and my date pattern expected three. Nothing failed. The lines were just skipped.

    A few hours later my Italian bank did the same with a hidden control character it uses as a thousands separator. Every amount above 999 euros disappeared, and again only the quarter totals showed it.

    Now a parser is not finished until its totals match the bank’s own summary to the cent.

    Python

  4. No. 02

    A retry that hid a three-minute wait

    The first live question to this site’s AI assistant took 173 seconds. The log said one successful call that cost less than a cent, and nothing else.

    The likely cause was a stalled connection that the SDK retried silently. I could not prove it, because nothing recorded the retry. A layer that retries for you also hides that the first attempt failed.

    Two changes fixed it. The HTTP client now gives up if the API has not started answering within 30 seconds, so a stall is retried quickly instead of near the deadline. And every failed or retried attempt writes its own log line with its status and duration.

    The rule I took from it: if something retries automatically, log each attempt, or you cannot explain the slowness later.

    AIGo

  5. No. 01

    One Go binary for a whole site

    I moved this site off WordPress. The pages are now built with Astro and embedded in a single Go binary, which also serves the contact form and the AI assistant.

    What I gained: no database, no PHP, no plugin updates. The container runs read-only as a non-root user and the image is about 50 MB. The 68 old WordPress addresses redirect to their new pages, so existing links keep working.

    What I gave up: an editor in the browser. Writing is now a Markdown file and a deploy, which I prefer anyway.

    GoSelf-hosting