RSS ⧉

Kyle's blyg

Kyle Mathews

In response to
Aneesh's Blyg · Aneesh Sathe · “green tests prove the code agrees with its mocks As a non-software dev software…” · item 3z50r8q76cs8s1zbb164v6zj49, v1 · <https://blyg.aneeshsathe.com/t/3z50r8q76cs8s1zbb164v6zj49/> · retrieved Oct 6, 2026

green tests prove the code agrees with its mocks

As a non-software dev software person, i have never understood the purpose of mocks.

They suck unless you really need them — generally you really need them if the thing you're mocking is too expensive or slow to run or impossible to run e.g. a 3rd party API that doesn't have a test environment.

That’s interesting, years ago I had asked a cousin of mine who was into automobile engineering why they had to run the whole car to test a new chip. He said that they needed to get the actual signals and they mock signals just aren’t good enough.

Didn’t go deeper into it, but it’s funny that a car should be easier to not build mocks for than code.

from Aneesh's Blyg ↗ · snapshot of v1

Probably because the physical world have far more variation than the digital world. Many digital things are pretty simple & deterministic so easy to mock. Mocks can still bite you so people still advise to avoid them when possible but they're often just fine.

Created: Oct 6, 2026