Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
It's funny.  Laugh. The Almighty Buck Idle

Moving Decimal Bug Loses Money 420

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."
This discussion has been archived. No new comments can be posted.

Moving Decimal Bug Loses Money

Comments Filter:
  • by Anonymous Coward on Wednesday November 25, 2009 @11:23AM (#30226258)

    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.

  • by Razalhague ( 1497249 ) on Wednesday November 25, 2009 @11:24AM (#30226270) Homepage
    No, I think he means 115 Euro as 11500 Euro (thousands separators are more trouble than they're worth).
  • by sopssa ( 1498795 ) * <sopssa@email.com> on Wednesday November 25, 2009 @11:33AM (#30226356) Journal

    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!

  • by MaWeiTao ( 908546 ) on Wednesday November 25, 2009 @11:36AM (#30226394)

    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.

  • by AP31R0N ( 723649 ) on Wednesday November 25, 2009 @11:38AM (#30226436)

    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.

  • This is stupid. (Score:3, Insightful)

    by BlueKitties ( 1541613 ) <bluekitties616@gmail.com> on Wednesday November 25, 2009 @11:39AM (#30226440)
    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.
  • by radish ( 98371 ) on Wednesday November 25, 2009 @11:41AM (#30226476) Homepage

    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.

  • by mccalli ( 323026 ) on Wednesday November 25, 2009 @11:42AM (#30226510) Homepage
    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?

    See, that argument doesn't make 'sense' either. If a comma is a separator, why not use it to separate decimals? Answer: no reason, it is completely and utterly arbitrary. You're arguing that the point of view you're used to is somehow intrinsicly 'right' - it isn't, it's just usage and custom.

    It would be like writing a sentence this way:

    Somehow, I suspect mainland Europe knows what it's like to write a sentence including thousands sperators and decimal separators...

    I'm British - I use "," to separate thousands and "." to separate decimals, but that doesn't make me 'right' - it really is just usage and custom, there isn't anything to really recommend one way over the other.

    Cheers,
    Ian
  • by The MAZZTer ( 911996 ) <.moc.liamg. .ta. .tzzagem.> on Wednesday November 25, 2009 @11:55AM (#30226640) Homepage
    Doing math with strings will guarantee your code a place on the front page of thedailywtf.com
  • by maxwells daemon ( 105725 ) on Wednesday November 25, 2009 @12:00PM (#30226720)

    This is not a representation issue. It is a project management and testing issue.

  • by haruharaharu ( 443975 ) on Wednesday November 25, 2009 @12:23PM (#30227012) Homepage

    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?

  • by Wonko the Sane ( 25252 ) * on Wednesday November 25, 2009 @12:35PM (#30227158) Journal

    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.

  • by amicusNYCL ( 1538833 ) on Wednesday November 25, 2009 @12:41PM (#30227214)

    Yeah, even the algorithm saw that reply coming and wanted to avoid it.

  • Code Review (Score:2, Insightful)

    by zoomshorts ( 137587 ) on Wednesday November 25, 2009 @12:46PM (#30227278)

    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.

  • by Anonymous Coward on Wednesday November 25, 2009 @01:07PM (#30227514)

    If you need something to be as reliable as a bridge, or a system to deliver fresh water to taps in homes, or launching a space shuttle without it blowing up; then hire an engineer.

    If you want software to do some business task and the risks aren't life threatening; then hire a programmer.

    Just because YOU need a big rig truck to haul your load, doesn't mean I need to be a commercial driver just to get two bags of groceries.

  • by haruharaharu ( 443975 ) on Wednesday November 25, 2009 @02:41PM (#30228786) Homepage

    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.

  • by DavMz ( 1652411 ) on Wednesday November 25, 2009 @07:05PM (#30231608)
    I am French, and I have never heard of using the point to separate thousands of hundreds, but a space is fine (11 500 and not 11.500), as you can see if you compare the "million" article from wikipedia in french [wikipedia.org] and english [wikipedia.org].

    Anyway, the International Bureau of Weights and Measures, in their22nd General Conference [bipm.org], 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 [bipm.org] 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.

The rule on staying alive as a program manager is to give 'em a number or give 'em a date, but never give 'em both at once.

Working...