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."
You mean 11,500 Euro as 11.500 Euro.
I always do that, I mess up some mundane detail!
I am officially gone from
Our Comma to separate numbers and periods to indicate decimal are far superior to your backward period to separate numbers and comma to indicate a decimal number!
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
1,00st post!
Given the subject, surely the submitter can see why it's worth clarifying whether they're using the decimal or comma convention in the summary itself!
No kidding!!! What do you say at this point?
Most programs I have seen they don't allow you to type in thousands separator. If they are fancy they will display it to you for in the program when you type in the number. Otherwise it will not show... And for God sake why would you want to store the number as a string any ways?
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
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.
Ok! Ok! I must have, I must have put a decimal point in the wrong place or something. Shit. I always do that. I always mess up some mundane detail.
I bet you LXXVII bucks this would not have happened with Roman numerals. That's what they get for upgrading a perfectly good numeration system.
org.slashdot.post.SignatureNotFoundException: ewg
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.
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]
It's just like in Superman III, but backwards!
I really wish it could be standardized with the decimal separator being either a comma or a period and the thousands separator being neither.
I made a similar mistake recently... I made a (.NET) data entry software that received monetary quantities as user input, and I converted them without taking into account the Windows settings for decimals and thousands separators.
.when converting, but it wasn't nice, messed with all of the higher ups' reports and everything ("Hey, hadn't we sold about U$ 1.000.000 more?" "No, it was an error from G in Development")
:) ).
It worked fine until somebody used a different language OS... and some strange quantities were recorded, one slipped all the way through the process and a confused customer received a bill for 17.000.000 local currency (about U$ 1.000.000) . I fixed it by using the CultureInfo, etc..
I'm sure there are better ways and good practices, but keep in mind that where I work we don't even have testing, so I guess I'm getting sloppy. If someone wants to give advice, go ahead, I'll appreciate it (or at least should
There are three kinds of lies: lies, damned lies, and statistics.
The whole system is probably running on Windows XP Home and someone must have changed the regional settings to Italy so he can install some Italian crap on it.
:)
P.S: Just trolling.
Love many, trust a few, do harm to none.
“I always do that. I always mess up some mundane detail.”
In Socialist Italy, the period separates you into groups of thousands!
This is not a representation issue. It is a project management and testing issue.
People in the U.S. with that kind of cash are considered so rich that they don't go down to the post office themselves.
Use it or lose it. Duh.
Colorless green Cthulhu waits dreaming furiously.
Alright so when the sub routine compounds the interest is uses all these extra decimal places that just get rounded off. So we simplified the whole thing, we rounded them all down, drop the remainder into an account we opened.
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?
By your logic, both commas and periods as the decimal "point" separator are wrong, since the decimal is not the end of the number.
Logically, then, the decimal locator should be a semicolon: more of a stop than a comma, but not the end of the number. Like so:
12,345;67
That would avoid ambiguity in sentences like
"He said I owed 120. 20 for the part and the rest for labor."
http://www.geoffreylandis.com
I love my $1 coin and my $.05 bill
"He is so stupid. And now back to the wall!" Moe Szyslak
And if the people weren't rookies, shame on them. It's obvious they had no knowledge of the culture and conventions of their target user. This is what happens when the program team, including the management and QA team (assuming there was one), is offshored.
I am currently working on a distributed international project. Not only things like decimal points, measurement systems, and spelling are taken into account but also the tone of the error messages and documentation. What is acceptable in one culture may be insulting in an other.
Also latency is taken into account. A person in another culture and/or with low speed connections to the internet may have different latency expectations than those in other cultures and/or high speed connections.
KNOW YOUR END USER!
putting the 'B' in LGBTQ+
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.
Here's a practical option, you can start using right away without waiting for the whole world to agree on anything: Use apostrophes for the thousands separator. It's just better: It looks good, everyone trivially understands it, and it's unambiguous.
If you configure that in the regional settings of a Microsoft OS, and the decimal separator is set to a comma, then Excel becomes capable of reading CSV files with either decimal separator.
When I was a kid I was taught to write decimal points in the middle of the line, not on the bottom like a full-stop. Can we invent a new character for the decimal point. I have two keys on my keyboard with dots on them though I've never pressed the one on the numeric keypad. I propose we get rid of some useless ASCII character and use that for decimal point. How about 0x7f (DEL)? Have you ever wanted to print out DEL?
If it was really French, you wouldn't have such bastardizations as "sous-marin de 12 pouces", cinq six boîtes de tomates vertes!
Back in my day (early 2009), we had only had Zimbabwe dollars. And we were thankful!!
Now that I think about it, I'm pretty sure everything I just said is completely wrong.
I used to work at a place that was nuts about bug counts. Nevermind the severity.
This decimal comma bug would be *one* bug. A typo on an informational page would count as one bug too.
The developers were always questioned "How many bugs did you fix on this release?" And QA would have to answer "How many bugs did you verify on this release?". Guess which bugs would get fixed and verified for the current release and which bugs would get deferred to later releases.
Drove me crazy.
from wiki ond ecimal separator : "In the Middle Ages, before printing, a bar ( ) over the units digit was used to separate the integral part of a number from its fractional part, a tradition derived from the decimal system used in Indian mathematics.[1] Its regular usage and classification can be attributed to the Iranian mathematician Al-Khwarizmi. Later, a separator () (a short, roughly vertical, ink stroke) between the units and tenths position became the norm. When this character was typeset, it was convenient to use the existing comma (,) or period (.) instead."
:). Tit for tat, pot, kettle, your psot not being so insgihtful etc...
If you look at the countries using the comma, it is actually historically that they used something similar as shown above. Mostly latin countries and europe use comma, north america and asia use period.
In France, the period was already in use in printing to make Roman numerals more readable, so the comma was chosen. Many other countries also chose to use the comma to mark the decimal units position.[2] It has been made standard by the ISO for international blueprints. However, English-speaking countries took the comma to separate sequences of three digits.
See : comma is an ISO standard. So using periosd made no sense
C. Sagan : A demon haunted world:
http://www.amazon.com/gp/product/0345409469/
visit randi.org
This is just one of the many pitfalls when trying to localize your software.
Does Your Code Pass The Turkey Test?
"Love the 'Merican arrogance!"
I'm actually Canadian as well. I implied it doesn't happen in America because few people have that kind of cash in their accounts to begin with. It was an easy potshot at the saving habits of Americans, not a claim of technical superiority.
Perhaps I was too subtle.
I'm a racist for pointing out that Morgan Freeman is a black American? That's rich.
I want peace on earth and goodwill toward man.
We are the United States Government! We don't do that sort of thing.
Our build system now checks the code with M$ FxCop. Any problems with the cultural settings and the build stops.
We hit a brick the day our program was started in Turkey. Having that problem once is more than enough.
An engineer can slap a piece of paper on a building that says "if it falls, it ain't our fault" just as a programmer can claim no liability for software. In both cases, saying such a thing does not make it so. The big difference is that most bugs in most software doesn't have the potential to kill people.
If you're a programmer and you work on a critical system, you bet your ass you can be held liable! Where in the article does it say that the programmers will be shielded from consequences?
That way me and my Humvee are never wrong.
This issue is a bit more complicated than you think.
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.
In the spirit of ISO 2014, which settled the argument of whether dates should be written
"day/month/year" or "month/day/year" by specifying "year-month-day",
I propose this simple solution which should satisfy both comma/period user factions:
Use either comma or period as a thousands separator.
Use semi-colon to separate the integer part from the fractional part.
A few programmers (c, java, Pascal) may be temporarily inconvenienced, but this is a small price to pay for sorting out this perplexing problem in monetary representation.
--
Often wrong but never in doubt.