News for hackers. Stuff that matters.
Re:It's OK Not to Write Unit Tests by jwr on Tuesday May 25, 2010 @03:32AM (#1376780)
As with all things, truth is somewhere in the middle. I've found that unit tests do help me write better code and find corner cases which I would otherwise miss. But I don't treat them as a religion, and I don't write them for every function.

Just don't overdo either way and you'll be fine.

Re:It's OK Not to Write Unit Tests by arethuza on Tuesday May 25, 2010 @04:26AM (#1376835)
But people really don't want that kind of sensible mature argument and would rather have set of "best practices" that they can blindly follow.
Re:It's OK Not to Write Unit Tests by abp on Tuesday May 25, 2010 @05:44AM (#1376929)
Yes, but only if one got zero or not much experience in the field. So actually you are saying something that is true for everything.
Re:It's OK Not to Write Unit Tests by arethuza on Tuesday May 25, 2010 @06:40AM (#1377025)
You'd be amazed at the number of experienced developers who tell me "it is best practice to do XYZ" who when challenged as to what is the underlying justification for this recommendation can't actually provide a sensible answer.
Re:It's OK Not to Write Unit Tests by crististm on Tuesday May 25, 2010 @09:49AM (#1377396)
I've tried TDD for one project and it gave me a nice feeling of having a safety net. It was a good feeling. The problems started to appear when the project increased in complexity and needed a redesign in some of it's parts. I had to do _again_ twice the work to have the tests match the code behavior.

The article mentions this problem too. The benefit of the tests disappear when your code changes beyond refactoring.

Re:It's OK Not to Write Unit Tests by allend on Tuesday May 25, 2010 @11:41AM (#1377687)
Then why didn't you drop the tests if you think there was no benefit?