RSSAmplifier

Blog

Fragments — brandur.org

brandur.orgRSS feed ↗20 posts

Latest posts

Does anyone run Postgres without PgBouncer?

Almost every notable managed Postgres provider bundles a connection pooler, giving us a strong hint that connection management is a product problem rather than a user problem.

River binaries will get 10 kB lighter

River v0.43 removes test-only transitive dependencies from non-test builds, shrinking Go binaries that include River by about 10 kB.

pgtestdb's template cloning approach to testing is fast

Postgres database templates make pgtestdb’s per-test database isolation remarkably quick, around 100 ms of setup time, and within spitting distance of River’s schema-based approach.

I used to add links by hand

On how LLMs now drive most of this blog’s workflows, replacing what used to be a lot of small, manual edits.

The paradox of free time

On how a long stretch of open, contiguous time makes you … less (?) productive.

Rich, fully attributed context timeout errors in Go

Making Go’s generic context deadline exceeded errors traceable with small helpers that attribute the operation that timed out and indicate how long the timeout was.

SQLite bulk insert with sqlc

Using json_each and json_extract to get bulk inserts in SQLite with sqlc.

Generating words? Keep them short.

It’s not possible to stop the torrent of LLM-generated content, but how about this as a simple ask: when generating content, keep it short.

Turns out, competition works

Gigabit fiber for less money using this one weird trick: move to Austin.

Caveman

In 1980, Michael Crichton characters in Congo spoke like cavemen to save satellite bandwidth. It was absurd. Ridiculous! Forty-five years later, we’re doing the same thing with LLMs to save tokens.

"Somewhere" (2010) review

Short review of Sofia Coppola’s 2010 movie Somewhere . Unless I miss my mark, it’s the same movie as Lost in Translation ?

The special hell of Bolt, Europe's Uber clone

I don’t like this app.

Occasionally injected clocks in Postgres

Using a coalescable parameter to stub time as necessary in tests, but otherwise use the shared database clock across all operations.

Testing the graceful handling of request cancellation in Go, 499s

Using built-in net/http facilities to make sure that canceled requests are abandoned immediately to save time and resources.

Be careful with Dropbox

Fun times with Dropbox’s new ~/Library/CloudStorage location and File Provider API integration.

Optimizing JPEGs with MozJPEG for local archival

Writing a wrapper script around MozJPEG to achieve ~80% compression on large JPEGs with little downside.

The right way to do data fixtures in Go

A safe, succinct test data fixtures pattern using sqlc and validator.

Profiling production for memory overruns + canonical log stats

Using Go’s runtime.MemStats and canonical log lines to isolate huge memory allocations to a specific endpoint.

Go's bytes.Buffer vs. strings.Builder

Taking five minutes to write a benchmark so I know which of these I should be reaching for first.

Postgres UUIDv7 + per-backend monotonicity

How Postgres’ v7 UUIDs are made monotonic, and why that’s a great feature.