Tag Archives: web


Via twitter yesterday I found out about Readability, which is damn impressive.  It’s a button for your browser that contains a bunch of javascript code that reforms the page you are looking at into something that’s easy to read.  It’s worked really nicely on many of the cluttered news sites that I end up on regular basis.

I’m sure this will end up in an arms race at some point, but for now, I’m really enjoying it.

Catching bad links with jquery

We’re 1 step closer to the launch of the new Poughkeepsie Farm Project website, so it’s down to some final edits before it gets flipped live.  While I was looking over the test site the other day, I realized we still had some links, and images that referred to the existing site, which would break once we did the final domain switcheroo.

I came up with the following snippet of jquery to highlight bad links and images client side so that editors would realize they needed to do something about them:

function highlight_bad() {
    $("div[id='content'] img[src^='http://farmproject.org']").css("border","9px solid red");
    $("div[id='content'] img[src^='http://www.farmproject.org']").css("border","9px solid red");
    $("div[id='content'] img[src^='http://test.farmproject.org']").css("border","9px solid red");
    $("div[id='content'] img[src^='http://pfp.dague.org']").css("border","9px solid red");
    $("div[id='content'] img[src^='http://farm.dague.org']").css("border","9px solid red");
    $("div[id='content'] a[href^='http://farmproject.org']").css("border","9px solid red");
    $("div[id='content'] a[href^='http://www.farmproject.org']").css("border","9px solid red");
    $("div[id='content'] a[href^='http://test.farmproject.org']").css("border","9px solid red");
    $("div[id='content'] a[href^='http://pfp.dague.org']").css("border","9px solid red");
    $("div[id='content'] a[href^='http://farm.dague.org']").css("border","9px solid red");

So every time we find a link or image that starts with an absolute url to one of the addresses the site has had inside the content block, we highlight it. This has been incredibly effective so far in catching some things I didn’t even realize was an issue.  This with the combo of drupal’s broken link detector internally is helping us ensure the content is consistent prior to launch.

HTTP 410: Gone – Geocities

I just ran a link checker for one of the websites I’m running, and got the first ever http error code 410: Gone that I’ve seen, for something that was a Geocities page.  This seems to be in the correct spirit of 410 as embodied by Mark’s blog post on it.

For those that have no idea what I’m talking about, don’t worry, it’s geekery about the specifics of how the web works under the covers.

OpenID and Gravatars

… also known as – please don’t make me fill out those same 6 fields to get into your website!

A few weeks ago I gave an MHVLUG talk on Ruby on Rails.  At the normal dinner outing afterwards one of our members was talking about maybe creating a small rails application where people could share and publish the podcasts they listen to, which I think is a great idea.  (Hopefully they’ll work on it at our web-hack-a-thon.)  But that lead into the inevitable issue of “user accounts”.

Man, I hate having more user accounts.  And if we are going to do this project, I really didn’t want everyone in the LUG to have to have another one.  So I resolved to see what I could do about reusing the MHVLUG accounts in an external way.  It’s actually pretty easy as there is a Mediawiki OpenID extension which lets you go both ways.  You can enable OpenID logins to the wiki, and make people’s user pages OpenID providers.  Rails has a very good openid plugin (plus it’s integrated as part of the restful-authentication-tutorial) so that would make it trivial to write an application that people can log in using their MHVLUG password (the id will be a bit different, but that’s explainable).  While Facebook and Google are still dragging their feet a bit here, Yahoo, AOL, and WordPress.com are all on the bandwagon, so many people already have these ids, they just don’t know it.

That got me following a few threads on OpenID, and looking at WordPress.  It turns out that WordPress also has a good OpenID plugin.  What’s quite interesting about that plugin is that it can make a wordpress instance the OpenID provider for 1 of the WordPress users.  So if you have a personal blog, it means you can now very easily be your own OpenID.  Being able to login in as http://dague.net is quite convenient.

Lastly, I wanted to throw something in about gravatars.  You know how everyone wants you to upload your picture to their website?  Stop the madness!  Gravatars are just keyed off your email address, so if an site has that, they can look you up, and get your profile pic from the gravatar folks.  Newer wordpress templates automatically integrate this.  I did minor adjustment to my template to get this support in there.  I’ve sworn now that Meetup.com is the last people I’m ever uploading a picture for, and that’s just because it’s hard to find complete strangers in a dinner without photos.  Again, there is a good rails plugin for this, so it’s pretty trivial to integrate if you are doing a Ruby on Rails application.

So, if you are a web2.0 hipster, and thinking about making a new service, please don’t make me create a new account, because, honestly, that’s getting close to being a deal breaker for me at this point.  And if you want my picture, the gravatar people have it.  I’m not uploading it for you again. 🙂

Thoughts on a new Era of Service

I, along with much of this country, even this world, was moved by Obama’s acceptance speech yesterday.  Two things really make me hopeful about this new administration.  First, that expert opinions will be listened to.  Many highly technical fields, including much of Science and Security, were completely run out of town in the last administration.  Secondly, that you don’t need to pass a loyalty test to get within 1000 feet of the president.  Rick Warren believes differently than President Obama on many fronts, many wanted him thrown out of the inaguration because of it.  But now we have a President that likes to have people around him with different points of view, to challenge his assumptions, and makes sure he’s seen all sides of an issue.  How refreshing is that.

And, throughout all of this, I am really impressed by this call to a new age of service.  This has been a consistant message for the last many months, and it personally inspired me.  Being a software guy, I have a skill that is massively needed by non profits.  The tech team of non profits, if they even have one, is usually one or two fresh college graduates, with a massive turn over rate.  It is a set of skills they don’t know how to hire, manage, or use, and one they can’t afford to contract.  The net result is that most non profits don’t really manage to leverage all these wonderful resources out there.  In the tide of this new age of service, I started thinking about what I could do to help on this front for our farm.  I offered my skills over break, and things are starting to kick off now.  Over the next few months I’m sure I’ll have some new experiences to post up here about the whole process.

If you are a Tech person, I highly encourage you to look out there at non profits or causes you are interested in, and step up.  Become their webmaster, or spend a few hours a month helping them on some tech front.  You have a set of skills they desperately need, and even a modest investment of your time and resources can do amazing things in helping out those organizations reach their goals.