Redesign

I've rewritten the website from scratch. Again.

This time the excuse was to learn Django.

Using a web framework like Django instead of a CMS like my previous Drupal installation gives me a lot more control over the fine details, which suits my pedantic programmer brain. Unfortunately that programmer brain is not so good when it comes to the design side of things, so I opted to keep things simple. This simplicity has resulted in a minimalistic, uncluttered look that I'm actually quite pleased with.

Here is a screenshot of my new design (on the right) alongside the Garland theme from my old Drupal 5 setup.

2007 design2010 design

Sources of inspiration for the design include semicolon and Furry Brains: two clean looking blogs I stumbled across during my Django research.

In terms of the code, when putting this site together I made use of:

I hope to blog about each of these in turn over the coming weeks, so subscribe if you want to catch that.

In the meantime, please contact me if you find any problems with the new site, broken links etc.

Find index of selected option

Given this HTML…

  <select>
      <option>Index zero</option>
      <option>Index one</option>
      <option>Index two</option>
  </select>
  <p>Selected option has index: <span id="output">0</span></p>

here is a jQuery code snippet to find the index of the option that has been selected.

$('select').change(function() {
  $('#output').text(
    var $this = $(this);
    $this.children().index( $this.children(':selected') )
  );
}).trigger('change');

Use jQuery's index function to return the index of the item that matches the ':selected' selector within the children of the select element.

Example:

Pipe to filter the Google Code Issue Updates feed

Google Code provides various feeds for every project they host. The "Issue Updates" feed contains entries for all the issues on the project. What if you're only interested in one issue? Filter the feed with Yahoo! Pipes of course.

My pipe is an example of how easily this can be achieved with a simple regex in the Filter module. I've tied the name of the project and the issue number to user inputs, so you can use this pipe to track your favourite issue on your pet project. Personally, I'm looking forward to having support for Pie Charts baked into an official release of flot, and will be tracking progress with this feed.