Skip to content
October 4, 2007 / cdsmith

Revisiting "X Improves My Design"

I seem to have upset a few people.  Let me clarify a few points about the last article I wrote:

  • I don’t think unit testing or test-driven development is a bad idea.  I’ve done it for some time.  I’ve argued for it.  I’ve invited Mark Clark to speak at user groups to promote TDD.  If this post is read as a hit piece on the idea of test-driven development, that’s not how it was intended.  I’m not the right person to write such a hit piece, because I think TDD is a good idea.
  • Nothing in the article was intended to attack or insult Tim Ottinger.  It was meant to point out something we all do, and that I think we need to be made aware of.  I do it with functional programming and static typing.  Others do it with OO design, or certain kinds of version control, or whatever.  Tim wrote a good article, and I used it as a springboard to make a slightly related point.  I do apologize to Tim if my comments were upsetting at all.
  • I don’t actually believe that doing test-driven development requires completely giving up private variables.  I don’t think it necessarily means adding Java EE style abstract factories for all classes in the program.  I was pointing out, more than anything else, that we should just remain aware that these techniques have disadvantages.

The main thing to bring away is there there are very few techniques in programming that don’t make some things hard or awkward.  Denying that fact is dishonest, and does nothing to help the advocacy of a technique.  Acknowledging it brings us back to real people balancing real and often conflicting concerns in the context of their various projects.  This is the essence of software development, and it’s directly opposed to the human tendency to pick a side and defend it against all comers.

I remain convinced that test-driven development will lead to some design compromises in other areas.  I’ve seen it in my projects, and I think Tim’s experience basically says the same thing.  I still think it’s best that we describe these compromises as what they are.  It’s important to resist silver-bullet-ism in a field that’s already gone too far down that path.

About these ads

2 Comments

Leave a Comment
  1. Sadek Drobi / Oct 7 2007 5:42 am

    Test Driven Development is not about design. It doesn’t drive any better design, rather it is about testing.Gertrud Bjørnvig points out, It’s not “test first” that’s important: it’s “test-while.”
    I wrote on http://sadekdrobi.com/2007/09/29/draft-design-driven-testing-using-tests-as-specifications-of-system%e2%80%99s-invariants-and-contracts-design/

    about how testing can be helpful in my everyday programming.

    Anyway, Its amazing how this “X Improves My Design” can apply evrywhere, even to waterfall design :) http://programming.reddit.com/info/2uv7q/comments/c2v2fn

  2. Tim Ottinger / Jan 7 2008 3:05 pm

    Now that this is long over, I wanted you to know that there is no upset on my part.

    I’ve agonized over the whole “collateral effort” thing, and while I do believe that TDD is improving my design, I also recognize how bandwagon followers can swallow the bottle with the tonic. In this case, the “improves my design” specifically means that it makes it possible to isolate, test, and change specific bits. This is a kind of good.

    Even slightly mis-characterized I’m unoffended. I wouldn’t blog if that kind of thing worried me overmuch. Overall, I agree with warnings to avoid straining out a gnat while swallowing a camel. :-) Also, ham that I am, I enjoyed being quoted.

    God bless!
    Tim

Leave a Reply

Fill in your details below or click an icon to log in:

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

Follow

Get every new post delivered to your Inbox.

Join 62 other followers

%d bloggers like this: