The honeypot technique is laughably simple. The basic approach involves adding a hidden input to your form. Your users will never see it, but a bot will. Once submitted to your server, you only need to check if its value is not empty. If so, you have a spammer on your hands! If you combine this with a time tracker, you should be able to prevent a sizable chunk of spam.
At this point, we have a working example. But we've also made a big mess in the process. So let's take some time to clean up the code and make it reusable for any form.
It can be useful to organize and structure new features as if you were building a package - even if you never release this package to the outside world. With that in mind, let's group all Honeypot-specific classes and components into a single namespace.
At this point, you should fully understand the honeypot technique. If you'd like some extra credit, however, let's spend a little more time discussing code organization and configurability.
*Series still in development. Check back often for updates.