Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Comments on Why can users get negative reputation?
Parent
Why can users get negative reputation?
I saw a user account which had a negative reputation. On the StackExchange sites, the minimum user rep is 1.
So why is a negative reputation possible here? I'd like to know the reason, if it was a conscious design decision.
Post
My guess:
Because they used a signed integer type for rep, therefore it's not capped at 0.
(And hypothesizing that because of lazyness and simplicity rep substraction performs just a substraction instead of a capped substraction).
rep := rep + -penalty;
vs:
rep := (rep + -penalty > 1) ? rep + -penalty : 1;
Here using a simple substraction has the advantage of easier detection of arithmetic overflow. But I doubt it's using raw/machine numeric types. Because it's Ruby - I guess it auto promotes to arbitrary precision. But it was supposed to be C#. There are raw/machine numeric types in C#.
your comments
I don't think the Q was about technical details.
I agree. However, in the particular case of Codidact1, many current - interim? - design decisions are tightly intimate with the corresponding technical implication, because they actually predate Codidact2 itself, in some cases by many years. I could guess therefore, some of those might been taken probably with simplicity in mind.
1: This Codidact occurrence, you can read as Qpixel.
2: Codidact in the broad sense. Post-"Dear Stack Exchange, Inc.,".
1 comment thread