News for hackers. Stuff that matters.
Re:Swedish Exchange paralyzed by buy order for "-6 stocks" by CJefferson on Thursday November 29, 2012 @06:39AM (#4847188)
Actually, I find you should always use signed ints.

With signed ints, you can notice that '2-3' has below 0, and act accordingly. If you do '2-3' with unsigned ints, there is not really any way of finding out something went wrong (other than looking for very large numbers).

Of course, particularly in a financal system, you should probably use an integer type which throws/aborts if an out-of-bounds error occurs.

Re:Swedish Exchange paralyzed by buy order for "-6 stocks" by mbesto on Thursday November 29, 2012 @06:49AM (#4847218)
And this is why I almost always never trust advice that has the words 'always' and 'never'.
Re:Swedish Exchange paralyzed by buy order for "-6 stocks" by maaku on Thursday November 29, 2012 @09:50AM (#4847941)
Or trapping overflow/underflow.