←back to thread

414 points henry_flower | 9 comments | | HN request time: 1.335s | source | bottom
Show context
m4r1k ◴[] No.43112034[source]
I once saw a talk from Brian Kernighan who made a joke about how in three weeks Ken Thompson wrote a text editor, the B compiler, and the skeleton for managing input/output files, which turned out to be UNIX. The joke was that nowadays we're a bit less efficient :-D
replies(7): >>43112150 #>>43112344 #>>43112772 #>>43114120 #>>43117365 #>>43118374 #>>43118624 #
1. pinoy420 ◴[] No.43112150[source]
Otoh: I got react to run my tests without any warnings today.
replies(1): >>43112683 #
2. 9dev ◴[] No.43112683[source]
If I write a bunch of tests for new code, and all of them pass on the first attempt, I'm immediately suspicious of a far more egregious bug hiding somewhere…
replies(3): >>43114300 #>>43114644 #>>43120829 #
3. noisy_boy ◴[] No.43114300[source]
// Todo: remove

return true;

replies(1): >>43115255 #
4. throwanem ◴[] No.43114644[source]
Where feasible, I like to start a suite with a unit test that validates the unit's intended side effects actually occur, as visible in their mocks being exercised.
replies(1): >>43117900 #
5. kps ◴[] No.43115255{3}[source]
/bin/true used to be an empty file. On my desktop here, it's 35K (not counting shared libraries), which is an asolute increase of 35K and a relative increase of ∞%.
replies(1): >>43117234 #
6. ◴[] No.43117234{4}[source]
7. pinoy420 ◴[] No.43117900{3}[source]
I laughed. Thank you for that
replies(1): >>43123491 #
8. michaelcampbell ◴[] No.43120829[source]
"never trust a test you've never seen fail." has kept me honest on more than one occasion.
9. throwanem ◴[] No.43123491{4}[source]
Sure. For Patreon subscribers at the $5/month tier and up, I also have a course on making integration ("e2e", "functional") tests more maintainable by eliminating side effects.