Gareth Lennox

Monthly Archives: February 2009

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 […]

Commented out code

One of my pet peeves is opening a source code file, and seeing half of it commented out, or blocks within it commented out. What’s wrong with this? Commented out code serves no purpose, other than to confuse. If you try uncomment it, chances are that the code around it has changed, and the uncommented […]

SARS Scam

I’ve just noticed a new SARS (South African Revenue Services if you’re not South African!) related scam. The e-mail you receive is worded as follows: Tax Notification After the last annual calculations of your fiscal activity we have determined that you are eligible to receive a tax refund of ZAR xxxx.xx. Please submit the tax […]