this post was submitted on 16 Jun 2023
28 points (100.0% liked)

Programming

13375 readers
9 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
 

There is a request for a comment on this issue Controversial posts and comments #2515. Do you have any ideas on how best to implement this?

I'd like to see some more people chime in with opinions, but maybe that'll come with a PR. At the very least, it's something that can be moved forward with.

— dcormier

you are viewing a single comment's thread
view the rest of the comments
[–] doylio@lemmy.ca 7 points 1 year ago* (last edited 1 year ago) (2 children)

My first thought is to rank items by totalVotes / score. This would prioritize posts that get lots of votes in both directions.

Example:

def getControversialScore(upvotes, downvotes):
  return (upvotes + downvotes) / abs(upvotes - downvotes)

getControversialScore(50, 10) # 1.5
getControversialScore(4, 5) # 9
getControversialScore(6, 30) # 1.44
getControversialScore(30, 28) # 29
[–] Modal@lemmy.sdf.org 3 points 1 year ago* (last edited 1 year ago) (1 children)

It might depend on the definition but I'd probably expect engagement/total to play a bigger factor.

As it is it weights very heavily towards evenness:
A: (11, 10) = 21
B: (99, 90) = 21

They have the same ratio of votes but I'd expect B to be more controversial since more votes are tied up in the controversy / it got more attention. Maybe most people just don't care about A so they didn't bother to vote.

[–] sneakattack@lemmy.ca 5 points 1 year ago

If you square the numerator then the busier comments would score higher.

[–] l3mming@lemmy.fmhy.ml 2 points 1 year ago* (last edited 1 year ago)

I like this. Super clean and simple.

That said, I suspect Reddit's 'controversial' sorting might work a little differently, as I often used it to see what the crazy people were saying.

I haven't played with the numbers, but I'm not sure that your proposal would push the crazies to the top - just the moderate crazies.