I feel dirty. I’ve been hacking with PHP today, a language which objectively sucks, but which is used to write the platform on which this site runs, a job which it does pretty well.

I get a lot of spam comments these days. They’re all pretty much the same, so they’re generally easy to catch with statistical methods, but the way I’d implemented it (a cron job that runs once every few minutes and marks such messages as invisible) wasn’t quite solving my problem. It was pretty reliable, but not quite 100%, so I still had to wade through a vast number of bogus messages to correct false positives and false negatives.

So what I’ve done is to add a text field into which a specific word must be typed. It’s simple. It’s not even as sophisticated as Jeff Atwood’s naïve CAPTCHA. However, I’m hoping that it makes the comment form non-standard enough that it will be too much trouble for the spammers. We’ll see about that!

I’ve also taken the opportunity to fix the irritatingly wacky tab order on the comment fields.