The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Wednesday, March 20, 2002

The Offending Program

So, what was the ofending program?

Glad you asked (whince).

It turned out to be mod_blog, the program that runs this very site.

A friend of mine (who for now wishes to remain anonymous) is interested in blogging and I said I would set him up with my system. So I create a site for him, copy over my existing template, modify the configuration for him, etc., etc. I then send in (via email) the first post to see if things work.

Well, that's where things didn't work.

The post itself was accepted and stored correctly.

Small digression: The Boston Diaries is primarily dynamic. You type in something like http://boston.conman.org/2002/3/4 and that page is generated on the fly. I change the template, the effect takes place immediately. However, the main page, the one you get by going to http://boston.conman.org/ is not dyamic—it's actually a static page recreated whenever a new entry is posted. It doesn't have to be, but I figure that since this page is probably going to be loaded most often I might as well cache a static copy to keep the system load down.

So, part of the process of accepting and storing an entry is the generation of the main page. Normally, it works fine. But not in this case.

Another small digression: the configuration file for mod_blog needs the starting date of the blog. There are cases where I need this information and instead of wasting a lot of time going backwards from now finding the first entry, again, it's cached information.

I had thought that I may have made a mistake in the starting date. No, I got the starting date correct. What I didn't get correct was handling the situation when a blog is actually started.

When writing the software, I had already been keeping entries. In fact, I think I had a month or so worth of entries when I started the code two years ago. And I was so focused on getting the URL processing correct, that I neglected to test some border cases. And I never got around to testing those cases since they didn't affect me.

Until now.

Oops.

Problems I found:

  1. Not handling the case when there are no entries.
  2. Not handling the case when there are fewer than X days worth of entries (where X is the number of days to display on the main page).
  3. Not handling the case when there are fewer than 15 entries (note—not the same thing as having 15 days worth of entries, and this is for the RSS file).
  4. And one or two cases of not checking to see if you've past the first entry or most current entry.

Cases I should have handled (and tested for!) but neglected.

I do need to really go through the code and clean it up.

The problem I had was that I'm a bit too close to the code. I'm working towards a specific goal (new method of document storage retrieval and reference) and as such, the software is experimental and the problems I'm focusing on meant I missed some reliability details elsewhere, since hey, it works in my case.

And while some people have probably grabbed the software I doubt many, if any, are actually using the software since I'm not getting any feedback on the code itself. Okay, you do have to hunt around to find the link to the source code but it has been downloaded. And I'm sure it being written in C makes it all that much more popular.

But little did I expect software I wrote to crash a Unix server. The last time I saw userland software (an application) crash a Unix server was … oh … eight years ago I think.

Obligatory Picture

[The future's so bright, I gotta wear shades]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.