Blogging Archives, page 4

Blogging about blogging, how meta.

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.

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.

Questions, comments, and suggestions are always welcome. If you’re interested in contributing to the code behind Random Custom Fields, it’s hosted on GitHub.

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.