2,085 Tests, and None of Them Opens the Front Door
i.brandanthonymcdonald.com
i.brandanthonymcdonald.com
A person who posts an article like this is telling me they have neither written nor read their article. Or their own code base, for that matter. So this person had problems in a code base he didn't write, didn't read either, it seems, and now wants all of us to read an article about this zombie code base, except he also didn't write or read over that article before posting it.
To the author: Your article can be rewritten in a few sentences like this: "I vibe coded a code base and asked Claude to add tons of unit tests. I didn't read the code or the tests; just wanted it to work. But I either didn't know to ask to wire the tests into my CI/CD pipeline, didn't know what that was, or did know but was too lazy to check that it happened. Anyway, I sure learned my lesson: What happens in localhost:3000 stays in localhost:3000. Gotta wire up your .github/workflows/cicd.yml file to pull in your tests. Otherwise it really doesn't do much for you. Lesson learned!" And you know what? As banal as that would have been, I would have enjoyed that article so much more. Just take 5 minutes man. Five freaking minutes.
I'll never forget the cycle, after staunch objections to integration/e2e/manual tests and zealously insisting on full unit test coverage, the senior dev deployed changes ... boom. The process failed hard minutes after start because there was a bug in main. Full production outage. A bug so obvious we should have caught it by eye. Clearly, in the weeks developing the feature, he had never bothered to even run the application. Each part was fully polished in isolation but utterly failed when integrated into an application.
The way I've come to think of it: Unit tests are for libraries, a closed world where you can neatly define all inputs and outputs. Integration/E2E tests are for applications, an open world which require systems thinking, simulations not proofs. Know which world you're working in!
Unit and integration tests serve different purposes and one isn't necessarily better than the other.
If they serve different purposes, then one is by definition better than the other, given the circumstances.
There's a whole class of applications containing very little pure logic; dumb pipes hooking together a database and client over a network. It's a categorical mistake to fully unit test these. There are only a few "units" to test; everything else is a side-effect (disk, network, etc). Yeah you can mock. My point is that mocks do not cover real world behavior, so those types of apps require an integration/e2e heavy set of tests.
Conversely, if you've got a logic-heavy library, you need unit tests. You can't rely on the behavior as filtered through the application.
Different purposes. But depending on what world you're working in, one is definitely better than the other.
I used to read anything and everything on HN, but my allergy to slop has made me stop doing that. I suppose that's a good thing?
> The one repository with working CI has a workflow file of about 40 lines that runs a type check, the test suite, and a build on every pull request. Sixteen other repositories use the same test runner. Copying it sideways is an afternoon.
So I think they're saying that they never wired up CI, and as a result the value provided by their test suite in preventing bad code from shipping is limited.
I'm developing a distracting hypervigilance that kicks in whenever I start reading anything linked from here or lobsters or LinkedIn. Instead of focusing on whatever it's saying, I'm looking for the tells instead.
I hate what AI's doing to reading. It's like when the desktop publishing revolution reached folks who never could have put together a decent banner to save their lives, and suddenly chintzy Broderbund Print Shop-generated examples were hanging in every classroom. But at least that was limited to peeps who had access to a dot matrix printer and scads of tractor feed paper. Now clankers write for everybody who either can't write or won't put in the time, and the low-effort slop is everywhere.
It'd be one thing if they used AI to write a draft and then rewrote it to make it theirs. I'd read it! But they can't be bothered. Very unfortunate, and I refuse to waste my time on it.
Just post the prompt you used, Brand, I'd probably get more value...
This is the most recent AI slop phrase the models produce, keep an eye out you'll see it everywhere.
> A QA engineer walks into a bar. Orders a beer. Orders O beers. Orders 99999999999 beers. Orders a lizard. Orders -1 beers. Orders a ueicksjdhd.
> First real customer walks in and asks where the bathroom is. The bar bursts into flames, killing everyone.