SCTV is on the air!

If you can see this, you’ll have discovered (but probably not noticed) that the URL has changed. I finally broke down and paid for the peterjanes.ca domain. What’s more, I went all out and bought hosting space… no more personal-PC-as-webserver for me (though I’m still running Linux as my desktop and have no plans to change). Most of the content from the old site is here–the important stuff, anyway, like my fan site for Lenni Jabour and The Third Floor–and anything that isn’t probably won’t be unless it’s actually requested (ha! like anyone ever looked at my old site). There may be some broken links that I haven’t caught up to yet, so if you find one please leave a comment below and I’ll deal with it.

RSS folks, you’ll want to update to the new feed ASAP. (Geek RSS folks, note that an Atom feed is coming soon!)

I almost forgot to mention: Lenni and friends will be performing at the Rivoli on Tuesday, July 22, with select material from the upcoming musical Songs From The Third Floor. Huzzah!

Unpleasant

I’ve just experienced the most unpleasant exchange of e-mail I’ve ever had. The details are of no interest to anyone other than myself and the other party, and I’d say nothing about them or that person even if they were. It shall suffice to say that I was physically shaking with anger by the end of my last message; anyone who’s had any dealings with me knows it takes a lot to make me lose my cool. I can only remember being upset to that extent twice, or perhaps three times, in my 31 years, and it’s not an experience I relish.

I’m proud, at least, that I was able to keep my response professional and polite while conveying the depth of my displeasure in no uncertain terms.

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