Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: A danger of test driven development.

by cbrandtbuffalo (Deacon)
on Oct 03, 2005 at 12:38 UTC ( #496895=note: print w/replies, xml ) Need Help??

in reply to A danger of test driven development.

Another antidote to tricky tests or code is another pair of eyes. If I have two contradictory pieces of information that I know are both correct (the code and the test, but they disagree), I'll often grab someone else and have them take a look. If you have a spec you're working from, you can also have someone take a quick look at the spec and test and see if they agree that the test is doing what you think.

We also have code reviews for all new code and we often find tests and code that are incorrect.

It's true that the passing test can give you a false sense of security. Having someone else review things can help.

  • Comment on Re: A danger of test driven development.

Replies are listed 'Best First'.
Re^2: A danger of test driven development.
by Perl Mouse (Chaplain) on Oct 03, 2005 at 12:52 UTC
    True, however, I wasn't convinced both pieces of code were correct. I thought the test was correct, and since I just wrote the code, I assumed the code was incorrect. As for another pair of eyes, I've many coworkers, and they all are good coders, but they're all fluent in a subset of shell, awk, C, Java, .NET, Python, FORTRAN, Dingo, and C++.

    Good advice, but it wouldn't have helped me.

    Perl --((8:>*

      Tell that to the teddy bear. Literally, explain the code to a teddy bear or anyone who happens to be passing. Just the act of talking a problem through often clarifies the issue. If your cow-orkers have even a little programming experience that will help a lot.

      Not telling the teddy bear is not an excuse.

      Perl is Huffman encoded by design.
      A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://496895]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2020-11-24 04:41 GMT
Find Nodes?
    Voting Booth?

    No recent polls found