Off vacation

Normally, when I take a trip, I can’t wait to get home. After just a few days, I long for the familiarity of my own bedroom and house…. This time… I felt sad that our road trip… was over. I felt sad that we had to return to all the frustrations and injustices of our regular, everyday life. I wish our trip could have lasted all summer.

If you’ve got someone in your life who you adore, you simply must spend 2000 miles with them. You’ll be glad you did.

Wil Wheaton, [wil@roadtrip]$ cd /home/wil

Uh-uh, dude

Just got hit by a poorly-behaved bot, apparently something to do with this, which I’ve banned outright. Let’s look at what it did wrong to deserve this:

  • It doesn’t have a User-Agent string.
  • It doesn’t send a valid Accepts header (it was trying to retrieve an RSS file and got HTML).
  • It doesn’t recognize <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>, instead attempting to parse it like a link.
  • It doesn’t attempt to throttle its requests or recognize duplicates or errors, making over 30 requests in 8 seconds to 6 URLs, only two of which are valid at all or referred to in links from the files it did retrieve.

MT file handling

I’ve been playing with Movable Type for a few weeks, trying to figure out how to associate uploaded files with individual posts, or even just an automatic way to place new files in a templated directory, and it doesn’t seem to be possible. The main problem appears to be that MT doesn’t really do files: the model is what I call accept and forget, which means it doesn’t care if you accidentally overwrite picture1.jpg uploaded two months ago with picture1.jpg taken today.

I suppose the reason I’m disappointed is partly because I’ve been thinking of MT as a content-management system, when all it is, really, is a weblogging tool–a very capable and flexible one, granted, but still just a tool. Given that Six Apart distribute it, uncrippled, for free, I hardly have a basis for complaining. It will be interesting to see if Movable Type Pro handles this any better, although based on Six Apart’s press about TypePad (features of which will be backported to MT Pro) I suspect it won’t.

Maybe I’ll need to take Tim Bray‘s advice after all: If you’re a programmer and you have a blog… buckle down and write the code yourself.

Movable Type trick

One of the (many!) nice things about Movable Type is its customizability. I didn’t realize just how far that extended until today.

I’d read previously in the MT UI that you can customize the output path for the archive files using Archive File Templates, and I’ve done so to provide more usable URLs based on the page title since just after I started Petroglyphs. Recently, I wanted to do a similar thing for another site, except that not all of the entries are guaranteed to have titles. Using my existing template, <$MTArchiveDate format="%Y/%m/%d"$>/<$MTEntryTitle dirify="1"$>.html, didn’t work because I wound up generating filenames like .html, but for a number of reasons (not least of all this) I didn’t want to add arbitrary characters or otherwise change the template.

MT plugins to the rescue. Brad Choate has written prolificly on MT, and developed a number of useful plugins that I’ve dutifully installed. The one that solved this problem, and made me appreciate MT more, is his MTIfEmpty. Basically what this does is check an expression–most often an MT tag itself–to see if it’s empty; the plugin also includes MTIfNotEmpty to do the opposite.

As it turns out, MT lets you use tags defined by plugins almost anywhere, not just in your page templates. (The one exception I’ve found is that you can’t use any tags directly in your entries–even built-in ones–although I’ve found a workaround for that too using another of Brad’s tools.) The practical upshot of this is that you can use plugins in your filename templates.

So without further ado, I present the template above, modified to use the filename untitled when appropriate: <$MTArchiveDate format="%Y/%m/%d"$>/<MTIfEmpty expr="[MTEntryTitle dirify='1']">untitled</MTIfEmpty><$MTEntryTitle dirify="1"$>.html

Quiet period 2

My self-imposed, somewhat accidental quiet period continues. There’s another reason now, about which I’ll say nothing more than it has to do with something from the There section of my homepage moving to the Here section… although it won’t really be here, exactly. More on that when it’s the proper time.

Cursive cursed?

Presented without comment for your perusal:

[Founder of Google Larry] Page: I’ve been waiting for them to start teaching searching, alongside spelling, in school.

…I can tell you that if my kids didn’t know how to search the Internet, I’d be worried. It’s a basic skill along with reading, writing and calculating.

Ernie the Attorney, via the shifted librarian

They’ve got good handwriting now, and they love cursive, Bolton says as her students filter in from recess. But it wouldn’t surprise me if they just walked around with their little keyboards and typed everything a few years from now.

Rachel Konrad (CBS), Penmanship: A Dying Art?”, via Slashdot

Quiet period

Not that all y’all (or even just y’all) care, but there are a few reasons for my recent lack of online presence.

Last weekend I went to Ottawa with my family to attend my brother’s convocation from the University of Ottawa. It was a fairly standard ceremony, enhanced by two facts: that it was held at the National Arts Centre, and most of all that it was my baby brother (if you know him, you’ll know how wrong that term is, and why I can’t call him my little brother either) walking across the stage. Congratulations Ed!

I actually have a couple of entries in progress, but haven’t found the time to finish and post them. One is a public posting of my response to a request my parents made–it’s been in the works since May 14–and the other is, ironically, all about my love of time. (It’s not started yet, but I want to put something up about touristy stuff in Ottawa.) Soon, my pretties, soon.

Things have been busy at work, and (horrors!) as a result I’ve been disinterested in doing anything on the computer at home. Yes, you read that right, and no, I’m not feeling particularly feverish, but thanks for asking.

And finally, I’ve spent more time talking, e-mailing and chatting with Jess in the last few weeks than with anyone else I’ve ever known. I’d blog some of our conversations, but they go too quickly and too long for even my 120+ wpm fingers to keep up… well, that and I get too involved in the discussions to be distracted by the browser, which to my mind is a Good Thing. Ain’t it funny how things will happen when you least expect them to?