Archive for August, 2007

let’s dance to Joy Division

I sang the praises of The Wombats a while ago, although at the time the hype kaleidoscope had me confused about whether they were up & coming or come & gone. I thought they were the latter; it turns out that they’re the former. And, judging by how frequently they seem to be popping up in my RSS reader, it seems like their debut full-length might be pretty big.

So here, have a couple of songs from them. The first is their most recent, I believe, and has a title that seems likely to intrigue at least a few of you.

The Wombats – Let’s Dance To Joy Division

And then there’s this, which I think is a better song, but isn’t quite as new:

The Wombats – Backfire At The Disco

Other hypem-worthy tracks: “Patricia the Stripper”, “Moving to New York”, “Sunday TV”.

UPDATE: Hmm. This version of “Backfire At The Disco” is the one that I find a bit grating (it’s from the CD single instead of Girls, Boys & Marsupials. I’ll try to find the good one.

love like fire

I heard this on WOXY and liked it, despite WOXY being unusually sucky today (Nickel Creek!? WTF?):

Love Like Fire – Unlighted Shadow

They’re streaming the entire EP over at their website. And they’re using the XSPF player to do so, which means that command line trickiness could be employed to grab the whole thing, if you were so inclined.

is unlocking the iPhone legal?

Cord Blomquist wonders this, among other things, over at Tech Liberation, saying:

Does AT&T, Apple, or both companies have a legal case to bring against the hackers? Likely.

Actually, it’s pretty hard to say right now. There are a few types of legislation that are relevant here. The first is the odious DMCA, a law that forbids device owners from circumventing “technological measures that control access to copyrighted works”. Copyfighting geeks feel that if you buy a device it should belong to you and you should be free to do with it as you please. If the vendor set its price with the assumption that you’d be stuck buying ringtones or printer ink or razorblades exclusively from them, well, too bad. The DMCA provides legal protection for the aforementioned business model.

However, unlocking a cell phone happens to be a special case: it’s one of six current exemptions to the DMCA granted by the Library of Congress.

Computer programs in the form of firmware that enable wireless telephone handsets to connect to a wireless telephone communication network, when circumvention is accomplished for the sole purpose of lawfully connecting to a wireless telephone communication network.

Apple may still have some claim against the iPhone hackers. That’s because circumvention devices typically employ code that’s the property of the device designer. Unless I’m mistaken, the DMCA exemption doesn’t grant anyone the right to use or redistribute others’ code. It’s also possible that circumventing the protection may necessitate the violation of patents held by the device designer.

A similar situation exists in the world of Xbox modding. Until recently it was easy to buy a modchip online. Properly installed, this allows you to turn your Xbox into a device that can run Linux, emulate older consoles, or act as a media center (and, yes, you can play pirated games, too).

But you can’t do this with the chip when it first arrives in the mail. Although the device is (or was) legal on its own terms, it couldn’t unlock the full potential of the Xbox without running custom firmware — firmware that was based on code to which Microsoft owns the copyright. Consequently most modchips shipped with a firmware based on Linux called Cromwell. This was built without using copyrighted code and could be legally distributed. But it wasn’t capable of doing much besides booting Linux and replacing itself with new firmware loaded from a burned CD.

If a modchip user wanted to use his or her Xbox for other applications they’d have to hunt through the wilds of IRC to obtain the forbidden firmware. In fact, the chips would ship with detailed instructions about soldering and firmware replacement. But when you got to the part about finding alternate firmware, the manual would adopt a “you didn’t hear it from us” sort of tone and direct the user to various websites and chatrooms that the chip manufacturer insisted weren’t at all affiliated with their operation.

It’s all a bit ridiculous. But this is the situation that Xbox owners faced, and one which may be applicable to iPhone owners, too. Until the courts or congress decide exactly what ownership of an electronic device means we’ll increasingly find ourselves in these strange legal landscapes.

unfoggedbot source code

For the few who might be interested, I’ve put the code to the unfoggedbot up over at EchoDitto Labs. I’ve made various improvements since the initial version — it now daemonizes, for example. If you’ve got any questions, feel free to get in touch with me.

And with that done, I hereby promise to lay off the source code releases for a while.

alternate status hierarchies

I agree with everything Megan says here — well, except for the Asperger’s bit, which I’m reflexively averse to. Jason, who’s freshly back from PAX, studies questions like this one in the course of his research. I’d be curious to know what he’s got to say about it.

Freakonomics full-text feed

I almost forgot: a little birdy tells me that you can find a full-text version of the recently-bowdlerized Freakonomics RSS feed at the following URL.

http://feeds.feedburner.com/freakonomics-full

At the moment, the authors are asking a very good question: why are we eating so much more shrimp than we used to? Shrimp just isn’t very good relative to other seafood. But it’s everywhere.

Being the sort of blog that it is, I’m sure that the answer will be “because aquaculture and/or other factors have made the margins on shrimp much better”. I think the other half of the answer, likely to remain unblogged elsewhere, is that Americans are squeamish about seafood that tastes like seafood, and you can’t order chicken every time you go to Applebee’s.

a little more on migrating from Typepad to Movable Type

I realized I might as well post this script, too. Say you’re moving from one host to another, and the source exports to the MT/Typepad format (a big long text file) and the new host can read that format (WordPress can, and of course MT/Typepad can).

You’re facing a problem: your entries’ text is probably littered with images and links pointing at your old domain. Those links are presumably going to become dead sometime after the transition; you’d like to rewrite them to point at the new domain. You’d also like to download any images, PDFs or other digital assets that they point to, then upload them to the new server.

Well, here’s a script that you can run against the exported MT/Typepad file:

#!/usr/bin/perl
my $url, $rewritten_url;
while(my $l = <>)
{
while($l =~ m/(href|src)=['"](http:\/\/beutler\.typepad\.com\/.*?)['"]/i)
{
$url = $2;
$rewritten_url = $url;
$rewritten_url =~ s/http:\///igx;
if($url =~ m/\.(html?|php)/i)
{
$rewritten_url =~ s/^\/beutler\.typepad\.com\/home//igx;
$rewritten_url =~ s/\.(html?|php)$/\//i;
}
else
{
my $prefix = $rewritten_url;
$prefix =~ s/^\///;
$prefix =~ s/\/[^\/]+$//;
`wget -q --directory-prefix=$prefix $url`;
}
$l =~ s/$url/$rewritten_url/gx;
}
print $l;
}

If you saved this file as rewrite_entries.pl, you’d run it like so:

cat MT_EXPORT_FILE.txt | ./rewrite_entries.pl > MT_EXPORT_FILE_REWRITTEN.txt

You’d end up with a new text file (which is the one you should import) and a subdirectory full of images and PDFs that you’ll want to FTP up to your new server. There’s some Brian-specific stuff in the above script, but it shouldn’t take very much work to adapt it to a different site.

cleanly redirecting users from your old Typepad site

Here’s a sort-of-interesting problem I’ve been working on recently, and which might help prevent an internet stranger or two from pulling their hair out. When you’re moving from one blog to another, how do you set things up so that folks stumbling across your old site are sent to the new one? This came up while Emily and I were working on Brian’s new site. His existing Typepad site had URLs like this:

http://beutler.typepad.com/home/2007/08/rove-the-erudit.html

I knew that I wanted to clean up the formatting of these a little bit — for one thing, the .html would have to go, as I intended to use some PHP in the pages (on a web server with a standard configuration, only files ending in .php or .php5 are processed for PHP). And that “/home/” seemed extraneous, too.

I did try to make the two similar, though, to simplify things. By default Movable Type creates its URLs from the entry’s title, transforming it into a unique identifier called the basename. I altered MT’s default basename length so that it was 15 characters, matching the length of Typepad’s basenames. I set up the new mapping in MT’s Settings/Publishing area, and ended up with new URLs that looked like this:

http://www.brianbeutler.com/2007/08/rove_the_erudit/index.php

The index.php on the end can be left off — if you ask a Linux web server for a directory, it’ll look for “index.php” or “index.html” or “index.htm” and send it back if it finds it. This lets you have slightly tidier-looking URLs. So our new URL is actually:

http://www.brianbeutler.com/2007/08/rove_the_erudit/

With the format settled upon I was able to write some code that sits on every page of Brian’s Typepad site. When a user arrives the page looks at its URL, applies a set of transformations to rewrite it into the new format, and sends the user to the result. Normally you’d want to do this in a server-side script or .htaccess file, but as far as I can tell Typepad doesn’t let its users have that level of control. So I had to put it in some Javascript that I added to Brian’s Typepad template:

<script type="text/javascript">
location.href = location.href.replace(/beutler\.typepad\.com/,'www.brianbeutler.com').replace(/\/home\//,'/').replace(/\.html$/,'/').replace(/\-/g,'_');
</script>

This looks complicated, but it really just does a few things to the URL (whatever the URL may be):

  1. Replace “beutler.typepad.com” with “www.brianbeutler.com”
  2. Replace “/home/” with “/”
  3. Replace the “.html” at the end of the URL with “/”
  4. Change all hyphens in the URL to underscores

It then sends the browser to the new URL.

Done! All I had to do now is deliver the website, lean back and adopt an attitude of extreme self-satisfaction.

Except… no. I wasn’t done. Everything was actually much, much worse than I thought.

More »

$7 for a Wii modchip!?

Man that’s cheap. I suppose you do need to buy a special screwdriver, too. Still!

UPDATE: Having read a bit more on the subject, it seems very likely that this is a clone of the WiiKey rather than the original chip. That wouldn’t normally be a problem unless you were really counting on getting a holographic sticker with your order. But the clones don’t come with firmware preinstalled — you have to download it from the WiiKey website, burn it to a disc and run it in your modded Wii, thereby loading the code on the chip. Unfortunately, Nintendo released a firmware update to the Wii a few weeks ago that made the disc format in which the firmware is encoded nonfunctional. This appears to be a temporary problem — folks have already figured out how to remaster Wii discs so that they can boot. But the WiiKey people haven’t yet repackaged their firmware in a format that will work on updated Wiis.

So if you have an official WiiKey chip you already have firmware loaded and are fine. If you buy a clone you’ll end up waiting for WiiKey to release a bootable upgrade disc. It’s not a big deal, really, but I wouldn’t want you to end up marooned. The genuine chip costs about $20 and can be acquired from the vendors listed on the WiiKey website.

comment feed: finally fixed

To the one or two people who actually use the comment RSS feed: rejoice! I finally fixed it so that entry titles and links work properly within it.