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

Re: Re: Perl Style Guides for Large Projects

by strider corinth (Friar)
on Nov 01, 2002 at 15:22 UTC ( #209744=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Style Guides for Large Projects
in thread Perl Style Guides for Large Projects

Also, in order for your tests to be worth beans, write them before you write the code they test. If tests are written after the code, knowledge of the code's functioning will tend to taint the tests, making them much less useful. When you code your tests in advance, you can be sure they're right.
--

Love justice; desire mercy.
  • Comment on Re: Re: Perl Style Guides for Large Projects

Replies are listed 'Best First'.
Re: Re: Re: Perl Style Guides for Large Projects
by tachyon (Chancellor) on Nov 08, 2002 at 23:09 UTC

    In a perfect world so it would be, however test written after the fact can be invaluable and are better than no tests at all. They come into their own every time you change a single character in your code. It never ceases to amaze me how often seemingly benign changes can have unforseen side effects. It is alway reassuring to be able to make a change, run the tests and KNOW that you have not broken anything by accident.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      Hehe. Fair enough. Today was something of a case in point. =)

      I tend to make things seem black and white when I don't really think they are. Tests written before the fact are the ones I find most useful, and I think it's one of the best programming disciplines to make a habit. When specs change, of course, the tests have to change too. And I agree, it is possible to create tests after the fact which are written to spec and don't take the code into account. They're certainly better than nothing.
      --
      Love justice; desire mercy.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://209744]
help
Chatterbox?
[1nickt]: you are missing an entire element, which is that your base ticket price only gets you a middle seat. If you want to be window or aisle you must pay, or gamble that you'll be assigned there at ...
[1nickt]: ... flihght time (hoping that not enough others have paid and there are some "good" seats to be allotted.
[1nickt]: And this is in addition to paying extra if you want to be in the first 12 rows, or in the emergency exit row.
choroba was once seeted besides a guy that was so fat he was almost squished between the guy
[holli]: I'm surprised there is not an entire genre of "fat guy on a plane" jokes

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-12-18 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (486 votes). Check out past polls.

    Notices?