Moving Decimal Bug Loses Money
mario.m7 writes "Poste Italiane, the Italian postal service, suffered yesterday from an abnormal computation in ATM and credit card operations, since the decimal comma was not taken into account. The whole sum was therefore multiplied by 100, resulting in a 115,00 Euro transaction being debited as 11.500 Euro! Thousands of accounts are deep in the red and locked (link pumped through translator), so that no more operations are possible. Poste Italiane is gradually recovering the problem, fixing the error and re-crediting the sum debited in excess. Consumer associations have offered support to clients in case this lasts longer and causes damage."
Good thing the programmers will be shielded from any consequences from this little 'bug'.
It doesn't matter that it caused potential harm to clients, corporations in the form of losses, lost time, expenses, etc.
The simple programmers just need to release a hot-fix or service pack.
Now if these were engineers, and I mean real engineers not "software engineers", there would be consequences.
Their licenses could be revoked, they could be investigated for incompetence, and held professionally and personally liable for any bugs.
But please, keep on purchasing software with NO WARRANTY, or NO FITNESS FOR A PARTICULAR PURPOSE, and that contains KNOWN DEFECTS.
Gotta keep the programming industry alive, and don't wanna stress theses "engineers" too much.
No, I think he means 115 Euro as 11500 Euro (thousands separators are more trouble than they're worth).
int64 Unsigned: 0 to +18,446,744,073,709,551,615
You mean I cannot transfer my 18 quintillion, 446 quadrillion, 744 trillion, 73 billion, 709 million, 551 thousand and 615 dollars (or in easier words 18 billion billion dollars) as a single transfer from my banking account? I need to do two of them? This is outrageous!
I never understood why the hell Europeans swap periods and commas. Grammatically it doesn't even make sense.
A period ends a sentence or statement, which to me should imply a whole number. A comma is simply a separator, used within sentences. So why would it be used to separate decimals?
It would be like writing a sentence this way:
I went to the supermarket to buy some cola. cabbages. and condoms,
Maybe there's a very good reason for it, but I don't see it.
Regarding the story on hand, that really sucks. I wonder if they will pull the same garbage as American banks where customers only have 60 days to report a problem otherwise nothing will be done. Whereas, if the bank screws up in your favor, they could go into your account 20 years from now and withdraw whatever extra money they gave you.
Our method makes more sense. A sentence can have more commas than periods. Generally sentences have just one period (i'm distinguishing between dots and periods here). A period is a more solid division than a comma. It makes more sense to use the stronger punctuation as the mark between whole and fraction.
i'll grant that metric is better than imperial, but i think this is one thing where we have the better idea.
It's my opinion and it's worth every penny you paid for it.
Utilizing the synergization of benchmark e-solutions to pre-workaround action items!
There's a reason we separate the data model from the external view and internal controller mechanisms. A moving decimal shouldn't affect the internal math, it should be nothing more than a harmless display error. The fact a moving decimal actually affected the internal management is sad. Well, maybe I'm being an elitist boob, but this seems more like negligent high level design that compounded a low level bug into being much worse than it should have been.
"Sorrow is better than laughter, for by sadness of face the heart is made glad." [Ecclesiastes 7:3]
Using strings to store numbers internally is wrong, it just is. It's slow, wasteful, and unnessecary. I don't think I've ever (in 20 years of coding) needed to store something bigger than 2^64, but if I did, there are plenty of options (e.g. BigDecimal in Java, bigint in Perl, etc) which are essentially unlimited in size. Doing math with strings is just such a horrible concept :) As for precision floats (i.e. fixed point) there are real solutions for that issue in most languages too. String isn't one of them.
Exchanging your data with other systems (e.g. generating a web page, or XML, or whatever) is of course an entirely different story, you do what makes sense for the requirements. XML Schema, for example, mandates that a parser has to accept up to an 18-digit value for the digit type, but doesn't set an upper bound. So you need knowledge of the parser to know how to transfer very large values.
---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"
Doing math with strings will guarantee your code a place on the front page of thedailywtf.com
This is not a representation issue. It is a project management and testing issue.
You know, I really never understood the decimal point being a comma. But then again, I'm an American.
Yeah, why can't everyone do it like I do it?
Reboot macht Frei.
In reality an ATM doesn't need any decimal point. Unless there's some ATM out there that dispenses anything coins.
I've never understood why every ATM that I've ever used that dispensed $20 bills made me type in the 00 cents each and every time.
Yeah, even the algorithm saw that reply coming and wanted to avoid it.
"Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
The software should have gone through several
INDEPENDENT code reviews. The bank simply has
not done a proper job. The losses should come
directly from this bank's bottom line. The one
who pinched pennies to get this software rolled
out, needs to be terminated.
ink dots on fountain written text. It's far easier to be sure about a comma rather than some stupid splatter. Regardless, people will disagree with you, so we still have the same problem.
Part of the reason is there isn't a compelling argument either way - yours is ok, but not really gripping. But what did you expect? It's commas.
Reboot macht Frei.
Anyway, the International Bureau of Weights and Measures, in their22nd General Conference, decided that:
"the dot (point on the line) [is used] as the decimal marker in all the English language versions of its publications, including the English text of the SI Brochure (the definitive international reference on the SI), with the comma (on the line) remaining the decimal marker in all of its French language publications"
And from the 7th General Conference which was held in 1948:
"Numbers may be divided in groups of three in order to facilitate reading; neither dots nor commas are ever inserted in the spaces between groups."
Those familiar with scientific publications will also not that those recommandations are enforced by editors, even american ones, because those aim an international audience. Now, you do what you want inside your country.