34 ms·
The problem with testing is that it has the potential to gobble up infinite resources without actually adding much value. Just because you tested something, doe
by auggierose 9y ago
The problem with testing is that it has the potential to gobble up infinite resources without actually adding much value. Just because you tested something, doesn't mean it will work reliably. It's that simple.
- throwanem 9y agoNo, but if your tests are good, they'll catch bugs and especially regressions that would otherwise make it to production. Of course there's a balance to be struck, but it's approximately as sensible to devote zero resources here as infinite. On the other hand, good review would much more likely have caught a bug like this than good tests would. "Why are you passing the password as the password hint?" Simple as that. Again, there's a balance to be struck, and I don't claim code review is a panacea. But I do think it's a very worthwhile, and in the general case necessary, part of an engineering culture strongly oriented toward reliability.
- ShinTakuya 9y agoHonestly, unit testing good code should have a minimal impact on overall productivity. I'm not suggesting rigorous testing of all possible inputs, but at least testing one good case and one bad case can save you a lot of headaches and only takes a couple minutes to code in most cases. I mean I agree with your general point in that testing too much is also a bad thing, but too often I hear this used as an excuse for not testing at all. And that's how we end up with legacy monstrosities that you can have no confidence in modifying that so many of us have to deal with.