The Web Gambit

Thoughts on Web Development

Choosing between Dogmatism or Denial

It seems as though the .NET developer community is becoming more polarized regarding their thoughts on the value of Unit Testing. I see it as a split between those that are dogmatic about Unit Testing, and those that are in denial that it has any long term value.

Some of this was spurred on by Cashto’s “It’s OK Not to Write Unit Tests” post, but I think that sentiment has been brewing for quite some time and it just hadn’t properly been put into words.

I think Cashto had some valid points and that in certain instances, Unit testing and TDD can become cumbersome. In my opinion, the following would need to be true to get away with not Unit Testing.

  • You have the final say on which features go into your software and your customers can handle losing features between releases.
  • Your software addresses a niche with a small customer base.
  • You have nothing but highly skilled developers working on the code.

While some may consider these three conditions to be unrealistic, there are certain small lean startups or small consulting projects that can operate under these assumptions.

The problem with the .NET community’s reaction to cashto’s post was that the dogmatic individuals immediately dismissed it and the ones in denial unconditionally embraced it. The dogmatic strictly believe in a test first methodology, and are quick to dismiss any notion of the contrary. The irony is that their dogmatic attitude is reactionary to the “no testing” attitude previously espoused by many in the community, especially those most closely associated with Microsoft. Those individuals who fully embraced cashto’s post and cried “Unit Testing is Dead” are the ones most often in denial that never really gave it a chance. These individuals may have dipped their toes into Unit Testing years ago and quickly gave up without putting enough initial effort or seeing any results.

For those of us who fall in the middle, the path has become unclear. The dogmatic approach can be off putting, especially when faced with the often harsh attitudes of those espousing it. Staying in denial, however, is not an option for those who have been in the trenches and seen more than a few nasty bugs caught with good unit tests.

I have chosen to look outside the .NET community and see how the Rails community has dealt with this issue. I suspect that many of the disagreements are actually more technical in nature than most people realize. More on this in a future post.

Advertisements

3 responses to “Choosing between Dogmatism or Denial

  1. Jim Holmes November 25, 2009 at 5:57 am

    I'm late coming across your post, but I'd be interested in what you find in the Rails community. Having been around a number of very accomplished Rubyists for some time, I can tell you their reaction to this silly angst we folks in the .NET domain have: they shake their heads and go back to doing TDD/BDD/context-driven development.Neal Ford, Jim Weirich, Glenn Vanderburg, and less renowned but still highly accomplished Rubyists all have the same mindset. *NONE* of these folks put up with the attitude that it's OK to not test. There's no arguing about the value of tests because they understand it already. There's no heated debates about why one should test because they grok the benefits. Best of all there's no religious wars about it because, for the most part, the attitudes of Rubyists just don't shake out like that. It's just how it is, and it's awfully refreshing — because that mindset and approach to craftsmanship is simply just a part of how that community does its work.(Of course there are segments of the Ruby community that don't work that way, but those segments are much smaller and much less vocal.)

  2. Karthik Hariharan November 26, 2009 at 5:14 pm

    Thanks for the comment, Jim! I agree with everything you've said and I've been very impressed with the Rubyists attitude regarding unit testing. Let me know what you think of my follow up post here: http://webgambit.com/2009/11/26/comparing-the-r

  3. Pingback: The Web Gambit » Comparing the Ruby and .NET ecosystems

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: