Moving day… yesterday

Yesterday was quite a hectic day for me. I had to move all my stuff from the room I’ve lived in for the past 9+ months to one down stairs and one tier over. This actually involved getting rid of a bunch of stuff that I’ve collected. Some of it I mailed home (been working on that over the past month anyway), some I gave away, and some I just threw out. My old room is now completely empty (OK, minus a couple items I still have to sell and a person who I don’t think I can sell). So now I’m living with two people I never really talked to before this move (one of which I never even met, the other I’ve seen maybe a dozen times). We’re all on different sleep schedules. As I type this post, one of my roommates is sleeping. When he’s ready to get up, I’ll be sleeping. When it’s time for me to get up, my other roommate will be in here sleeping. There are a few hours in the morning that don’t have a sleeper in here, but those are while I’m at work. Oh well, guess I’ll either be really quiet for the next month (or so) or I’ll never be in my room.

The Road to Bugzilla 2.18

We’ve been promising version 2.18 of Bugzilla for ever, it seems. I’ve only been back for a short time, but I can find emails and bug comments dating back quite a while that suggest 2.18 would be out any day. I, for one, think that it’s about time we actually made that final push. As has been suggested before, review seems to be the major hold up. Because I’ve been out for so long, I don’t feel comfortable giving review on complicated patches, but I can give review (and I’ve done it) on simple, focused patches. What’s really needed is people who are very familiar with the current Bugzilla code-base to push those final few patches to their conclusion. To help people out (to include myself), here’s some queries that give information about 2.18 blockers (number in brackets are counts as of this writing):

The 1 bug that appears to be ready for checkin was just checked into the tip, but the patch doesn’t apply to the 2.18 branch. There’s also two bugs on the blocker list that don’t fit any of the other queries. Bug 275408 is in need of a patch and bug 150149 is for the release notes. I couldn’t find a query I was happy with for these.

Bayesian Filtering for Comments

Bayesian filtering for MoveableType? I didn’t even know such a thing existed! I found a plugin written by James Seng. At the time, I was actually looking for one of those little images that aren’t OCR readable and the user has to type whatever’s in the image (I’ve since discovered that’s called captcha and is implemented using the SCode plugin). I knew that this method introduced usability problems for the visually impaired and people who use text only web browsers, but I felt that it was a fair trade off in order to stop SPAM. But, in the process of looking for this, I figured I may as well look at other solutions, too (especially considering that GD isn’t working on my machine right now). Wouldn’t you know it, I found one I liked even better. I’ve liked the theory behind Bayesian filtering every since I’ve read Paul Graham’s A Plan For Spam. Mozilla Thunderbird uses this method of filtering, and while at first it’s quite inaccurate, it gets better with time (actually, with a larger sample of both good and bad stuff). Anyway, I’ve now implemented this method for comments on this site. I should now be able to re-open all my entries to comments, undoing the change I made back in November 2003.

Facelift For My Weblog

Minor though it may be, I’ve now given my blog a bit of a face lift. The design itself is still pretty much the default from MoveableType, but I’ve done a little more with colors. I also added a little bit of Mozilla specific CSS. While the page is certainly still functional in Internet Explorer, it looks better in Mozilla based browsers. CSS really is a beautiful thing once you figure out how it works (I remember it taking quite a while for me to even want to make the transition, let alone actually do it… I probably still haven’t, completely). In addition to the front end improvements, I’ve also made a couple on the semi-backend (eg, not the MT code, but not just CSS). I finally figured out how to make it so links show up in syndicated versions of this blog (this was quite a problem in my last post). In case you’re curious, it was as simple as changing <$MTEntryExcerpt encode_xml="1"$> to <$MTEntryBody encode_xml="1"$> in the RSS templates. That also has the side effect of having the entire post be syndicated (at the option of the syndicating site) instead of just the first few characters. The other backend thing I did was made the new archive pages (’03 and ’04) much easier. Using a template modules and include statements, I was able to greatly reduce the amount of “code” required to make a calendar. In fact, all I need is:

<!-- JANUARY_2003 -->
<table border="0" cellspacing="4" cellpadding="0">
<caption class="calendarhead">January 2003</caption>
<$MTInclude module="CalendarDOW"$>
<MTCalendar month="200301">
<$MTInclude module="CalendarDays"$>
</MTCalendar>
</table>
<!-- /JANUARY_2003 -->

That’s still a lot more than should be required had a better templating system been used. It would be nice to have all that layout type stuff in one template module so I could just say something like <MTInclude module="Calendar" month="200301"> and still be able to get my own layout, but I this is still better than what MoveableType uses by default.

UPDATE: I was just looking at the 2004 Archive page. With this entry, I’ve now posted more in the month of December than I have for the entire other 11 months of 2004. Kinda sad, isn’t it?

Abu Ghraib Gets Some Visitors

