LGF Polls Making a Comeback
Another piece of the LGF Blog Engine’s MySQL makeover was completed over the weekend—our polling application. This was kind of a tough one to convert from flat files; had to rethink the entire data model in SQL terms, and ended up with a complex but very flexible multi-table design that has all the features of the old version and more. Relational databases are a beautiful thing.
Everything’s now tested and fully functional. I haven’t imported the data for all of the existing polls, but I did convert the last two polls we ran for Idiotarian and Anti-Idiotarian of the Year 2006.
Here’s a new one created on the spur of the moment, to test the regex method that embeds polls in LGF entries, asking a simple question:
UPDATE at 4/30/07 12:09:44 pm:
If you’re seeing the message that says “You have already voted,” and you haven’t, here’s why: to prevent multiple voting, the polling application saves your IP address when you vote. If your IP is already in the list, you’ll see the message.
The problem with this approach is that some ISPs (for example, AOL) share IP addresses among their customers. So if you’re using one of those proxy-based networks, and someone else on the same network beats you to the vote … well, you’re outta luck.
Another way to prevent multiple votes is to set a cookie, but this is ridiculously easy to get around; all you have to do is delete the cookie. The IP method has the advantage of working pretty reliably, although it unfortunately means that proxy users may be denied.
Don’t sweat it; it’s only an internet poll…