How many people don't read this blog?

Updated on Sunday, May 3, 2020
This is a joke metric that I first proudly displayed on Catfood Magazine back in 2007 1997 (it's broken on the archive of the site). Everyone had a hit counter back then, but as far as I know we were the first site with a non-hit counter.

The dirty secret was that the counter just showed the world population. The readership was a rounding error.

My new count of non-visitors uses the US Census Bureau's world population estimate and subtracts unique visitors from the Google Analytics API. The count is cached for an hour so it doesn't slow the page down too much.

Blogger Classic Templates Bugs and XHTML

Updated on Sunday, May 3, 2020
I've just migrated this blog from catfood.net to its own domain. In the process I needed to port the template from classic ASP to ASP.NET and I also wanted to end up with valid XHTML.

If you're using blogger on your own domain then you're using the classic templates. There is a known issue with the template tag that causes Blogger to emit unwanted JavaScript - this causes havoc, especially if you're using the tag in the section of a page.

Google recommends using the <$BlogPageTitle$> tag in the page title. This works, but it's not great from a usability or SEO perspective. For item pages you get the post title after the blog name and you probably want to put the post title first - the earlier that keywords appear in the title the better for search engine ranking.

Luckily there's an easy fix - just comment out the closing Blogger tag:

This doesn't interfere with the template rendering correctly and the JavaScript is then commented out on the rendered page. It's still an unpleasant bug, so if you use the classic templates please report it here and also star or comment on this forum topic to encourage Google to fix it.

If you use labels then Blogger includes them in a paragraph rendered with <$BlogItemBody$>. This means that wrapping <$BlogItemBody$> in a paragraph will cause XHTML validation errors for posts with labels because you can't nest another block element inside the paragraph.

The other XHMTL nasty I fixed was the post comments link. My template used the recommended Blogger code:
<p><a href="<$BlogItemCommentCreate$>"
<$BlogItemCommentFormOnClick$>>Post a Commenta>p>

This renders as:
<p><a href="https://www.blogger.com/comment.g?blogID=12345678&postID=1234567890123456789"
location.href=https://www.blogger.com/comment.g?blogID=12345678&postID=1234567890123456789;>
Post a Commenta>p>
And you end up with a gazillion cascading XHTML errors, all caused by the illegal ampersand. I fixed this by constructing my own comment URL using the <$BlogItemNumber$> tag (this emits the unique Post ID):
<p><a href="https://www.blogger.com/comment.g?blogID=12345678&postID=<$BlogItemNumber$>">
Post a Commenta>p>

About Hikes

Updated on Sunday, May 3, 2020

Hikes indulges my passions for walking and being uncontrollably geeky. I love recording a walk and then looking at it in Google Earth. It's a great way to get context for a walk that isn't always obvious while you're wandering around.

I started the blog with a pretty complex setup. For a hike I'd take my Magellan eXplorist 500 GPS and a point and shoot digital camera (currently the excellent Canon PowerShot SD700 IS). After the hike I'd use a program I knocked up to compile stats from the GPS track log, and GPSBabel to convert the track log to Google Earth KML. Then I'd resize images and write a blog post.

This works well for longer hikes but it's a bit painful for shorter ones. I've got an AT&T Tilt phone which has a pretty decent camera and GPS built in, so over the Christmas holiday this year I wrote a tracking application for the phone. This app is now available as freeware (Catfood Tracker). As well as tracking your location it also generates a KML file and hike statistics at the end of a walk. Perfect. See Golden Gate Park Loop for a hike recorded entirely on the Tilt.

With an easier tracking option available I aim to blog about more hikes in 2009. I've also added an interactive map to the blog, which shows all the posts in Google Maps. This page is generated from the blog RSS feed, with a marker placed on the map at the first track point of each hike.

(Updated September 26, 2010: I've upgraded from the Tilt to an Android phone and so I've started using My Tracks from Google to record shorter hikes. This blog has also moved from Blogger to BlogEngine.NET. I've just written an extension to geotag posts so you'll see a Google Maps link to start of each hike at the bottom of every post (as well as some additional metadata to help locate posts in geo-aware searches).