Home EN General Discussions & Questions

Negative (-) Values

In the text translation (of the video) there was a statement about how there was no substraction in the logic so it was difficult to understand how we ended up with negative values.

As a developer by profession a few things that can cause this are:
- multiplication by a negative number
- overflowing the number boundry (different programming languges have different sizes for numbers)   Things like integers, floats, doubles, etc.  This causes all sorts of wonkiness with calculations if the proper type isn't taken into account.  (Type can also effect the # of decimal points -- which can be a problem in rounding and/or calculations involving large numbers).

Based upon observation of running boosters in the Cooperative Hard Worker Event (CHWE), I do know we have fractions of points allocated too us, since I'll go up by 24, 24, 24, 25, etc., then the pattern repeats.

Just throwing this out there in the event in helps the development team for additional ideas in how to track down the issue.

To reduce the amount of repeat bugs, it's common to have a Regression Test suite written that will check for particular errors and prevent them from rehappening.  (Automated ones that run when code is checked into the repository is best).  We had a process that ran on code commit which would build the code out to the development environment, run the regression test suite, and then generate an email to the Dev Team if something failed.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file