in reply to Re: Unit Tests and Creative Tension
in thread Unit Tests and Creative Tension

When I have unresolved tension left at the end of the session I cant get my mind off of the subject. I become nervous and irritable and poor company. I far prefer to end sessions with the completion of a module or its core functions or whatever.

I find a big difference between walking away from an unsolved bug--particularly when I've done a lot of rip and tear to isolate it--and walking away after I've written a unit test that doesn't pass yet. Leaving a bug unsolved is frustrating, and frustration isn't great for sleep (or for inflicting on other people). To me, an unsatisfied unit test is more of a statement of intent. A unsatisfied statement intent doesn't eat away at me in the same way that an unresolved problem does. And starting the day with that statement gets me moving a lot sooner than having to make up a new statement, particularly before that magic first cup of coffee.

  • Comment on Re: Re: Unit Tests and Creative Tension

Replies are listed 'Best First'.
Re: Re: Re: Unit Tests and Creative Tension
by demerphq (Chancellor) on Sep 08, 2003 at 09:36 UTC

    Yesterday I reread your post and realized I had kinda missed the point. *blush* I have some pretty hairy design and code work coming up and I think before I write another line of code on that project (I am currently by lack of choice dealing with other matters) I will be putting together a full set of tests to experiement with TDD. It doesnt make sense to knock something you havent given a proper try of. And if the peace of mind you describe is a possible payoff then its definately worth the experiment.

    Many thanks for yet another thought provoking node. (Even if it did take a while to sink in, im kind thick sometimes. :-)


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
      Remember TDD doesn't mean writing all the tests up front and then writing code. It means writing a test, making it pass, refactoring, writing another test, making it pass, refactoring... ad completum. Trying to code something given a complete set of tests up front is, frankly, far too hard, the trick is to keep adding functionality in piecemeal fashion.

      Apologies if I'm stating the obvious.