~/topics/testing

testing

everything written here about testing — the testcontainers series, and the public retraction after a silent bug ate 79% of my data

this is the topic i have most publicly changed my mind about, so it is the one worth reading in order rather than by relevance.

what does this blog cover about testing?

testcontainers, in three parts: real postgres in the test suite instead of a mock, what it costs in ci minutes, and the reality check after living with it.

and then the retraction. a year ago i argued that testing was a waste of time for a solo developer shipping fast. then a lost-update race silently ate 79% of every vote in a live product — a bug no amount of manual clicking would ever have surfaced, because it only appears under concurrency. so i wrote the retraction, with the seven things i shipped in between and what each of them actually needed.

the position i hold now is narrower than either extreme: test the things that fail invisibly. concurrency, authorization, money, and data you cannot reconstruct. everything else can wait until it hurts.

the bug that caused the retraction is under postgres ; the authorization holes that argue the same case are under security .