The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Anonymous posting, rating system

I want to do something where anonymous users can vote on various links.  How would you do it to prevent a person from revoting.

IP?

I considered even letting you revote something, but you have go through my simple spam verification.  I figure, the revoting will scew the ratings but it really means you liked something.
Bot Berlin
Tuesday, November 14, 2006
 
 
Well, there's anonymous as in you don't know who your customers are, and there's anonymous as in we don't know who your customers are.

I think in this day and age, people are ok with you knowing who they are and if you put up an easy to read privacy policy, you can use cookies or require them to log in with a nickname or handle.

I also think there's some value in being able to identify people with common or opposing tastes, and taking their tendencies in common. For example, if I new Joe Stick pack normally hates Sci-Fi movies but loved "Killer Klowns from Outer Space", I can give his vote the weight I feel it deserves.
TheDavid
Tuesday, November 14, 2006
 
 
Slight correction: government office voting machines obviously are the exception to the rule. :)
TheDavid
Tuesday, November 14, 2006
 
 
Yea, that is good.

But if I visit a site like reddit.com and login, then I rate a particular link.

How would I do that without logging.  Just theoritically.

Ip address?
Bot Berlin
Tuesday, November 14, 2006
 
 
Can't you insist the anonymous users allow cookies on their system?  Then put a cookie on their system to indicate that they've voted?

Oh, right, they can delete those cookies, can't they.  Hmm.  Looks like IP address, then.
AllanL5
Tuesday, November 14, 2006
 
 
Plus,
A user might vote on thousands of links.  Wouldnt I have to save a vote for everyone of those links and then save that in the cookie?
Bot Berlin
Tuesday, November 14, 2006
 
 
Err...

The cookie contains a unique id that's a foreign key in your database. So if you tried to "insert" a vote that relies upon the link and the cookie id combined as keys, and it comes back with one of those SQL key integrity error messages, you know it's a re-vote. (The better way is to check to see if it exists first, but you get my point.)

An IP address works in almost the exact same way, except it doesn't acknowledge NATs and other router tricks. I think everyone in my household would have the same IP address as far as your site is concerned. But the cookie/session variable goes all the way down to the browser itself.

That said, if you knew you would have a practical ceiling on the number of links in a year, you can do something like Hoffman encoding. I had a similar problem and essentially bucket-sorted links by the year, then hashed the visited links for the year.

A cookie for me would look like a six element array (representing the past six years) and each element consisted of a 32 character long string that was essentially a hash of all the database keys to the links I visited that year.
TheDavid
Tuesday, November 14, 2006
 
 
Anonymity or uniqueness. Pick one.
dev1
Tuesday, November 14, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz