Other Pages

Saturday, September 22, 2012

Unit testing won’t help you write good code.

Unit testing won’t help you write good code.

  The only reason to have Unit tests is to make sure that code that already works doesn’t break. Writing tests first, or writing code to the tests is ridiculous. If you write to the tests before the code, you won’t even know what the edge cases are. You could have code that passes the tests but still fails in unforeseen circumstances. And furthermore, good developers will keep cohesion low, which will make the addition of new code unlikely to cause problems with existing stuff.
by Chad Okere


http://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/



No comments:

Post a Comment