How we read scanned PDFs from a golang service by calling poppler, tesseract and qpdf: when to OCR at all, which page segmentation mode to use, timeouts, one OCR at a time, and passing PDF passwords without putting them on the command line.
Where to cache, how cache-aside and write-through differ, and how to stop a cache stampede in Go with singleflight, jittered TTLs and negative caching, tested with 1000 concurrent misses on shorty.
Hands-on Postgres 18 index design on a 2 million row table: when a B-tree helps, which column goes first in a composite index, partial indexes for soft deletes, INCLUDE for index-only scans, and what extra indexes cost on every insert.
One small golang interface over OpenAI and Anthropic that asks for JSON matching a schema and streams it as it arrives. No SDKs, a hand-written SSE reader with a bigger buffer, and error messages clipped before they reach the logs.
We already had HTML and CSS templates, so instead of a golang PDF library we print them with headless Chromium through chromedp. The render code, the container setup, a rough page count, and the API change in chromedp v0.24 that broke my first try.
Why localhost inside a container is not your laptop: the default bridge, user-defined networks and Docker DNS, published ports, the host network and host.docker.internal, run for real with a Go app, Postgres and Redis.
How we added rate limiting to a golang API with no Redis in the stack: a small in-process token bucket, a fake clock for tests, and the part people forget, which is that every task keeps its own budget.
Moving Terraform state from a local file to an S3 bucket with versioning and encryption, locking it with use_lockfile instead of a DynamoDB table, migrating the existing state, the IAM permissions it needs and what a lock error looks like.
Posts on this blog now live as plain files in a git repo. A build script checks them, draws the banners and creates Ghost drafts. Here is what changed compared to writing straight into the Ghost editor.
Pointers in Go with runnable examples: & and *, when to pass a pointer, nil pointers, pointer vs value receivers, new(expr) from Go 1.26, the range loop trap and a short look at escape analysis with -gcflags=-m. Small exercise at the end.
Payment providers like Razorpay deliver webhooks at least once. Verify the signature on the raw body, record each event in a Postgres table with a unique (provider, event_id), process it in the same transaction and check the captured amount before settling.
A small bash script that runs aws s3 sync for a list of buckets in parallel, keeps one log per bucket and tells you exactly which ones failed. Plus a dry run, a job limit and a count check afterwards.