* * * * *

                   Okay, so it was a slip of the fingers …

Okay, I think I squashed that bug.

If you've been browsing this blog between 11:00 pm yesturday to around 1:30
am today (Eastern time that is) then you probably noticed a bunch of
duplicate entries. This was caused by a bug in the new feature [1] I added
today (okay, technically yesturday).

What happened is that the program would add the entry, and notify Weblog.com
[2] and it was in the cleanup code of that feature (after it had already sent
the notification to Weblog.com) that it would crash. This caused the mail
server (since I use email to update this journal) to think the message had
not been delivered and therefore queue it up for delivery later.

And basically, every entry made since this new feature was in was still in
the queue trying to be delivered successfully.

So much for my programming prowess.

The code (C—I program mostly in C) in question was:




       int UrlFree(URL *);

       /* ... */

       URLHTTP url;

       /* ... */

       UrlFree((URL *)url);


UrlFree() takes a pointer to a URL (Universal Resource Locator) and here I
was passing in the URL directly, but because of the cast (since URLHTTP is
based off the URL datatype but due to the lack of actual objects in C, I have
to cast) the compiler let it slide.

And please, no “Why didn't you use Java?” or “Why not C++?” or even “What?
You didn't use Perl?” I freely admit to being a C bigot and I like my
language to remain standard, unlike C++ (which until what? Only last year got
a standard?) or Java (what classes did Sun change this week?) or even Perl
(Perl 6 is just around the corner, and it's nothing at all like Perl 5 … heh
heh heh). I have better things to do (like chase bugs it seems) than to run
after ever shifting languages.

Besides, is there anyone else that talks about bugs in their software?

[1] gopher://gopher.conman.org/0Phlog:2001/11/13.1
[2] http://www.weblog.com/

Email author at [email protected]