htuttle
(1000+ posts)
Send PM |
Profile |
Ignore
|
Fri Nov-05-04 11:00 AM
Response to Original message |
8. Not 32000 votes. I'd bet 32767 |
|
Edited on Fri Nov-05-04 11:03 AM by htuttle
That's the maximum value of a 'short integer' in computer lingo. When you exceed it with a short integer variable, it 'overflows' and turns over kind of like an odometer.
EVEN FIRST YEAR COMPUTER SCIENCE STUDENTS KNOW TO CHECK FOR COUNTER OVERFLOWS!!! ESPECIALLY IF YOU'RE USING SHORT INTEGERS!!
Why the hell even use a short int for a counter? Saving 2 bytes isn't going to help much anywhere.
I give them a D- in this assignment. The only reason it's not an F is because the software at least launched and ran.
I don't know if I can even express to a non-programmer how lame this error is. Imagine if you took your car to a mechanic to get the oil changed, and they forgot to put the filter back on. It's that lame.
...
Or if GM designed a car where you couldn't open the front and back doors at the same time. It's THAT lame.
|