Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Friday June 28, 2002
10:38 AM

Countdown - 2 days

[ #6044 ]

Nothing new to report. I just got in to work about half an hour ago and there is no frantic email or phone calls. All of our unit tests pass, but in the mad dash to finish things before the boss hit the airport, we skimped on quite a few tests. We've tagged this revision, so it's time for me to start some refactoring and getting to some of the tests that I didn't have time to get to.

Oh, and I discovered that debugging SQL under pressure is not my strong suit :) I had some hideous errors in my SQL that I would laugh at in anyone else's code (and have, I might add). Time for me to stop laughing.

My physical exhaustion is mitigated slightly by my hitting the sack last night at about 9:00 PM, but I can still feel it. I ache.

And here's a free tip for those of you in a similar situation: it's a rotten time to quit smoking. I'm on the patch and have only had 3 cigarettes in the past 3 days, but it's rough.

Other random things of note: you can never have enough tests. Much of the acceptance testing was done by hand ("Ovid, why does the system crash when you void an item that's not on the receipt?"), but the unit tests were all done through Test::Harness and Test::MockObject. Here's my quick hack to run all of the tests in the t/ directory (while skipping any tests listed on the command line -- I told you it was a hack :)

#!/usr/bin/perl -w

BEGIN {
  chdir 't' if -d 't';
}

use strict;
use Test::Harness;

my @files = glob "*.t";
my @tests;
foreach my $file ( @files ) {
  push @tests, $file if ! grep { /\Q$file\E/ } @ARGV;
}
runtests( @tests );

And our tests all reside in the t/ directory which is in our modules directory. Here's the top of all of our test code (written by the other programmer):

#!/usr/bin/perl -w

BEGIN {
  chdir 't' if -d 't';
  unshift @INC, '../../';
}

use strict;

This is nifty because it allows us to test individually, through Test::Harness, skip bad tests, run from either the module or test directory, and, in short, gives us a lot of flexibility in just getting tests done. All in all, I'm a convert to testing. We never could have this done without it.

Sunday is zero day -- the day we have to wrap this up. Monday, the system goes live. Of course, maybe I should have upped my countdown by a day. If you think of this as an "one off" error in my journal, how can you possibly expect me to get it right in my code? :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.