You will notice a new requirement when you want to post a comment to this blog: you are asked to type in my first name. It is not a trick question, not to you, the reader that is. It is supposed to trick automated spammers though. (Be sure to enter my name exactly as shown next to the field.) Thanks to Jeff Barr for posting the relevant bit of code on his blog.
Comment spam continues to be a problem. You may not always see this as some of the messages are caught to the extent that they are sent to my mailbox for approval. I used to deal with these by creating a filter in my mailbox so that any such email was sent directly to my Trash folder. Unfortunately, as I described earlier, this still left me with a serious problem since my provider decided that I was using too many resources and was going to either shut down my account or start charging me $100 for it. That’s extreme for a relatively small site.
I experimented with a CAPTCHA solution (completely automated public Turing test), but ran into some problems. So I went looking for alternatives and this solution seemed like it might work and I was able to implement it. So we’ll see. From what I can tell, even if you don’t get it right the first time around, the system should keep your comments in the comment field so hopefully by pressing the back button – after you receive the error message – you can retrieve what you wrote.
Let me reiterate, the requirement is exactly as simple as it sounds. (Although given the number of times people misspell my name perhaps it’s not quite as simple as I think. But hopefully by having it right there next to the field you’ll be able to do it.:)
Feel free to leave a comment here to try it out.