Re:Testing is waste of time, I know that my code works
by bphogan on Friday December 24, 2010 @12:42PM
(#2037641)
For me it was a discipline thing. Then a mentor of mine convinced me that not writing tests was actually okay when you're exploring something. He suggested I only write tests for "production" code - something I would deploy.
So I routinely would whip something up, see that it works, then start a new project with tests and rewrite my experimental code.
You can imagine what ended up happening - I realized how much time this was wasting, so I started writing tests to test my experimental code so I didn't have to throw it away.
I got my brain hacked. Maybe that story will help someone else. :)
Re:Testing is waste of time, I know that my code works
by joske2 on Friday December 24, 2010 @04:13PM
(#2038020)
How can you refactor if you don't have a test suite? Do you manually check everything in your application after every change? That's the main value of having a test suite you can trust. It speeds up refactoring massively.
But once things get more solid for me (and, like you said, I know the code has some long term value), I'm a big fan of building a solid test suite before a full production launch.
I also think it is worth the time to use code coverage tools to find sections that are not being covered. Odds are your test suite only covers 60-80% of the total logic in your app.