Visitors to Abu Ghraib aren’t really all that rare. I mean, we get visiting Generals and press members so frequently that sometimes you wonder if they’ve ever really even left. What we don’t get often, however, are famous people. Sure, we’ve had Donald Rumsfeld here last May, but it was a visit by an official. This past August we had Joe Millionaire and the Miller Lite Catfight Girls here, but that still paled in comparison to today. Today’s visitors were: Bradshaw (WWE Wrestler), Al Franken (a comedian), Karri Turner (from JAG), Mark Wills (Country Music Artist), and Darryl Worley (Country Music Artist). As you can see by clicking on the links, I got a chance to have my picture taken with all of them except Karri Turner. I was in line for her autograph/photo-op when time ran out and they had to get on their armored tour bus. While the show was mostly just a consolation prize for being stuck in Iraq during the Christmas season, it was still a nice break from the monotony of prison guard life.

New job for Jake

Ya, that’s right. I’m no longer working in the hospital here. As of about two days ago, I was moved out to the camps. Right now I seem to mostly be seeing the negatives. I’d imagine there are positives, but I’m just not sure what they are. One of the biggest negatives is simple that it’s cold out there. I mean, it’s nowhere near as cold as it is back home at this time of the year, but relatively speaking, it’s plenty cold.

Another issue that will actually effect people who aren’t in Iraq is that my offline computer use time has been essentially cut off. I used to bring my laptop with me to work every night. I was able to use it during the early morning hours when the vast majority of the detainees were sleeping (of course, I still had to pay attention to the ward, but it just didn’t require my undivided attention). The work environment, both from a work tempo standpoint and the actual physical environment, just aren’t conductive to being able to do that. It’s also expressly forbidden by the SOP of the camps. So, all this means that those big patch reviews, like the FAQ overhaul (3 times!!) just aren’t as likely to happen as quickly. I still get a day off every week, but I do normally take advantage of that for sleeping. Some of that time will most likely be devoted to doing Bugzilla patches and reviews (mostly docs), but my apparent availability won’t be nearly as high as it recently appeared to be.

Rescratching My Own Itch

Last July, as in July ’03, I posted about some modifications I made to MoveableType. One thing I had done was a plugin for SETI stats, the other was an actual code modifcation for a “recently archived” sidebar item instead of recently posted. Well, somewhere along the way I seem to have lost that code modification as I noticed my “recently archived” item wasn’t working right. And wouldn’t you know it, I seemed to have made a really boneheaded mistake of not saving the code anywhere! To make a long story short, I figured out, once again, how to do it. It’s my goal to make sure I don’t ever have to spend another couple hours figuring this one out, so I’m gonna post the patch here. As an added bonus, that means other people can use it, too :).

--- Context.pm.orig     2004-12-14 23:11:57.000000000 -0500
+++ Context.pm  2004-12-15 01:15:09.000000000 -0500
@@ -626,6 +626,19 @@
$args{direction} = 'descend';
$args{limit} = $last;
$args{offset} = $args->{offset} if $args->{offset};
+        } elsif (my $days_offset = $args->{days_offset}) {
+            my $sec = 3600 * 24;  # Seconds in a day
+            my $days = $args->{days};
+            my @ago = offset_time_list(time - $sec * $days_offset,
+                $ctx->stash('blog_id'));
+            my $ago_s = sprintf "%04d%02d%02d%02d%02d%02d",
+                $ago[5]+1900, $ago[4]+1, @ago[3,2,1,0];
+            @ago = offset_time_list(time - $sec * $days_offset - $sec * $days,
+                $ctx->stash('blog_id'));
+            my $ago_e = sprintf "%04d%02d%02d%02d%02d%02d",
+                $ago[5]+1900, $ago[4]+1, @ago[3,2,1,0];
+            $terms{created_on} = [ $ago_e, $ago_s ];
+            %args = ( range => { created_on => 1 } );
} elsif (my $days = $args->{days}) {
my @ago = offset_time_list(time - 3600 * 24 * $days,
$ctx->stash('blog_id'));

Mostly it’s a duplicate of the block for $args->{days}, but with some modifications to make it do a starting and ending date. The template block to get this in my sidebar is (I may tweak these number is the future, but it’s just a config option):

<div class="sidetitle">
Recently Archived
</div>

<div class="side">
<MTEntries days="60" days_offset="21">
<a xhref="<$MTEntryPermalink$>" mce_href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br />
</MTEntries>
</div>

This will put any entry from 21-81 old days under the “recently archived” heading. This is, of course, a modification to the version of MoveableType that I’m running, which is version 2.64. If you’re running a different version, your results may very.

It’s Alive

It, in this case, is my Internet connection. I’m happy to report that I didn’t loose anything during my downtime in Galaxies. I guess I didn’t realize that I had paid as much maintenance as I actually had. Lucky me. Actually, the connection came back to life a couple days ago, but I didn’t really get a chance to post about the good news.

Speaking of good news, I recently found out that I should be back home before March. While not nearly as good as I thought it was going to be when I first deployed (eg, home right now), it is still better than it could be. The biggest thing, in my mind, that could become an issue is the upcoming elections. This current schedule has us actually leaving Iraq right around the same time the elections are supposed to take place. Hopefully it won’t effect us. We are, after all, not directly related to security “on the street.”