"I am a machine. I am a weapon of war. I am a destroyer of life in the service of life, the sword and shield of my human creators." Bolo Invincibilus, Mark XXIII, Model B (Experimental) 0075-NKE "Nike".

A friend of mine was one of the Germans affected by Y2.01k. Of course, the real Fail here wasn't so much the moronic date checking bug as the bank's only response to his requests for help: "Just go to your home office and withdraw cash manually". Very helpful advice to someone living abroad...

_________________Living in a state free from the burdens of privacy and democracy since 2008-06-18.

Of course, they didn't really fix the Y2K problem. Years are now encoded as four digits, which means they'll roll over from the year 9999. I'm considering having myself frozen and revived in time to get paid obscene amounts of money to fix the Y10K problem. If you think that 8,000 years is plenty of time to fix the issue, keep in mind that banks and investment houses started seeing Y2K issues in the 1970's when 30-year loans and bonds made their software barf when it tried to calculate yields & charges out past 01-01-2000.

Of course, more imminently, we have the 2038problem. UNIX clocks will roll over some time in 2038 because they count in seconds from 00:00:00 01-01-1970. Since the counter uses a signed 32-bit integer, it will overflow to a negative number about 68 years before 1970. Changing to 64-bit numbers would push the date out to around the year 292 billion. If you used unsigned 64-bit numbers and started at the instant of the Big Bang, you could get all the way to 584 billion. That should be enough unless you're building a time machine that can reach the year 100 Trillion.

_________________==============================================="A sufficiently-advanced technology is indistinguishable from magic."Arthur C. Clarke"Sufficiently advanced magic is indistinguishable from technology."Jack L. Chalker"Magic is just another way of saying 'I don't know how it works.'"Larry Niven"Any technology, no matter how primitive, is magic to those who don't understand it."Florence Ambrose

Because they're lazy and sloppy. The issues cited not only point out poor programming practices, but a failure to properly test one's code.

_________________==============================================="A sufficiently-advanced technology is indistinguishable from magic."Arthur C. Clarke"Sufficiently advanced magic is indistinguishable from technology."Jack L. Chalker"Magic is just another way of saying 'I don't know how it works.'"Larry Niven"Any technology, no matter how primitive, is magic to those who don't understand it."Florence Ambrose

Regarding the 2038 issue, why does anyone ever use a signed number for a value that should not ever be negative? Just because you never expect the thing to still be in use that long or for the value to get that high, doesn't mean you should just leave everything as a signed value.

One fun example was in the old Dune II game. The amount of spice was stored in an 8 bit signed integer. If you harvested more than 64K spice in a level the counter would roll over to negative. You'd still get credit for all harvested spice in the score.

ISTR there have been plenty of cases where an unsigned value was used when a signed one should have been, with various unwanted or even disastrous results because the software was unable to measure/monitor/display a critical negative value.

So the question should be "Does this *need* to monitor negative values, ever? No? Then it needs to be set as unsigned so if the value goes unexpectedly high it will be able to handle it."

Another common programming counting gaffe is using plural words with 1. "There are 1 pages" "You have won 1 rewards!". I've been using mPoints to get free gift cards. Everywhere in their mPlaces app they have that wrong. 1 points, 1 rewards, 1 prize boxes. Can we have one fired programmers who is too lazy to do that correctly?

IMDB had that on their search results "There are 1 pages" until some years ago I sent them an e-mail explaining why it was wrong. I got a reply thanking me for pointing it out and they had it fixed within a day. It's not *difficult* to do, so there's no excuse for it getting into anything facing the public.

That's a Day 1 basic how to program example, testing if a variable is 1 or not then displaying non-plural words if the value is one and only if it is 1 or -1. Zero and all other positive or negative numbers get plurals. Why plural for zero? Dunno, that's just what I was taught in grade school in the 70's. Zero hits, one hit, two hits.

"I am a machine. I am a weapon of war. I am a destroyer of life in the service of life, the sword and shield of my human creators." Bolo Invincibilus, Mark XXIII, Model B (Experimental) 0075-NKE "Nike".

Regarding the 2038 issue, why does anyone ever use a signed number for a value that should not ever be negative? Just because you never expect the thing to still be in use that long or for the value to get that high, doesn't mean you should just leave everything as a signed value....