Go read. I'll wait.
Ok?
Good.
In it, amongst other things, he seems to come across as saying that unit testing isn't worth it because it doesn't help you ship code/a product/a feature in a really short time frame.
But that's not the point. Unit testing helps improve code quality by preventing bugs over the long term. The value of unit testing is in the long term.
In the short term it's often better to have software with bugs in than no software at all. This can help you beat a competitor to market or win that big new contract.
In the short term you're not worried about making a change to one part of the system and inadvertently breaking something else (which automated testing is really good at identifying) because you're not making changes, yet. You're just writing the initial version.
But, in the long run, if you want to keep that market share and avoid losing customers to a competitor with a more reliable product you need to make your software more reliable and contain fewer bugs.
In the long run unit testing will save you time (well maybe not you directly but the development/testing/QA team as a whole). That's the value of unit testing - over the long term.
I've previously written about the value of unit testing here.
Guilty as charged m'lud..
ReplyDeleteI am definitely a duct tape programmer. Not that I don't write unit tests or do testing, it's just not something I do for everything.
But I do ship code fast :)
@CodeMonkey - Yep duct tape rather than TDD in my opinion.
ReplyDeleteAnother post about the importance of Unit testing