Archive for the ‘null’ Category

The Meaning of 404 in Presidential Politics

Friday, October 3rd, 2008

One of two websites will soon become the First Site of the United States of America. Curious about how the sites were constructed, I decided to compare how each site handles a request for a missing page. Below are some observations and comments on what I found.

First a note for my non-computer-geek readers. When you access a web page that does not exist, the web server responds with an error code, 404, and sends back a web page explaining the error. In the early days of the web, hitting a missing page with your browser would almost always yield a standard error page with a big “404 Not Found” emblazoned across the top. Since then, it has become common practice for sites to customize the error message to make it more friendly and useful. Many such customizations offer a page that fits with the visual design of the site, a link to the site’s homepage and sometimes even suggestions of similar links.

Here are screen grabs of page not found errors from Barack Obama’s site and John McCain’s site:
Picture 3Picture 2
On the left is the customized 404 page on Obama’s site which provides a cute error message: “we are all imperfect”. Not only does the error page fit visually with the site, but the site’s right side-bar remains visible providing links for watching barack TV, donating, and getting involved in the campaign. This approach makes sense and improves the site’s SEO (for a detailed post comparing the SEO of the two candidates websites, see Search Showdown: Barack Obama vs. John McCain).

I was surprised to find a default 404 error page on John McCain’s website letting us know that his site runs IIS and providing a link to Microsoft Product Support Services (the fact that this is IIS’s default 404 page is another matter). It’s actually been this way for weeks, but I haven’t had the time to put together a post about it.
The subtext of 404

What does it mean that the McCain website is missing this bit of polish (and more if you read the Search Showdown post linked above)? Is this a demonstration of McCain’s lack of technical savvy? Perhaps it is an indication that for the McCain campaign, reaching voters via the web is not a priority. Either way, it shows a lack of attention to detail. The cost of a website that conforms to the best practices of the day is not prohibitive; there isn’t a good reason not to have a well designed site (if it is in contention for First Site, please no comments on my lame wordpress theme).

Friday Links

Friday, October 3rd, 2008

In lieu of a real blog post, here are a few links I’ve found interesting this past week:

Sitepoint’s Josh Catone reviews Evri.

I found two well-written overviews of consistent hashing, one by Tom White and another by Tom Kleinpeter. If your name is Tom and you haven’t blogged about consistent hashing, please get on it.

I enjoyed reading Alex’s brant (a blog post in the key of rant) A Philosophy of Testing.

On versioning RESTful web services

We did some work refactoring one of our RESTful web services to support versioning of the resources. I came across a post, Versioning REST Web Services by Peter Williams that describes a way to use Accept headers and content negotiation as a way of versioning RESTful services. Basically the client would send “Accept: application/your-app.v1+xml” and the server would then send a response with “Content-Type: application/your-app.v1+xml”. Then if you want to make an incompatible change to a resource, the server can respond appropriately based on the Accept header sent by the client. Moreover, a client can declare that it supports multiple versions with associated preference so that a new client could negotiate with an old server, for example. Initially I was really taken with the idea.

In the end, we opted for putting a version tag in the resource URI itself (e.g. /v1/my-app/…). One downside of the Accept/Content-Type approach is that you lose the ability to easily use a web browser to inspect your service since most browsers will not display arbitrary MIME types and prompt you to download instead. There may be some workarounds for this, but the value of being able to quickly inspect services using a browser cannot be discounted — it is one piece of the leverage one achieves in building services as XML/JSON over HTTP. Another issue surrounds what should happen when the client doesn’t send an Accept header at all. If new versions of the web service shouldn’t break any existing clients, then the only thing to do for a missing Accept header is either: (i) return an error and force an Accept header to be provided, or (ii) treat the request as if the version requested is the first publicly available version. The second option has the unfortunate effect of making an old version look like the default. The first option is reasonable, but may make the service harder to use since this is not at present a common approach. So the conclusion we arrived at was that placing the version in the resource itself, while someone of an eye-sore, was best since it made the version obviously a required part of the request.

Technorati Tags: ,

Installing the Evri widget on a Wordpress blog

Sunday, September 28th, 2008

Last week Evri launched its public beta. No password, no sign-up. You are just a click away from checking out our take on searching less and understanding more: http://www.evri.com.

We also have made available what we call “the widget” that allows anyone to get Evri content recommendations on their own website. If you are reading this on the User Primary site, you should see a small Evri icon at the bottom of this post. Click it, and you will get an overlay that will show related articles, people, places, and things.

Installing this on my Wordpress powered blog was fairly simple. There are instructions on Evri’s partners and bloggers page but if you are running a recent version of Wordpress, you can install the widget using the admin screens of your blog. Here’s how I installed the widget using Wordpress version 2.6.2.

1. Log in to the Site Admin for your blog and click on Design, then Theme Editor
200809281531
2. On the right, click on Footer (footer.php)
200809281532
3. Now in another browser window, go Evri’s wordpress-widget page and copy the code to your clipboard.

4. Find the line at the bottom of footer.php that looks like: <?php wp_footer(); ?> and paste the code you copied below this line.

200809281534

5. Save/update the footer page.
Note that if you use a caching plugin like WP Super Cache, you need to clear your cache to get the widget working on your site. You can do this via the WP Super Cache plugin configuration screen.

Technorati Tags:

Movie Review: 12 Angry Men

Sunday, August 10th, 2008

Regan and I watched 12 Angry Men last night on dvd. I had not seen it before. This is the 1957 court room drama starring Henry Fonda and directed by Sidney Lumet. If you haven’t seen it, I highly recommend it. The action takes place entirely in a small spartan jury room on a hot summer night. It’s the sort of film you can easily imagine being performed as a play. The original version, however, was televised in the series Studio One (according to IMDB). And it runs only 96 minutes, which is further evidence that there is no good reason to make a film longer than two hours.

Locked out: automatic wordpress upgrade woes

Saturday, August 2nd, 2008

This morning I decided to a bit of maintenance work on my blog and noticed that my Worpress installation was out of date with the current release. I was running 2.5.1 and 2.6.0 is now available.

I had used the automatic upgrade plugin for my last upgrade and everything went very smoothly. This time, however, I was unable to log into the admin console after completing the upgrade.
Picture 1

It seems that there is a browser cache issue, or perhaps something specific to Firefox 3. I tried using the lost password feature and received a magic URL via email, but this also failed to work. After finding this post during an initial google search, I tried getting to my site via Safari and that worked. Anyhow, perhaps this saves you some panic if you find yourself in the same situation.


Content recommendations from Evri