Live data from Hacker News

Where unit testing fails

hmemcpy.com

51–52 of 52 posts

Re: Where unit testing fails

#51

Earlier quoted context omitted.

Sure, if you need training wheels on your bike...

Which we demonstrably do as an industry. When neither NASA nor Knuth can write 100% correct code, the rest of us can't reasonably expect to pull it off. Human beings doing meticulous work make lots and lots of mistakes, and I welcome any feasible tactic that stops mine from being released. Sure, automating "I got a confirmation after pushing the button" seems hokey on day one (it's not as if you'd otherwise commit an…

I'm not debating the importance of tests, but rather of the test-driven approach. I can write code and then write tests (or intermingled) and satisfy your point. I don't have to switch my brain into this wierd test-driven approach to do that. TDD zealots don't seem to understand that.

Re: Where unit testing fails

#52

Earlier quoted context omitted.

Which we demonstrably do as an industry. When neither NASA nor Knuth can write 100% correct code, the rest of us can't reasonably expect to pull it off. Human beings doing meticulous work make lots and lots of mistakes, and I welcome any feasible tactic that stops mine from being released. Sure, automating "I got a confirmation after pushing the button" seems hokey on day one (it's not as if you'd otherwise commit an…

I'm not debating the importance of tests, but rather of the test-driven approach. I can write code and then write tests (or intermingled) and satisfy your point. I don't have to switch my brain into this wierd test-driven approach to do that. TDD zealots don't seem to understand that.

People just assume older code works. I'm regularly finding stuff we've had in production for months that never did what it was supposed to. You could go back and write all the same tests after the code is done, but I find it extremely unlikely that anyone will actually reach the same degree of test coverage (I know I for one never have). And even if you're one of the rare few who will pay down this technical debt eventually, it takes away quite a bit of the value of the tests to muddle through all the coding work without them.
Post reply on HN