I just spent some of the afternoon rewriting a chunk of the ongoing code. If anything’s broken, do let me know. Read on for some notes on the process and the technology.

I was forced into doing this because a little breakage had crept in to the individual date pages like this one, but mostly because the whole thing was slowing down. It was taking fifteen seconds or so to proof a piece, which doesn’t sound long, but then I tend to proof each one somewhere between three and thirty times, depending how obsessive I’m getting; so it was adding up seriously.

After the fixup, a proof takes less than five seconds (and that’s because it’s recreating the whole date hierarchy each time, so I’ll crush that next time I get irritated), and as a side-effect I improved some of the date/category pages and even found a well-formedness botch that was creeping into a few corner cases. A few general points occur to me:

First, I should have done this months ago, I’ve probably wasted a couple of days in aggregate while I was staring blankly waiting for something to proof. But this is the classic boiled-frog scenario, which is all too common in software. Any system that is O(N) tends inevitably to degrade in performance, but in a slow and thus pernicious way that leads to people wasting a lot of time because they’ve forgotten that things used to be a lot faster.

Second, whacking away on Perl code is a rude shock after my recent work in Java and Python and Ruby. Perl 6 really needs to be damn good. But boy, it’s fast; when I saw what the code was doing, it’s astounding that it completed in fifteen minutes let alone fifteen seconds. Perl will never go away because if it did, the Internet would basically shut down, there’s too much that depends on it. But refactoring is in order.

The source files I edit, that get transformed into what you read, are well-formed XML; I know that because the publishing system throws them on the floor otherwise. But at the moment, there aren’t any checks on the output of the publishing system, so ill-formedness can creep in, and has on occasion. I think I really must fix that.

author · Dad · software · colophon · rights
picture of the day
September 22, 2005
· Technology (87 fragments)
· · Coding (98 more)
· · Web (393 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.