Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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.

Post History

57%
+2 −1
Q&A Why can users get negative reputation?

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 i...

posted 4y ago by .                                                .‭  ·  edited 4y ago by .                                                .‭

Answer
#6: Post edited by user avatar .                                                .‭ · 2020-09-25T17:08:05Z (about 4 years ago)
add a comment answer
  • 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#.
  • 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 _Codidact_<sup>1</sup>, many current - interim? - design decisions are tightly intimate with the corresponding technical implication, because they actually predate _Codidact_<sup>2</sup> itself, in some cases by many years. I could guess therefore, some of those might been taken probably with simplicity in mind.
  • <sub>1: This _Codidact_ occurrence, you can read as _[Qpixel][0]_.</sub>
  • <sub>2: _Codidact_ in the broad sense. Post-"[Dear Stack Exchange, Inc.,][1]".</sub>
  • [0]: http://github.com/codidact/qpixel
  • [1]: https://dearstackexchange.com
#5: Post edited by user avatar .                                                .‭ · 2020-09-25T11:07:26Z (about 4 years ago)
  • 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.
  • 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#.
#4: Post edited by user avatar .                                                .‭ · 2020-09-25T11:05:32Z (about 4 years ago)
  • 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
  • ```
  • 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.
#3: Post edited by user avatar .                                                .‭ · 2020-09-25T11:03:47Z (about 4 years ago)
names for vars
  • 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).
  • ```
  • a := a - b
  • ```
  • vs:
  • ```
  • a := (a - b > 1) ? a - b : 1
  • ```
  • 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
  • ```
#2: Post edited by user avatar .                                                .‭ · 2020-09-25T11:02:14Z (about 4 years ago)
  • My guess:
  • Because they used a signed integer type for rep, therefore it's not capped at 0.
  • (And rep substraction performs just a substraction instead of a capped substraction).
  • ```
  • a := a - b
  • ```
  • vs:
  • ```
  • a := (a - b > 1) ? a - b : 1
  • ```
  • 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).
  • ```
  • a := a - b
  • ```
  • vs:
  • ```
  • a := (a - b > 1) ? a - b : 1
  • ```
#1: Initial revision by user avatar .                                                .‭ · 2020-09-25T11:00:11Z (about 4 years ago)
My guess:

Because they used a signed integer type for rep, therefore it's not capped at 0.

(And rep substraction performs just a substraction instead of a capped substraction).

```
a := a - b
```

vs:

```
a := (a - b > 1) ? a - b : 1
```