Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: The Evil Pleasures of Unit Tests

by tachyon (Chancellor)
on Aug 30, 2003 at 09:21 UTC ( #287890=note: print w/replies, xml ) Need Help??

in reply to The Evil Pleasures of Unit Tests

Of course the patch you checked in just after proving the failure with the new test case (and checking that in) should make your joy short lived.....You did say teammates right? Of course this make the rash presumption that you are all on the same side ;-)




Replies are listed 'Best First'.
Re: Re: The Evil Pleasures of Unit Tests
by dws (Chancellor) on Aug 30, 2003 at 10:03 UTC
    You did say teammates right?
    Right. And I don't expect to have to do this for more than another week.

    If you're on a project where people are checking in stuff that doesn't work, or only, uh, partially works, there are a couple of ways to handle it. You could quietly fix stuff yourself, but then they won't learn (and they'd probably get pissed at you for reaching into their code). Or you can mark up a listing and hand it to them. Or you can say, without pointing out any specific fault, "I don't care how you implement this, but we've agreed on the interface, and I'm going to hold you to that agreement." A unit test does the latter, and shifts the pain, if any, where it belongs. And if others on the team need to do this to me, then I deserve it.

    Standing up for your agreements early in a project can save you a lot of work later on.

      I appreciate the value of unit tests too, and not just as an implement of torture for the un-righteous {maniacal laugh} <:-) Actually I posted one of our widgets Autogenerate Test Scripts a while back. This makes it hard(er) to find excuses as to why the test suite is not complete.....but still I hear all sorts of great excuses reasons justifications misc BS. Actually thinking about that I should probably post a couple of others ( which looks to see if the test suites are complete and run which does the obvious).

      It never ceases to amaze me how a seemingly trivial change in the behaviour of a given function can cause so many unexpected side effects. Good tests save much pain and embarassment.




      Why not find the 'guilty' party, pair with 'em, write the new failing test and then work with them to write the fix? That way you let them know you know that there's a problem, but you're also taking the pressure off them by solving the problem together.
        Why not find the 'guilty' party, pair with 'em, write the new failing test and then work with them to write the fix?

        That'd be the right thing to do if the team was collocated. Unfortunately, this is a distributed project.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://287890]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2018-02-21 01:52 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (274 votes). Check out past polls.