Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (13)
As of 2019-12-06 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (156 votes). Check out past polls.

    Notices?