Gareth Lennox

Yearly Archives: 2009

Empty unit tests

I was reviewing some code, and noticed a couple of unit tests that had “TODO” comments in them (and no code). The problem is that when running these tests, they were passing. Someone reading the list of tests would assume that the test was testing what it claimed to be testing, when in actual fact […]

Using Yahoo Pipes to aggregate feeds

I’ve got a list of links in the sidebar of this blog. What is not obvious is that this list is an aggregated list of links that come from multiple sources. At the moment, I mark links as interesting from two sources: Delicious Google Reader (shared items) Ideally, I don’t want to have 2 lists […]

Refracted

So I’ve decided to start posting my own photo’s onto a dedicated photo blog, you may have noticed the photos appearing in the sidebar (the wonders of rss!). If you’re interested in photography, you might find it interesting. The blog’s address is http://refracted.co.za/. I’m not going to be posting any more photos on this blog, […]

How to sort rated items

This is a fascinating article: PROBLEM: You are a web programmer. You have users. Your users rate stuff on your site. You want to put the highest-rated stuff at the top and lowest-rated at the bottom. You need some sort of “score” to sort by. The article goes into detail about how all the most […]