2016 Bug Hits Text Messages, Payment Processing 340
An anonymous reader writes "It seems some systems are suffering from a Y2K16 bug. When 2009 ticked over to 2010, some Australian EFTPOS machines skipped to the year 2016. Coincidentally, some Windows Mobile users are also having issues with their new year SMSes coming from 2016. What function could cause this kind of error?"
Some kind of... (Score:5, Insightful)
0x09 = 9 decimal when interpreted as either binary or BCD.
0x10 = 10 decimal when interpreted as BCD, as 16 when interpreted as binary.
4-bit years? (Score:2, Insightful)
A 4-bit year field? Wrapping from 9 to 0 (16) ?
Re:10 hex is 16 decimal (Score:1, Insightful)
nycguy gets 100 points. Thread closed.
Re:Some kind of... (Score:1, Insightful)
It's almost as if you're supposed to have some idea about what you're talking about before you publish.
Still, at least people like you subsidize Twitter and blogger.com.
Re:Some kind of... (Score:4, Insightful)
0x10 is 16 in hexadecimal, not binary
0x10 is still 16 in binary.
(0x10 always means 0001 0000 in binary. The question is whether that number is interpreted in BCD, i.e. 10, or as a binary integer, i.e. 16.)
Re:10 hex is 16 decimal (Score:2, Insightful)
That may be an attempt to distinguish the BCD values from normal binary numbers. The only value for which swapped nibble encoding equals binary encoding is 0, so a test-case would catch a misinterpretation easily. I've seen a unit test which tests the algorithms with 2005 for the year. That test will not catch an error in a single-byte-year algorithm which mistakes non-swapped BCD for binary or vice versa.
Re:Some kind of... (Score:3, Insightful)
Er, the "11" was in unary!
Re:* points finger at Duct Tape Programmers (Score:4, Insightful)
Yes, but that's just the point isn't it ?
There are 10 types of people ...
1. Those who will make a solution that will work for perhaps 30 or 35 years, because it is "good enough" for the foreseeable future, ala Y2K, 2032 for linux etc ...
2. Those who will want to do unit tests to see if the date function still works in the year 9500, and won't pass it through QA until it does.
Now, consider the PHB, when you tell him that solution 1 will be up and running in 5 minutes, whereas solution 2 will be up and running in about 5 years, once the specification has been formalized and ratified by the UN security council.
Which solution will the PHB choose I wonder ? Programming has always been a compromise, no one *really* expects that something they code today will still be around in 35 or 40 years, it's only occasionally that something *does* survive that long (COBOL legacy systems etc), and come and bite us in the ass when the new millenia arrives.
Having said that, I wonder how many of the "buzzword" languages we see today will still be around in the next 40 years ? The concept of longevity might have been relevant in the 60's, these days it's more a case of a complete rewrite every year or so.
MESSAGE FROM THE FUTURE (Score:3, Insightful)
This is an indication that the human race will survive 2012! Rejoice!
Re:no that's a Y210 bug (Score:2, Insightful)
Mod points, I wish I had them.
Re:WHY DO PEOPLE INSIST UPON REPLACING THE FIRST Z (Score:3, Insightful)
Any EE will tell you that 2k16 means 2.16k or 2160. How does this garbage continue making it to the front page?
Actually, most EE's I know are smarter than that. The fact that X means Y in some contexts does not mean X means Y in all contexts. Most competent speakers of the language have no trouble determining meaning, taking context into account. It's rare that someone manages to get an EE while lacking the level of intelligence required to do that.