Here and there I see double comments. May 10, 2006 1:16 PM   Subscribe

Here and there I see double comments. Usually they occur when someone submits and the site takes the comment but is then unresponsive. They reload and *poof* a double comment. It occurred to me that an easy way to avoid this would be using a simple hash.
posted by chrisroberts to Feature Requests at 1:16 PM (6 comments total)

A user submits a comment, the comment + the thread ID (+ the user ID)* are hashed (md5/sha1/whatever) and stored in the same row with the comment. This would allow a check for the unique hash among comments posted by the given user before the insert, allowing a "Hey, you have already made this comment in this thread, are you sure you want to post it?"

The confirmation would allow common responses that may be posted multiple times by the same user in a thread, like yes/no responses, but alert people that the large comment they typed out is already there.

Not that the double comments are earth shattering or anything, just another pony, just another thought.

* You could add the user ID and then just search for the hash alone, not based on the hash for a given user
posted by chrisroberts at 1:17 PM on May 10, 2006

I very rarely see double posts here.

OTOH, Projects does need flagging, so we can tell Matt when projects have broken URLs in them.
posted by smackfu at 1:23 PM on May 10, 2006

I already do a hash to remove duplicates. Double comment posts often have one tiny difference (like an added space or period).
posted by mathowie (staff) at 1:25 PM on May 10, 2006

Fair enough. I had just seen a few around the last few days. No harm no foul!
posted by chrisroberts at 1:31 PM on May 10, 2006

Harm! Foul!
posted by cortex at 3:30 PM on May 10, 2006

Know Jesus biblically, Know Peace boblically.
posted by If I Had An Anus at 7:32 PM on May 10, 2006

« Older Self-Link Alert   |   Pony: Title guidelines on the 'Post a New... Newer »

You are not logged in, either login or create an account to post comments