Friday, 25 February 2022

Karma

Since we've had that most recent crash a couple of months ago, and especially since finding about that fucking hack, I've been going through the old code base trying to proactively fix shit before it'll become an issue. In the process, I've been revamping and trying to streamline some of the back end features. One of which is the Karma system.

The codebase has always had a regen feature built in for handling users with negative karma. Any user with a karma score below zero would gain .2 karma points a day when the user visited, but the function was embedded into almost every page; Requiring multiple database calls each time a page was loaded to determine if a user was below zero, if this was their first visit of the day, if they had their regen of the day, etc...

Not that I give a shit about them, but fuck all that overhead.

So, I've streamlined all that into a once per day cron job that automatically regens subzero users that have visited the day previously with a .2 karma point increase. Boom, done. One query for the day and it's handled.

The second thing I've done on all this, is I've added a decay. We've got so many users in the upper echelons of the karma scoreboard that haven't been here in years, it's just silly. So, the second half of the karma cron job is decaying the karma scores of users that didn't show up the previous day with a .2% decrease on their karma. This doesn't affect subscribers, but there aren't many of those anyway, consider it a perk.

I've got some other stuff in the pipeline I've been working on that's still going to be a bit, but I'll probably be needing some beta testers that I'm just gonna grab at random. So don't be surprised if you get a message from me out of nowhere one day asking if you can give me a hand.👍

Fun fact: You wouldn't think so, but we're still seeing a few hundred logged in users a day.
[SFW] [Meta SE] [+10 Informative]
[by steele@8:44pmGMT]

Comments

Alecz said @ 9:24pm GMT on 25th Feb [Score:3]
Thanks for the look behind the scenes. May not contribute much, but I do enjoy a sensible endowment more or less regularly.

As a developer, it's good to hear tales from other people's trenches. Would mod, but probably lack the karma :)
crwk8 said @ 9:16pm GMT on 25th Feb [Score:2]
So... karma entropy.

Thank you for the effort and thought.
ModerateJohnson said @ 8:44pm GMT on 12th Apr [Score:1 Informative]
While I totally appreciate the need to bring down the karma of people up in the thousands, it seems that users who have earned enough karma to post and moderate are losing that privilege because of the decay. Could you please make it so that the decay doesn't drop people below the amount necessary to still be able to post and moderate? I'm getting a lot of notifications telling me I've lost my abilities.

Smooches!
steele said @ 1:22am GMT on 13th Apr
Ah shit. Yeah, that's a fair point. I'll see about doing something about that this weekend.
Naruki said @ 3:48am GMT on 26th Feb
Would be nice if we could mod "in place" without reloading the page, same for commenting, but I realize that's kind of difficult unless you do things the way Facebook does.

From your description, it seems like negative folk get more of a benefit than positive folk in some situations. For example, take two people who visit once a week: one is negative, the other positive.

The negative person gains .2% karma 1 time.
The positive person loses .2% karma 6 times.

I'm not sure if that's an oversight or intentional, but I don't quite understand the rationale.
steele said @ 4:53am GMT on 26th Feb
their purposes are unrelated, the shared description is merely a matter of related implementation. negative karma regen is for administration of commenting ability. while positive karma decay is to keep the rankings relatively fresher for those who are into that sort of thing.
R1Xhard said @ 7:43am GMT on 26th Feb
I was trying to game the system to try rank 69th there goes that plan.

Being a long visitor of SE for a while from the old pages of politics to what it became to what it is.

Thanks for keeping the flame going, glad it's not been extinguished or discarded.

It might take a bit of work but why not maybe incentivize the negative Karma's to a point. Maybe instead of looking them out allow them to only talk to other -Karma people. Then hey sell it as a "bonus" upgrade to the subs that they can filter either only +'s or -'s only or a combination of boths commnet's. I would hope that maybe the MadPride and Cathy porn would find a nest to roost if you let the -'s post. Again another view post click box for registered user's.

Young liberal anarchist me would be shaking his head at that shitty sales pitch, but hey it's my lackluster attempt at poor humour with atrocious spelling. Maybe you should of listened to the teacher more young me, take that as a lesson.
Paracetamol said @ 8:24pm GMT on 26th Feb
TBH, I don't quite get the subcribers perk thing … shouldn't they be handled like everybody else?
steele said @ 12:44am GMT on 27th Feb
Eh, i may change it later, we'll see. Being a subscriber has always had perks. Without subscribers this place pretty much goes away.

Post a comment
[note: if you are replying to a specific comment, then click the reply link on that comment instead]

You must be logged in to comment on posts.



Posts of Import
Karma
SE v2 Closed BETA
First Post
Subscriptions and Things

Karma Rankings
ScoobySnacks
HoZay
Paracetamol
lilmookieesquire
Ankylosaur