I’ve been working on this for an obscene amount of time. I’ve been working on it for so long, I can’t even remember when I started it. I think it was back in February, and then I got interrupted by another slightly more important project, so progress stalled.
I’m occasionally thinking about ways to expose my archives. One of my first attempts was creating the random image plugin for WordPress which displays, at random, one of the 400+ photos I’ve included in my blog posts, with a link back to that post. It’s like visual serendipity.
Then it occurred to me that many of my blog posts, especially since moving to California, have a geographic focus. Usually they’re about a place I went and often include a photo or two (or three).
It got me thinking about Anton’s travels page, powered by this flash app called IndyJunior which displays some of the places around the world that he’s been. Of course Anton’s pretty lucky, he spent time in Vanuatu doing Peace Corps, so his travel map looks awesome. But at the same time, it only really works well if you put in very granular data about the states or countries you visited.
Then it occurred to me, what if I could associate some geospatial data with my blog posts? Data that I could then extract and display on a map…using the Google Maps API, for instance. As long as I remembered to enter the metadata with my posts, the map would stay automatically updated, and it would provide a neat visualization of my archived posts and the places I’ve traveled. Here’s a screenshot:
The hard part was going through my archive of several hundred posts (almost 4 years!) and entering latitude and longitude data as precisely as possible for all relevant posts. 152 coordinates in all, so far. That was like 152 mini-research projects. Hmm, where again were those botanical gardens just outside of Accra, Ghana?
Of course it turns out that some posts necessitated multiple coordinates, but thankfully many, especially the earlier posts, had no geospatial associations. Luckily Google Maps is a great tool for gathering latitude and longitude data. Just center the map on your location, click “Link to this page”, and the coordinates for that point will be accessible in the URL as the ll query string variable, e.g. ll=33.66121,-95.556507. Consider it the poor man’s geocoder.
For the WordPress geeks out there, I stored this data as a custom field called geographic_coordindate in the format latitude,longitude;location where location was a short description of the specific location. This was especially useful for posts with multiple coordindates. Then I wrote a script that selected all those posts from the database and generated the javascript function calls necessary to build the markers and info bubbles in Google Maps.
Eventually maybe I’ll release a plugin or some code so others can do this, in the meantime, just leave a comment or send me an email if you’re interested.
In the background, I’ve been making a few improvements to my blog, some of which I think are pretty cool.
The Elastic Homepage
The first was inspired by my rampant blogging over the holidays, partly trying to keep in contact with friends and the fam, but also because I was spending an inordinate amount of time trying to get from Phoenix to Austin. Plus PHX had FREE! and ubiquitous wireless, so what else was a blogger to do?
I also noticed, as expected, that the traffic to my blog dropped off precipitously during the holidays. So there I was, posting once or twice as day, and with only 5 posts showing up the homepage, I was concerned that when people took a break from celebrating with their families to check their email and my blog, half of my ordeal might have scrolled off into the archives!
It occured to me that I needed to whip up some hybrid between Movable Type’s default behavior of showing the last X days worth of posts and just about every other platform’s behavior of displaying the last N posts. I could manually expand the number of posts showing up on my homepage, but I thought it’d be a LOT cooler if the homepage automatically “stretched” so that it displayed more posts when I’m posting frequently, but never dropped below some minimum threshold when I can barely squeeze out a post a week.
So that’s what I’ve done. At minimum you’ll see the last five posts on the homepage, but if I happen upon a stroke of unexpected brilliance, you’ll see at most the last 8 days worth of posts. Which, if you check my blog once a week (the old fashioned way), means you won’t miss a thing. Ha!
Update: The Elastic Homepage Howto
Want to implement the Elastic Homepage yourself? It’s based on Justin Blanton’s Limit number of posts with WordPress, so first you’ll have to set the Show at most posts option under Options > Reading to some large number. Choose something that you wouldn’t expect to exceed in the maximum time period you specify below. Be aware that this will affect how many posts show up in your archive, category, and search result pages. The updated code below will then override this number based on variables you specify.
In your index.php template file, change the following code (as taken from the default template):
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
To this:
<?php if (have_posts()) :
// variables to configure elastic homepage
$minimum_posts_to_display = 5;
$maximum_days_to_display = 8;
// initialize counter for elastic homepage
$elastic_homepage_counter = 0;
// convert days to seconds (60*60*24 = 86400)
$maximum_days_to_display *= 86400;
?>
<?php while (have_posts()) : the_post();
// stop printing posts when the minimum number of posts has been reached
// and the current post is older than the number of days specified above
$age_of_current_post = time() - get_the_time('U');
if (($elastic_homepage_counter >= $minimum_posts_to_display) &&
($age_of_current_post > $maximum_days_to_display))
{
break;
}
$elastic_homepage_counter++;
?>
Then modify the variables $minimum_posts_to_display and $maximum_days_to_display to configure the elasticity of the homepage to your liking.
Hidden Comments
The next idea came to me while I was reading a recent comment on my monthchunks plugin post, which continues to generate interest and thus occasionally new comments. The utility of scrolling down a narrow column of 40 odd comments loses its allure pretty quickly. Wouldn’t it be cool, I thought, if I could hide the old comments without making them inaccessible, in order to bring the most recent to the top, while still sorting them in chronological order.
With a teensy bit of JavaScript and a little WordPress theme hacking, I wrapped the first bunch of comments in a div so that only the most recent 10 comments lived outside of this div. Then I set display:none on the div so it doesn’t show up, but I added a link at the top of the comments that says Show comments: 1 through X which makes the div reappear and hides the link. Ah, so satisifying.
I came back a day or two later and realized that clicking the link to show the hidden comments happens so fast that it’s hard to tell what exactly changed. What a perfect opportunity to try the Yellow Fade Technique, popularized by the folks at 37Signals. [Unfortunately the images on the YFT post are currently broken, so it doesn’t do you much good.] However, the gist is that if you change something subtly on a webpage, you should provide the user with some kind of visual cue that something happened, like fading the updated info from yellow to white.
Perfect! All I needed was a library that would fade from any color to any background color. Thank you Adam Michela for doing the heavy lifting so I didn’t have to. His Fade Anything Technique does exactly that. I grabbed the code, plugged in my purplish highlight color and my beige background color, so now when you click the link to show the hidden comments, they gradually fade from purple to beige. SO COOL!
Check out Television Abstinence (currently has 12 comments, so 2 are hidden) to see this in action.
I don’t like summarizing a year. Every time I try to do it, I struggle with what details to include and what to leave out. Who wants to read a summary [of my life] anyway, a loose rehashing of events cobbled together so that friends and strangers don’t forget that, “Goshdarnit, I’m an interesting person who does interesting things!”
Last year I looked through all my posts and picked one in each month that I thought was particularly meaningful, funny, or representative of me. I probably should have just done that again.
Instead I was curious to see which posts you thought were the most important. In February I set up a system to track page requests so I could follow who was linking to my site. Using that information, I was able to rank the most requested posts I wrote in 2005.
The most popular post, though interesting, was popular only because of an image I linked to that showed up at the top of Google’s image search results when someone searched for “google”. The second most popular post was due to a link from Joel Spolsky during Etech.
After that, the most popular posts were requested because someone was trying to figure out how to do something, like how to move posts from Blogger to WordPress or how to fix a broken LCD screen. I managed to siphon some popularity off of the Web 2.0 circle jerk (and get a good jab in at the same time), but the most unexpectedly popular post, just in time for apple chill, was popular due to people searching Google for “chevy caprice”, “pimped out cars”, and “20 inch rims”. Cuz I roll like that, beotch.
What I don’t like about those results is that they’re really skewed towards the head of the long tail (*Justin finishes his drink*), as opposed to the community of people who regularly stop by to catch up with me and sometimes leave a note.
So maybe the best way to look at the most important posts (as judged by the community) are those posts that ellicited the greatest number of comments. Surprisingly 6 of the 10 most commented-on posts (highlighted in yellow) overlap with the most requested posts above. Oh well.
In fact really only two of the posts above are non-technical, the post about my poision oak experience, and the post with just a single picture from my birthday dinner. Which is funny because the most common compliment/complaint about my blog usually follows the form, “Yeah, I like your blog, I mean, I don’t understand (or I skim over) the computery posts, but yeah it’s pretty good.”
So I suppose all I’ve managed to gather is that if I arbitrarily limit popularity to top-ten type results, the information I get back is not going to be that representative or interesting. It also implies that popularity in the blogosphere can be improved by structuring posts so that they provide an effective answer to a single question. In order to create profitable business models (*Justin takes a shot*) within such an ecosystem, one would need to be good at predicting what questions are soon to be asked, in order to be established with the best market position when the information demand comes.
Oh my god, I’ve just sucked all of the passion out of blogging, sitting here thinking about monetizing information (*Justin takes a drink*). Time to sign off. Happy New Year’s Eve.
max-width, centered layout (only applies to FF, etc, width is fixed in IE6) in other words, the page doesn’t get wider than the visible width on a 1024×768 resolution monitor, but it does shrink down for lower resolutions
comments have their own column on post pages
monthly archive pages list posts chronologically (e.g. October 2005)
update: neatlinks archives (still “powered” by Blogger) are now integrated into WordPress monthly archives!
update: added permalink links back to the neatlinks having figured out a while ago why Blogger was adding empty divs to my posts. I also added a rewrite rule that redirects the Blogger archive permalinks to the new integrated monthly archive URLs.
The hot topic at Webzine was videoblogging (aka vlogging), which is funny because video as a medium seems about as far from the traditional print ‘zines as one can get. Behold the synergizing power of the internets.
Thus some of the videobloggers at the conference had set up a studio in the spirit of a Real World™ confessional booth—complete with a green screen and everything. But being the shy text blogger that I am, I wasn’t going out of my way to speak in front of a camera. Except that in the middle of a panel on podcasting someone nabbed me–she was tall and blond–and I found myself trying to construct coherent sentences in front of a camera lens (about whatever I wanted) while the discussion was booming below.
Tonight I discovered the end result. I was included in a compilation of several other confessors from Webzine. Click the thumbnail below to see my 42 seconds of fame.
What I said:
My name is Justin Watt and my URL is justinsomnia.org. I’m a personal blogger. I also do web production for O’Reilly Media in Sebastopol, California. I recently moved to California from North Carolina. Blogging is a great way to keep in touch with family members and friends. I got started back in college, talking about things that I was reading online in other blogs. There are a lot of conversations you can have with people who are right in front of you. There are a lot of conversations you can have with people who are out in the world in other places, other times. Blogs are a great way to have an asynchronous conversation. That’s me.