Topic: Searching for "controversial" posts

Posted under General

Could posts be sorted by a formula like:

controversy score = (total votes - absolute_value(score)) / total votes

+100 (110 - 10) -> 0.1667
-100 (10 - 110) -> 0.1667
0 (10 - 10) -> 1.0 (most controversial)
+5 (55 - 50) -> 0.9524
+950 (1000 - 50) -> 0.0952

Or better, to rip off Reddit's algorithm:

controversy score = total votes / maximum(absolute_value(score), 1)

+100 (110 - 10) -> 1.2
-100 (10 - 110) -> 1.2
0 (10 - 10) -> 20
+5 (55 - 50) -> 21
0 (55 - 55) -> 110 (most controversial)
+950 (1000 - 50) -> 1.1053
-756 (157 - 962) -> 1.4802 (the cheese_grater image does not rank very high using this formula, which is fine)

The only way to sort of do this would be a search like order:favcount score:0 which narrowly checks only posts with 0 score, and gets mixed up with posts that inherited favorites from deleted inferior versions, but managed to find this gem: post #255275 with 38 upvotes and 38 downvotes currently. order:comments score:0 is similar.

Updated

TruckNutz said:
My avatar is controversial and so am I

It scores a 2.0 (27 upvotes, 9 downvotes, vote score is +18, displayed +19 must be due to that dead Priv+ bonus). Somewhat controversial, but not nearly as much as other posts (or other users).

To get a score of 3.0 you need half as many downvotes as upvotes (24 - 12)... or half as many upvotes as downvotes. Controversy score skyrockets as votes go up and downvotes and upvotes become equal.

Updated by anonymous

It probably isn't very approachable to do this in realtime because it requires loading the votes for every post to get the counts. A bunch of the search options are already pretty rough and slow. A one off could be done.

Updated by anonymous

KiraNoot said:
It probably isn't very approachable to do this in realtime because it requires loading the votes for every post to get the counts. A bunch of the search options are already pretty rough and slow. A one off could be done.

It is clearly better as another column in the database rather than a real-time calculation. Update the "controversy score" whenever a user votes on an image, along with a one-time calculation for over 900,000 posts at some point.

Updated by anonymous

Lance_Armstrong said:
I dunno, this is not a complex calculation we're talking about. Update the "controversy score" whenever a user votes on an image, along with a one-time calculation for over 900,000 posts at some point.

I mean, it is clearly better as another column in the database rather than a real-time calculation.

You realize we disabled the viewcounter because of resource issues and that's just a +1?

Updated by anonymous

NotMeNotYou said:
You realize we disabled the viewcounter because of resource issues and that's just a +1?

Well, I don't know how bad the view counter was (I know a lot of users seem to want it back) but there is obviously a small delay when a user votes on a post. During that delay is the time when some very simple mathematical operations could be performed, and the database value for the controversy score updated, just as the overall score, number of upvotes, and number of downvotes would be updated.

By contrast the view counter increases whenever anybody loads a post page (requires no user action other than loading the page, and the number of users loading the page is far more than the number that will vote on a post), and it might have additional code to prevent fake inflation of the view count (constant refreshing).

Updated by anonymous

Lance_Armstrong said:
It is clearly better as another column in the database rather than a real-time calculation. Update the "controversy score" whenever a user votes on an image, along with a one-time calculation for over 900,000 posts at some point.

Adding new columns to a table is a slow operation because it requires locking the entire table and then rewriting every row to allocate new storage space(This is less true for null columns, but you're looking to have these filled in, so the cost is paid either way), so this change would require a maintenance window. It also requires writing and testing a new sorting method and making sure it doesn't interfere with anything, and then writing code that recalculates the score during the voting system, and testing that as well. It's a lot of work, and the feature seems like it doesn't have much more than curiosity/entertaining factor.

If you want a one off for something like this, I'll run one and make a list.

Updated by anonymous

KiraNoot said:
If you want a one off for something like this, I'll run one and make a list.

Nah. I'll put the idea by @Xch3l to see what can be done client side.

Updated by anonymous

  • 1