3 ms·
I think we are mostly in agreement but I'm enjoying deconstructing all this When electricians are testing that a wire is dead they will take their multimeter a
by codeulike 4y ago
I think we are mostly in agreement but I'm enjoying deconstructing all this
When electricians are testing that a wire is dead they will take their multimeter and test it on a live wire (to make sure the multimeter works) then test the dead wire. Then test a live wire again (to make sure the multimeter is still working)
That seems worth it - because electrocution is worth avoiding.
Writing a test that tests a blank method with no code in it, watching the little light go red, then writing the code that you had in your head the whole time anyway, and then watching the little light go green, is just like superstition
“Do programmers have any specific superstitions?”
“Yeah, but we call them best practices.”
(via https://twitter.com/dbgrandi/status/508329463990734848 https://twitter.com/dbgrandi/status/508329463990734848)
- dllthomas 4y agoFor something as extreme as a blank method, it's unlikely to be useful, I agree. For something subtle in modifying existing code, "did that actually change the thing I thought" might be a question worth answering. I guess my best (somewhat Devil's advocate) argument for doing it all the time is that maybe it's cheap enough that doing it in the useless cases is less expensive than every time figuring out whether you should plus the cost of the false negatives.