Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Winning people over to better development practises

by dragonchild (Archbishop)
on Mar 13, 2006 at 17:56 UTC ( [id://536324]=note: print w/replies, xml ) Need Help??


in reply to Winning people over to better development practises

You're being waaaaay too complicated, and you missed the point. The point behind all these practices has nothing to do with the initial product. It's all about managing change.

If you never had to change your program, does it really matter how well it's written? Do you really need the test suite? ... No, not really.

Here's a very simple way to get someone to understand the power of test suites:

  • Grab a copy of CGI.pm off of CPAN
  • Ask a coworker to add a small, but non-trivial, feature.
  • If your coworker isn't Lincoln Stein, they will go goggle-eyed
  • Offer the test suite and ask them if having it makes them feel better about making the change.
  • Don't say another word.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Winning people over to better development practises

Replies are listed 'Best First'.
Re^2: Winning people over to better development practises
by simon.proctor (Vicar) on Mar 14, 2006 at 10:15 UTC
    Yeah I figured I was. However, I wanted to get everything down in first and see if I was missing the point or was simply off the mark by a few points.

    Your method of understanding test suites is a good idea but sadly would not work where I am. My co-workers would simply make the change and then shotgun debug until it worked. It wouldn't even be a concern except when explaining why its taking so long to make the change.

    I see your point about change but not about the test suite. After all, in our environment we need to prove it will work and it won't crash. But still - that is just my opinion :).

    Thanks!
      Your method of understanding test suites is a good idea but sadly would not work where I am. My co-workers would simply make the change and then shotgun debug until it worked. It wouldn't even be a concern except when explaining why its taking so long to make the change.

      Take a look at the source code for CGI.pm. You can see it here. Then, tell me that again. :-)

      Seriously, this method has worked in the past. It's kinda my big gun when nothing else works.


      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

      The point of Test suite is that it proves that it will work. If the test is not working a with a particular value( for example). Then you write a test to prove your point and then they will have to fix it. Once you have a test, you will always keep the test because that will be validation that any code changes that they implement will work.

      They way you are doing things, without a test suite, you only have two things which say your code works. Your co-worker says that it works and that your program does not crash. How do you know that it works correctly? Suppose your program puts a NULL value into database instead of ''? Your program may not crash but that does not mean it is doing the right thing.

      Think of it another way, if CPAN did not have any tests, do you think that Perl would be anywhere near where it is today? There would be no way of verifying if there was a bug with a particular version of Perl, or Linux, or a module. Your program would keep crashing and you would have no easy way to determine where you have a bug.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-16 14:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found