Encrypt sensitive columns with AES-GCM under a KMS data key, store the wrapped key inside each value, reuse data keys for a short while to save KMS calls, and backfill old rows safely at startup. Tested in Go against Postgres 18.
Part 1 of the shorty series: the HTTP API of a URL shortener using only net/http. Go 1.22+ ServeMux patterns like GET /links/{code}, strict JSON in and out, error mapping, middleware without a framework, timeouts and httptest tests.
My golang trading jobs call Gemini for advice, and I wanted to try a local Ollama model without editing every job. Here is the one method interface, the optional health check that fails fast, and how it compares with the Anthropic Go SDK.
Send only the first 5 characters of the SHA-1 hash to the Pwned Passwords API, compare the rest locally, and decide what happens when the API is down. A small Go client with padding, a 5 second timeout and tests that never hit the network.
The first hour with a new AWS account: lock away the root user, sign in through IAM Identity Center instead of access keys, set a budget that emails you, and turn on CloudTrail. Every step with the console path and the CLI.
My golang paper trader backtests eight strategies on every NIFTY 50 stock each morning and only trades a stock if the winner made money over enough trades. Here is how the selection code works, and why a backtest winner proves very little.
What happens between git push and production, stage by stage: build, test, package and deploy, the difference between continuous delivery and continuous deployment, and a diagram of the pipeline shorty will use in this series.
Keep route authorization in one table keyed by method and gin route template, then let two tests guard it: one fails on policies for routes that don't exist, and a ratchet file lets the list of routes without a policy shrink but never grow.
I write blog posts as Markdown folders in git. A small python script checks each one, renders the HTML, draws a banner with Pillow and creates a draft in Ghost through the Admin API.
Three services carried their own copy of the same logger package and one copy quietly drifted. A small Go test that hashes the shared files against a golden file now fails the build when a copy changes on its own.
Latency numbers I measured on my own Mac, QPS and storage maths, read/write ratios and Little's law, worked end to end for shorty, a URL shortener in Go with Postgres and Redis.
A few weeks after moving my Ghost blog to Docker, AdSense said earnings were at risk because ads.txt was missing. Here is the small Caddy block that serves it, and how I checked and reloaded it without SSH.