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

WordPress logoHave 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.

My history with WordPress

At WordCamp San Francisco today I learned that WordPress celebrated its 6th anniversary this week. That and my badge, which proudly stated that I had spent “5 years with WordPress”, made me think back on my early history with WP.

My 2009 WordCamp San Francisco badge

I have to confess that 5 years is a bit of an overstatement. I believe I selected the “4-5 years” option from the registration drop down, but just for the record I moved Justinsomnia from Blogger to WordPress 1.5 in March of 2005. So I’ve really only spent the last 4 years with WordPress.

However, I did install WordPress 1.2 in January of that year to help Ruby Sinreich develop a dynamic blogroll for Orange Politics. So I have Ruby to thank for getting me to dig into WordPress in the first place. Thanks Ruby!

Random Custom Fields

The latest version is 1.0, released February 24, 2009, compatible with WordPress v2.7 (and probably 2.6)

WordPress logoThis is an esoteric WordPress plugin (and widget) that will randomly extract one or more custom fields from your posts and display them in a format of your choosing.

For example if you’ve stored geographic coordinates (longitude and latitude) for your posts in a custom field, you can use this plugin to randomly generate a link to Google Maps. Perhaps you could even generate a random embedded Google Map centered on that spot. I know that some people use Custom Fields to store images with special meanings. They could use this plugin to randomly display an image linking back to the post it came from, similar to my Random Image Plugin.

As always, please let me know if you have any problems or questions. I’m happy to help.

Screenshot

This is not a sexy plugin, but it just might save the day. Here’s a screenshot of the admin interface.

Random Custom Fields screenshot

Instructions

  1. Download and unzip random-custom-fields-1.0.zip (v1.0)
  2. Upload the file random-custom-fields.php to your plugins directory:
    /path/to/wordpress/wp-content/plugins
  3. Activate the plugin (don’t forget!)
  4. If your theme is widget-enabled, goto Design > Widgets and add “Random Custom Fields” to your sidebar
  5. If your theme is not widget-enabled, edit the index.php or sidebar.php template file in your theme’s directory:
    /path/to/wordpress/wp-content/themes/name-of-theme
    and add the following line of code where you want a random custom fields to appear:
    <?php random_custom_fields(); ?>
  6. Configure the plugin from within WordPress under Settings > Random Custom Fields

Options

The <?php random_custom_fields(); ?> function can take 9 optional parameters in between its parentheses. If you specify any parameters this way, all settings made through the configuration interface will be ignored. Note: this behavior could be useful if you wanted to have several different random custom fields each with different settings appearing throughout your site.

<?php random_custom_fields(custom_field_name,
                           include_posts,
                           include_pages,
                           sort_randomly,
                           count,
                           value_separator,
                           html_template,
                           html_between_templates,
                           category_filter); ?>
  1. custom_field_name is a required string that determines which custom field name to display.
  2. include_posts is a boolean (default is true) that determines whether to pull custom fields from posts.
  3. include_pages is a boolean (default is false) that determines whether to pull custom fields from pages.
  4. sort_randomly is a boolean (default is true) that determines whether to pull custom fields from posts in random order, or in date descending order.
  5. count is an integer (default is 1) that determines how many custom fields to display.
  6. value_separator is a string (default is newline) that allows you to break up the custom field value into multiple pieces for use in the html_template.
  7. html_template is a string (default is %0) that determines how the plugin should display the custom field. There are several variables that the plugin can output by default, including %title, %permalink, and %excerpt, all from post of the custom field. The variable %0 will be replaced with the entire custom field value. If you’ve entered a custom value_separator (default is a newline) the variables %1, %2, %3, etc will be replaced with each piece of the custom field value divided by the value_separator delimiter.
  8. html_between_templates is a string (default is <br /><br />) that gets printed between custom fields if the count parameter is greater than 1.
  9. category_filter is a comma-separated list of category or tag ids (default is blank) that limits the custom fields posts within certain categories or tags.

On blog comments and Twitter

I started Justinsomnia (during a bout of sleeplessness) with Blogger back in 2002. This was before blogs had built-in commenting functionality. Eventually third party apps came along (like Haloscan, YACCS) that added commenting, but I was reluctant. I didn’t want comments to compromise the integrity of my posts.

After my friends began to add comments to their blogs, I noticed a change in my reading behavior. Whereas my blog was static—it didn’t change unless I posted something new, my friends’ blogs were dynamic, changing throughout the day as people stopped by and left comments. As a result I started going back to their blogs more often to follow the conversation. Meanwhile my blog sat idle.

