20

Given that the latest global reputation recalculation generated the usual spate of "Where's my reputation gone?" questions is it time to revisit the idea of performing periodic recalculations so people get used to the idea of reputation going down as well as up?

If we limit it to the occasions when an post is deleted or undeleted or a question is migrated (which deletes the answers) then it shouldn't be too much of a hit on the database.

Users can recalculate their own reputation (limited to once every 24 hours) from the /reputation page and that doesn't seem to take too long - but I don't know how many requests are received per day.

I suppose we'd need to know a) how many users are affected by post deletions on average each day and b) how this compares to the number of user instigated recalculations that happen now. If it's a lot more then I can see this being marked [status-declined]

1

6 Answers 6

10

A full reputation recalc is expensive business, even if it is only to affect a handful of users. Also it is kind of jarring to randomly feel like you are losing/gaining rep for no obvious reason. It is very side effecty as it may cause rep to be lost or gained for unrelated posts.

That said, there are some obvious advantages to forcing a partial recalc when a post is deleted.

If people are aware that the horrible "-1" vote cost, horror of an experience, will dissipate when the post written by a clown, that makes no sense and never will, is deleted - perhaps they will be more inclined to bite their tongue and cope with the horrific -1 temporary reputation loss. In turn this would make our auto-banning asker thingy on SO more effective.


As to visibility, this is tricky business, at the moment when a post is deleted we make no announcements anywhere to the offending user. It just vanishes. This strategy has some advantages cause it avoids a lot of the "NOT FAIR, my post was deleted" kind of support issues.

Deleting is a last resort, it never happens to "good" content that belongs on the site.

On the flip side, in case of migrations, notifying the user may be a good thing as them may discover and participate in another site due to this.

Tricky business.

2
  • And as Nick writes: The speed to display the page and the speed to do an actual recalc are not the same, as we go back and fix history affected by cap shifts and such when votes are deleted/removed...this doesn't happen for /reputation display, only the recalc.
    – Arjan
    Mar 21, 2011 at 21:10
  • NOTE: now users (both askers and answerers) are notified when questions are migrated.
    – ChrisF Mod
    Aug 14, 2011 at 15:28
9

As someone who has just lost 200 rep, i would love to know exactly how i lost it - was it question deletions? User deletion? Supposed vote fraud?

If it was question deletion because the question was crappy or got down-voted to oblivion then i'm cool with that. But if it wasn't, then who was the user who so rudely deleted the question after i had put good time into answering it?

Arguably if an OP wants to delete their question that hasn't been down voted and has upvoted answers it shouldn't be deleted - if the OP wants them gone then just reassign them to the Community User. Sure the OP owns the question, but the knowledge contained within the upvoted answers has been given to the community as a whole and shouldn't be deleted.

Either way, i just want to know where those rep points went. I'm a geek, i don't like a lack of answers or clarity. Black holes exist out in the universe but they shouldn't exist on SO. I'm not Jon Skeet, i don't earn 200 rep just for sitting there and staring at the screen for 2 minutes (all due respect to @JS).

3
  • You can't delete your own post if it has (a certain number of) answers or upvotes so that's already taken care of
    – ChrisF Mod
    Feb 27, 2011 at 22:34
  • @ChrisF: really? You wouldn't happen to have a reference, would you? I don't intend to cast doubt, but that's a feature I was completely unaware of. Feb 28, 2011 at 0:24
  • 1
    You can't delete your own Question when there are upvoted answers. The only restriction on Answers is when they're Accepted.
    – H H
    Feb 28, 2011 at 21:12
3

Cool, I wonder where you got the idea from!

In addition, I would say that it needs a notification, or you will still get the comments. I am about to hit 50k rep on SU for the third or fourth time (and my rep is already 30 points higher/out of sync) - I have tried looking in the (10k) mod tools, however I can't see anything that was closed/moved/deleted, so I am clueless as to what happened.

I agree that I think this would be good - I have done a re calc before and it seemed to happen pretty fast, so I wouldn't of thought it would be a big drain to just recalc the users who are a part of a question upon close/delete/move.

2

Let's do some maths. By "not very long" - how many milliseconds do you envisage this taking per user?

https://stackoverflow.com/users - this shows me 10050 pages, so about 350k users.

page 3000 - avg points 25
page 2000 - avg points 64
page 1000 - avg points 250
page  500 - avg points 698

Even at page 5000 on (or earlier) where a user has only 1 rep, they could have had an approved suggested edit + downvoted answer. If the downvoted answer was deleted, then you need to give them back 2 points.

Assuming only 2 timings:

  • 1ms for <=10 rep, e.g. page 5000+ => 170k users (approx)
  • 2ms for normal users, even up to Jon Skeet => 170k users (approx)

That would take a total of 3x 170k = 142 => 8.5 minutes. 2ms is not too far fetched, given that only about 200 users get within 10% of Jon Skeet's rep, and it can't take 20ms to produce JS's /reputation page.

###So all in all, 8.5 minutes per day? I say let's vote this up!


More facts

The query below which fully calculated daily capped points based on a modified version of https://data.stackexchange.com/stackoverflow/qe/1035/fastest-to-20k takes less than 20 seconds to complete.

if object_id('tempdb..#t') is not null drop table #t
;

create table #t (
owneruserid int,
rn int,
creationdate datetime,
bounty int,
immune int,
votes_capped int,
total as isnull(immune,0) + isnull(votes_capped,0),
primary key clustered(owneruserid, rn))
;

insert #t
select
  owneruserid,
  rn=row_number() over (partition by owneruserid order by creationdate),
  creationdate,
  sum(bounty) bounty,
  sum(coalesce(accepted+bounty,accepted,bounty)) immune,
  (select min(a) from (
     select sum(rep) a
     union all
     select 200) x) as votes_capped
from
(
select
  p.owneruserid,
  v.creationdate,
  case votetypeid
      when 1 then 15
      end accepted,
  case votetypeid
      when 8 then -bountyamount
      when 9 then bountyamount
      end bounty,
  case votetypeid
      when 2 then 10
      when 3 then -2
      else 0
      end rep
from votes v
inner join posts p on p.id = v.postid
inner join users u on u.id = p.owneruserid
where v.votetypeid in (1,2,3,8,9)
  and p.communityowneddate is null
union all
select p2.owneruserid, v.creationdate, null, null, 2
from votes v
inner join posts p1 on p1.id = v.postid
  and v.votetypeid = 1 -- question accepted by asker
inner join posts p2 on p2.id = p1.parentid
inner join users u on u.id = p2.owneruserid
where p2.communityowneddate is null
) j
group by owneruserid, creationdate
;
1
  • That said, I believe this is less to do with machine-resource concerns than surprising users. Feb 28, 2011 at 10:26
1

I'd suggest a slight amendment, perhaps a recalc when the number of deleted users/questions and migrations reach a certain threshold (as an example 5 users deleted, 30 questions closed or 50 migrations, these numbers are based on an assumption that migration happens more than question deletion, and similarly that more often than user-deletion).

While I've read the Server Fault blog often enough to realise the built in capacity of the systems, I don't think the database hit would be negligible, certainly not if it's invoked by ever deletion/migration event.

I do, though, strongly agree with the need for a notification message when this happens, and, at the time of writing, 50 other people agree with me (in comments)

3
  • However, what you are talking about would most likely require big modifications to be made and to reclac an entire site like SO could take some time/big hit... I think the original suggestion is best so that it just does it as/when a question is deleted as this will only affect a handful of users at any one time. Feb 27, 2011 at 22:02
  • @Wil: there is that possibility, and my suggestion was more a matter of compromise between the extremes. I, obviously, have little idea of the scope of the problem, but given the current, infrequent rate of re-calcs I suspect it must be, at least, a relatively large problem to perform a re-calc. Until Jeff, or Kyle (SF Blog), weighs in to explain the problem it's tricky to find the extremes, let alone a valid compromise. Feb 28, 2011 at 0:22
  • There doesn't have to be a problem in the slightest do to a recalc - you can do it yourself at any time... they are building a new feature and want it to be accurate (I think they said)... I would rather just see reputation accurate all the time rather than ever manually having to do a recalc. Feb 28, 2011 at 0:29
0

This is now given the recent changes that are being made to keep the display reputation in line with actual reputation, as outlined by Nick Craver here:

Recent Reputation History Changes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .