Tests are just booby traps for the other engineers so they don’t break your code by mistake.
Its funny cause its true. I often design tests to be “if a case/enum value is added this test will explode and tell them to add code here”
This is why I like strong type systems with exhaustivity checks
While I know that these days, bugs in code can cause real-world harm (personal info leaks, superannuation records lost, lol google), I find it humorous to think of the equivalent, even worse outcomes in my discipline (chemical/process engineering).
“Didn’t do any checks, fuck it, I know this calculation is fire 🔥”
Later: 🔥🔥💥
It’s more: I have routed a few pipes in our test system and it’s now spitting out water known to be contaminated but now should have some extra sprinkles in so it’s fine.
What I’m saying is it’s even worse than didn’t do any checks. It’s willfully ignoring existing checks intentionally.
I physically reacted to this post with a combination of disgust, anger, and fear. Do tests. All of the tests. Randomize the order in which your tests run. Cover all branches.
Weak code lacks tests
Alt: if strength relies on unity I need to switch to game dev
tests are for confirming your code STILL works if someone ever changes something
I get a small amount of joy from clicking the “request changes” button and blocking some doofus from merging lazy untested code.
I love going into a PR with 3 approvals already and shitting all over it
Real programmers test in production.
You mean like this?
the energy of a chaotic neutral?
“maybe it’ll work, maybe it won’t, but it’ll be FUN”or chaotic evil?
"naw. fuck y’all’s weekend.Merging failing tests so everybody else has failing tests and wastes time figuring out why.
Nothing neutral here
That’s what the pipeline is for. It’s not that hard to pinpoint the commit that lead to the errors.
If I rebase my branch with main I do not expect any failing tests. If you waste my time merging shit code, fuck you. Fix your shit.
Unless prod is on fire and the CEO is prowling (even then, I’d argue standards should be maintained)
Tests? Pfffft. I am the test.
And while I’m here: https://blog.jim-nielsen.com/2024/sanding-ui/