Eventually I caved. I added Haloscan comments to my blog a year and a half after starting it. My blog survived. And comments grew to be one of my favorite parts of the medium. After all, I’m human. I love the contact, validation, support, questions, and feedback they bring.

Which brings me to Twitter. At one point during the CM Summit, Evan Williams was comparing Twitter with other communication channels, and he said “it’s the fastest way to get a message to a lot of people. Unlike broadcast, it’s two-way.”

This is a remarkably simple statement, but it really struck me. To most outsiders, Twitter seems a little pointless. But they’re usually judging each tweet in isolation, disconnected from the larger Twitterstream. When you start thinking about it being a discrete part of a larger conversation, you start to see where the value is.

It occurred to me later that Twitter takes the best part of blogging, the comments, and dispenses with the posts. (No wonder it kills blogs!) When you think about it that way, it sounds more natural, and certainly more conversational than blogging. Blogging is also a one-to-many communication channel, but the aspects that made it two-way (comments, trackbacks, aggregators) were all gnarly hacks bolted on after the fact. With Twitter, the two-way is built-in.

Blogger’s block

I want to write, but I don’t know what to write about. I feel like I’ve kind of painted myself into a corner where I only really blog about two different things. Hiking trips I’ve taken and technical howtos. (I’m not counting neatlinks, that’s social bookmarking, not blogging.)

The technical howtos are easy, they practically write themselves, and I actually find them really satisfying to write because they’re so damn simple. That and they tend to be the posts I refer back to again and again. But I wouldn’t want my blog to consist of only those. Thank goodness their source of inspiration is sporadic.

The hiking posts are labors of love, heavy emphasis on labor. Writing about a hike is essentially writing about walking. Sometimes it’s hard to make interesting. And I find that the effort involved to select, resize, and retouch a bunch of photos and then to write about the experience requires totally different parts of my brain—thus two or more days to execute. Reading my blog you might think that my life consists of hopping from National Park to National Park. (That actually sounds like kind of a nice life.)

It’s just that I feel like I’ve really gotten away from writing about the impromptu, the daily life stuff, which is half the fun of blogging. I also feel like I’ve gotten away from taking risks, either in function or form. But for crying out loud, I’ve been blogging here non-stop for over 6 years. It’s kind of hard to stay original for that long.

So yeah, I really hate blogging about blogging, or vomiting a bunch of stream-of-consciousness stuff out on my blog (especially when I have nothing else concrete to write). I guess I’m just trying to get this out of my system. Like maybe admitting I have a problem is the first step to recovery. So there. I’ve said it. I don’t know what to write about. I’m occasionally bored of my blog. And it’s autumn. I blame autumn. Fall is a depressing season. It always bums me out.

A little bit about the new laptop

I’m typing this on my new laptop. The totally hot Lenovo ThinkPad X200. It’s like 4 generations of improvement over my X23. The best part about it is the 12.1″ 1280×800 resolution LCD screen. The worst part is that Lenovo forced me to buy it with Windows (and now there’s this annoying Windows flag key wedged between the Ctrl and Alt—it’s already been remapped as Ctrl). Thankfully they gave me the option of saving forty bucks by downgrading to Windows Vista Basic.

When it arrived on Monday, I booted it up, just to make sure it worked, and kind of realized this was the first time I was really seeing the infamous Vista. Then I realized my eyes were burning, so I had to look away and turn it off. When I got home I plugged in my external CD-ROM drive, loaded an Ubuntu 8.04 disk I had laying around, and immediately blew Windows away.

And dammit if the Atheros-based wireless card didn’t work when I finally booted into Ubuntu. This made me sad. I thought maybe I could switch out the mini pci wireless card in my old X23 (which works with Ubuntu), but turns out mini pci != mini pci express. Eventually I sucked it up (I’m such an apt-get baby) and found some instructions that essentially amounted to compiling my own HAL (hardware abstraction layer) for Atheros. Now everything is peachy keen. Update: I posted my instructions here: Getting wireless to work in Ubuntu on a Lenovo ThinkPad X200.

Some people probably would use stories like this to demonstrate how Linux is not ready for prime time or the “average” user. However if Lenovo offered Ubuntu preloaded on their laptops (LIKE DELL DOES) they would make damn well sure it had the latest and greatest drivers for their wireless cards. And I’m not exactly an average user. It’s all a question of market share and economies of scale. I’m just trying to do my part.

Continue reading...

monthchunks

license

Justinsomnia is licensed under a Creative Commons Attribution 3.0 License.

Please see my Attribution Policy for more information.