Entries from January 2003 ↓

Round them up, put ‘em in a field, …

4 hours is enough time to watch a good film and have a good meal.
It’s also just enough time to find a very annoying bug.

My script wasn’t inserting all its stuff into the database, but it was inserting part of it so I knew it wasn’t a database connectivity problem; it was also reaching the end without complaint, so I knew it wasn’t dieing somewhere. It thought it was doing the right thing.

The code looked correct, and I had similar scripts that worked, so I starting cutting bits off (the code). Eventually I had two scripts, one working and one failing, with the following diffs:

-my ($username) = "marty" or exit 65;
+my ($username) = ($rcpt =~ /(\w+)\@$MX/) or exit 65;

Now I knew I would be here for quite a while: someone somewhere in the code was using one of those irritating regex variables without checking if their match had actually worked! AARGH!

The offending code looked something like this (I’ve simplified it so it won’t distract from the bug):

    $text =~ m/:(\w+);|==(\w+)==/;
    return $+;

So, when $text was "foobar", the match failed and $+ still contained the last bracketed part of a previous unrelated match.

The code should have been something like:

    $text =~ m/:(\w+);|==(\w+)==/  or return;
    return $+;

I do try to be thankful in all circumstances: I’m glad I was using Free Software that I can debug and patch.

TyreServe can’t

New Year’s Eve, somebody slashed 3 of my tyres while my car was in
a car park in Belfast. We suspect it might have been the car park staff, but we
can’t prove that.

I phoned the AA and they sent someone out
to take us home, with car; they tried to get replacement tyres, but couldn’t
find any.

I phoned them early yesterday morning to see if they could help, and
they arranged to send TyreServe to help.
TyreServe phoned me back and promised to be here at 11:30, so I waited.

At 11:30 TyreServe phoned again and said they were on their way. 25 minutes
later the TyreServe man in the van phoned to say he was about 15 minutes away.
I asked where he was, and he said he had just left the M6. This concerned me,
as we don’t have an M6 in Northern Ireland! I explained this to him; he sounded
confused and promised that someone would get back to me. They never did.

I called the AA again, told them what had happened, received more empty
promises, complained, waited until 14:00, and then got the train.

TyreServe suck!

This morning I phoned ATS who
promised to fit my new tyres at 9:30, and they did. I also discovered that
the AA used to ask ATS to fit tyres until they bought TyreServe.