If a user hits #1 for the weekly leaderboard, give them some bonus points. One implementation idea is when we calculate the leaderboard (which is cached and invalidated when a new score is inserted), get the #1 user and cache it. On the next leaderboard computation, see if it changed and if so, award points to the new #1 user. If it didn't change, do nothing. This requires no extra queries... it's a few memcache calls (other than if there is a new leader, then we INSERT more points, which then invalidates the leaderboard and recomputes, etc.) Aside: If we do give bonus points for being #1, and more than one user is tied for the #1 spot, we're not doing any explicit sorting so it's whatever the database returns. We might have to figure out what to do there. Question: How many points?
Let's do 10. If they're tied, the user just has to do one more review to claim first place. My biggest concern is gaming. Since we're giving away prizes, two people could review together and keep stealing 1st place away from each other to get more points. Probably an edge case, but can you think of an easy way to fix this?
(In reply to Gregory Koberger (:gkoberger) from comment #1) > Let's do 10. If they're tied, the user just has to do one more review to > claim first place. True, but one of the users with the tied score will get bonus points (the one who happens to be #1), while the other does not. > My biggest concern is gaming. Since we're giving away prizes, two people > could review together and keep stealing 1st place away from each other to > get more points. Probably an edge case, but can you think of an easy way to > fix this? Ooh, sneaky. The only thing I can think of off hand is to limit #1 bonuses to once per day. So in the above scenario, those 2 users can get their bonus only once no matter how often they leapfrog each other. Where we store that I'm not sure yet. Or, set it up on a cron and check #1 once per day, but then it's about gaming it as to *when* you become #1 so you do it before the cron. I don't like this idea much.
I'd avoid the cron. Too complicated :) Plus, instant gratification is important. I like the idea of giving it once a day - that should prevent any gaming issues.
I know we agreed that staff should accumulate points like anyone else, but we should be exempted from this. The top non-staff member of the leader board should get points. It's rare that anyone does more reviews than me in a week.