Write the blog you want to read

It’s funny to say, but it’s true. The things I blog about tend to be the things I’m most interested in. I love this policy. For one it’s flexible. As my interests change, so goes the blog. For another, it allows for diversity. I can post a photo of a car, followed by something technical, followed by something about cheese, followed by something I cooked, followed by something I did outside, without batting an eye. I frequently look back at what I’ve posted and think to myself, “Damn, this is such a great blog! I love this stuff.”

I would go so far as to say that having this blog has made my life more interesting, because I’m often motivated to do something unusual or kind of wacky by virtue of its inherent blogability. This creates a virtuous circle where I end up pursuing things that might not normally be worth doing when there’s the potential for a story to share or an interesting photo to take. Which in turn leads to yet more adventures off the beaten path.

Many people advise would-be bloggers to focus on a single subject and stick with it. I applaud the people who are able to do this well, and there are some very good, and very lucrative subject-specific blogs out there. But man, forcing me to narrow my focus down beyond just “stuff I like” would be disastrous. I would lose interest.

I’m sure I’m not the only person out there who likes the exact same combination of things as I do, but at the same time there doesn’t have to be even one person with the same taste as mine. That’s not the point. The whole difference between blogging and just keeping a journal is the intent to share. As I see it, the value of Justinsomnia is not only in the individual post, it’s also in the sometimes surprising difference between posts. You might have stumbled upon my blog searching for something technical or food-related, and if you’re tickled by the fact that my interests extend beyond that one thing, hopefully you’ll continue to follow along.

Even though blog writing is closely related to newspaper column writing in function, I actually tend to view Justinsomnia more as an ongoing, interactive art project. Each post is like a small canvas that I can fill with words, photos, code, and occasionally even sound and video. Anyone on the internet can interact with my posts by leaving a comment, which actually changes the very nature of the work, particularly in the “eyes” of the search engines. Over time trends emerge in my posts, not unlike Eric Tabuchi’s Typologies, and it wouldn’t surprise me if at some point in the future there aren’t exhibitions dedicated to the blog post as work of art.

End of an era: Blogger shutting down FTP service

Blogger logoWhen I started Justinsomnia back in the summer of 2002, I setup Blogger to publish to my university webspace via FTP. In the spring of 2005 I started playing with WordPress because that’s what Ruby was using for OrangePolitics. My last post published using Blogger was watching unc beat duke on March 7, 2005. A few days later I posted Say Hello to WordPress, and the rest is history. Sort of. I actually continued using Blogger to publish my “neatlinks” via FTP (which I included dynamically in my blog) until February 12, 2007, when I incorporated them into my WordPress setup.

Anyway, it seemed only appropriate that I should pay my respects to a service I owe so much. Google will no longer support FTP publishing in Blogger after March 26, 2010. Couple this with the recent news of Haloscan going the way of the dinosaur, and this truly is the end of an era.

Machine translation, semantic HTML, and embedded code, oh my!

It’s hard for me to believe that in the not so distant past I worked as a web producer for O’Reilly’s now defunct Online Publishing Group. Basically I was a sort of HTML jockey, shuttling articles through their content management system while ensuring that they all had consistent markup.

Since the articles O’Reilly published online dealt predominantly with programming, the vast majority contained code snippets and samples. Thus one of my primary roles was to ensure that the embedded code displayed properly on the web. Our HTML “style guide” dictated that all code be wrapped in <pre><code></code></pre> tags. I remember at the time thinking it a bit redundant—I occasionally embed code on my blog, but for simplicity’s sake, I use <pre> alone.

I discovered today another value to the semantic use of HTML: machine translation. I was looking through my referrer logs, and noticed someone had translated one of my posts with code samples. And sure enough, Google translated everything within the <pre> tags, mangling the code. Gah!

This made me think all the way back to my O’Reilly days, and I wondered what Google would do if I also wrapped the code block in <code> tags. Sure enough, they respected the semantic “intent” of the <code> tag and left it untranslated—BUT they also stripped out the newlines, collapsing multiple lines of code to a single line. So if anyone from the Google Translate team is reading, consider this a bug report.

Before Google Translate
Google Translate Test: before

After Google Translate
Google Translate Test: after

Note: Apparently Google will also avoid translating tags with class="notranslate".

Haloscan going the way of the dinosaur

Haloscan is getting upgraded to Echo:

Once presented with the upgrade message, Haloscan users will have 2 weeks to make a decision. You will have the following two options.

  1. Upgrade to Echo for $9.95/year – all your comment data will be transitioned over automatically
  2. Export your Haloscan comment data and turn off their service

This explains the recent interest in my Importing Haloscan comments into WordPress 2.3 from Blogger post (which is based on my original Importing Haloscan comments into WordPress from Blogger post from June 2005, back when I first moved from Blogger to WordPress).

It’s funny to think that in a small way I’ve helped countless users transition their Haloscan comments (usually embedded in Blogger posts) to WordPress over the past four and a half years, judging by the 203 comments that the two posts above have accumulated. Though it will be a bummer for the few users who are not able to make the transition, and thus lose their comments, I have to say it will be nice to have one less smidgen of code to support.

As an aside, I always get a chuckle out of the following image from Sam Ruby’s Rights vs Responsibilities post:

Since code costs essentially zero to distribute, my first thoughts are not on what rights I want to assert, but what obligations I wish to assume. If you look at software licenses, both commercial and open, this is something that they are careful to enumerate. In most cases, it essentially comes down to: “if it breaks, you get to keep both halves”.

Mise-en-abyme Halloween

Justin as as his halloween blog post on Justinsomnia.org

For Halloween this year I just dressed up as my blog post about what I dressed up as for Halloween this year.

Introducing Boing Boing Classic

Boing Boing Classic favicon This is what I believe. Design should be evolutionary, not revolutionary. Design should strive for simplicity and spurn complexity. Design should innovate, not emulate. Most importantly, design mistakes—that initial naivete of any fledging project—may eventually become its brand. Remember to embrace it! Look at Google. Craigslist. Coca Cola Classic.

With that in mind it was kind of shocking to see how Boing Boing, my favorite blog, redesigned their site this past week. They changed the logo (a throwback to the original print zine), they threw article callout boxes all over the place, they increased the font size, and they extended the homepage with unskimmable headline links. It seems, overall, they made a lot of design decisions that emulate the dying print world. I mean, c’mon, a masthead, really?

It’s not hard to explain my attachment to Boing Boing. For starters, it’s the only blog I still check directly, instead of plugging it into my feedreader. I probably go there multiple times a day, and just skim until I get down to posts I’ve already read. It was the first place I learned about Federated Media, a year before I started working there. It’s not because of the design (or legendary lack thereof) that I behave this way, I read it for the Boingers’ consistently stellar content and wit.

I decided I had to do something. I wanted my old Boing Boing back. I wanted Jackhammer Jill. I wanted a Boing Boing that was more Boing Boing than Boing Boing. One that Mark, Cory, Xeni, and David would be proud of. Boing Boing Classic. It was really that simple. So I registered boingboingclassic.net, grabbed the old layout and stylesheets from the Internet Archive, wrote a simple little feedparser+html generator, and voila. I give you:

Boing Boing Classic. Enjoy.

Update, Oct 12, 2009: I’ve stopped updating Boing Boing Classic so that my personal design criticism is not misconstrued by anyone as representing the opinions or attitudes of Federated Media, my employer and Boing Boing’s advertising partner.

Continue reading…

OMG Boing Boing redesigns

After helping speed the demise of mainstream media and traditional publishing, Boing Boing has decided to add—wait for it—a masthead! How retro!

Boing Boing 2009 masthead

At least Ken Snider, FM Engineering’s Network Architect, gets a shout out.

How to intercept a WordPress page request

Have you ever wanted to write a plugin that sits between a request for a WordPress page (or post) and the fulfillment of that request? In order to do so, use the pre_get_posts action hook which passes a WP Query object as a parameter to your plugin function. This action is called early in the request flow, before any headers or content has been sent to the browser. So you can probe or modify the query object in order to create your own custom behavior.

As an example, I wanted to redirect all requests that come in for http://justinsomnia.org/random/ to a random post from my blog. Note the random link in my nav bar above. Here’s how you might do that:

<?php
/*
Plugin Name: Random Link
*/

add_action('pre_get_posts', 'random_link');

function random_link($query)
{
  if ($query->get('pagename') == 'random') {
    global $wpdb;

    $sql = "select $wpdb->posts.ID
            from $wpdb->posts
            where post_password = ''
            and post_type = 'post'
            and post_status = 'publish'
            order by rand()
            limit 1";

    $post_id = $wpdb->get_var($sql);
    $permalink = get_permalink($post_id);

    header("Location: " . $permalink, true, 302);
    exit;
  }
}

The result is a pretty serendipitous (and addictive) way to surf my archives.

Continue reading...

monthchunks

license

Justinsomnia is licensed under a Creative Commons Attribution 3.0 License.

Please see my Attribution Policy for more information.