January 31, 2006

Sometimes, the posts write themselves

A pet shop in Tokyo:

Posted by pmk at 4:03 AM | Comments (1)

January 16, 2006

Dancing Awabi

I ate dinner at an ikesu place in Shinjuku last night. I've written about before ikesu before; the word itself means aquarium, which should give you a good idea of what goes on inside of an ikesu restaurant. You sit down, take a look at the fish swimming around in front of you and pick out one or two that look tasty. You eat the choicest bits as sashimi, usually off the still-gasping carcass of your unlucky meal, and then eat the rest fried, grilled or in soup.

It's a fairly stark reminder of where our food comes from, but eating like that doesn't particularly bother me. If you were going to eat fish anyway, it doesn't seem to make much moral difference if the fish is killed on the factory ship it was caught on or just before you eat it.

So, I was surprised that I was so horrified when the folks sitting next to us ordered a "dancing abalone" (odori awabi). Abalone is a mollusc that is considered a delicacy in Japan and elsewhere. It has crunchy texture and, when fresh, tastes incredibly of the sea.

For dancing abalone, a live abalone is shucked, placed back in its own shell and delivered to the table along with a small brazier of hot coals. The abalone is set, inside its shell, on a grate over the coals and cooks.

The catch is that the shellfish is still very much alive when it starts heating up. Our neighbor's abalone was still when it was first put on the grate, but it quickly started moving as it heated up. As it got hotter and hotter, it started writhing, spinning around in its shell, trying to escape from the heat. Finally, after two or three minutes, it had mostly stopped; the waitress came, sliced it and served it to the salivating customers while I looked on in horror.

The funny thing is that abalone are some of the oldest and most primitive sea creatures there are. They haven't changed since the Cambrian era and even their scientific subgroup, archaeogastropoda, belies their age. So you can't really talk about the abalone experiencing pain or suffering--all of its behavior is instinctual.

Nevertheless, it's not a dish I'll be ordering anytime soon.

Posted by pmk at 1:37 AM | Comments (1)

January 15, 2006

Movable Type Upgrade

I just upgraded patrick.com's Movable Type to 3.2. I had a problem that others have had as well, but that I haven't seen a solution to, so I figured I'd document it here.

During the web-based upgrade process, I kept getting this error:

Error during upgrade: Can't call method "basename_limit" on an undefined value at lib/MT/Util.pm line 719.

The line in question does this:

    my $limit = $blog->basename_limit || 30; # FIXME

The problem is that if you have entries in your database for a blog that has been deleted (theoretically impossible, but apparently can happen in practice), $blog will be undefined and the upgrade will explode. Changing the line to use the ternary operator:

     my $limit = ($blog ? $blog->basename_limit : 30);

doesn't get you much further, since the whole subroutine assumes that $blog is valid.

In my case, I went into the MySQL database directly and deleted everything in mt_entry tables where entry_blog_id wasn't 2 (the blog_id of patrick.com):

delete from mt_entry where entry_blog_id != 2

The upgrade made it a little further, then blew up again while upgrading permissions. I took a look at the mt_permissions table and, sure enough, it had references to a non-existant blog. I ran my cleanup query again on that table:

delete from mt_permission where permission_blog_id != 2

And the upgrade finished successfully. As always, take care when futzing around directly with your MT database and if you use this recipe to try and solve your problem, be sure to change the blog_id to match whatever your blog_id is (or blog_ids are)!

Hope this helps someone else having the same problem.

Posted by pmk at 1:05 AM | Comments (6)

January 12, 2006

Flickr/MoveOn Article

Micah Sifry wrote a piece on the recent Flickr integration we did for MoveOn.

MoveOn generates tons of photos and needed a way to quickly review them for objectionable content and make them available to MoveOn users (and the rest of the world).

We put together a system that allows users to send their photos to MoveOn via email.  The photos get uploaded to Flickr, are quickly reviewed by a cadre of MoveOn volunteers and are then made public.

Posted by pmk at 9:54 PM | Comments (0)

January 11, 2006

Cool Panasonic Network Camera

While visiting the in-laws over the holidays, I was able to liberate a Panasonic Network web camera.  The BB-HCM371 is their high-end model: you can use it outdoors, it has wireless ethernet, an SD card slot -- the works.

The thing that impressed me most about the camera, though, was that it automatically integrates with a dynamic DNS service that Panasonic provides.  Combined with the camera's UPNP support, this means you can throw this camera on almost any home or SOHO network and, once you've authorized it, the camera can be accessed from anywhere on the Internet.

The camera also has 3 external I/O connectors that can be used to trigger lights, a heater or a laser beam when the camera detects motion.

I don't really need a security camera here in Tokyo, so I left it in Chicago, where it is dutifully recording pictures of the dogs to an SD card around everytime they trigger the motion detector.  It's not Big Brother, but I guess you've got to start somewhere.

Click to view larger photo
Posted by pmk at 9:10 PM | Comments (3)