What’s your sign…

Sometimes I wonder if I know too much for my own good…

I read this article…
http://www.palmbeachpost.com/ politics/content/news/epaper/2004/11/05/a29a_BROWVOTE_1105.html

and the second I hit the 32,000 number it hit me what’s wrong with their program…

1st off the number 32,000 is wrong it’s actually 32767… but that’s sorta splitting hairs to the general public…

But 2ndly the reason for the counter going backwards is because they have brain dead programmers… They used the wrong type of number (16 bit signed integer vs floating point if you are really curious) to compute this… grumble grumble… in that type of number the maximum number you can work with is 32767 or -32765 depending… when done wrong when you hit 32767 and add 1 rto it, the math rolls over into -32765… and add one to that you get -32764.. etc etc… trim off the “-“ and you get a number that’s counting down…

Any 1st year programmer should know this stuff…. Makes me really irritated that things like voting systems are handled by morons…

Advertisement