logoalt Hacker News

hinkleytoday at 7:05 PM0 repliesview on HN

Everyone is addicted to bad data.

The Red-Green-Refactor pattern is a coping mechanism to deal with the fact that if we want a change to work and the build process tells us we didn't break anything, we bowl right past any subtle hints that we are in the wrong, and our whole code change is a house of cards standing on a bad assumption that will immediately collapse when breathed on.

I have a love-hate relationship with negative tests because of this, and I wonder if there's some way with static analysis or maybe AI to validate that the test that is green because nothing happened isn't green now because I broke the API and the test is now testing nothing in, nothing out instead of something in, nothing out.

Sooner or later in some refactor someone finds a way to break the code without CI catching it.

But we are just people. And if you squint you can see how our relationship to green builds is the same drive that management, sales, and marketing, and scientists get with charts that Make the Numbers Go Up even when the data is just correlated and the proximate cause they were looking for is a hallucination.

Mark Twain knew. Lies, Damned Lies, and Statistics.