Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Monday September 16 2019, @01:48PM   Printer-friendly
from the COBOL-is-often-fractionally-better dept.

https://medium.com/@bellmar/is-cobol-holding-you-hostage-with-math-5498c0eb428b

Face it: nobody likes fractions, not even computers.

When we talk about COBOL the first question on everyone's mind is always Why are we still using it in so many critical places? Banks are still running COBOL, close to 7% of the GDP is dependent on COBOL in the form of payments from the Centers for Medicare & Medicaid Services, The IRS famously still uses COBOL, airlines still use COBOL (Adam Fletcher dropped my favorite fun fact on this topic in his Systems We Love talk: the reservation number on your ticket used to be just a pointer), lots of critical infrastructure both in the private and public sector still runs on COBOL.

Why?

The traditional answer is deeply cynical. Organizations are lazy, incompetent, stupid. They are cheap: unwilling to invest the money needed upfront to rewrite the whole system in something modern. Overall we assume that the reason so much of civil society runs on COBOL is a combination of inertia and shortsightedness. And certainly there is a little truth there. Rewriting a mass of spaghetti code is no small task. It is expensive. It is difficult. And if the existing software seems to be working fine there might be little incentive to invest in the project.

But back when I was working with the IRS the old COBOL developers used to tell me: "We tried to rewrite the code in Java and Java couldn't do the calculations right."

[Ed note: The referenced article is extremely readable and clearly explains the differences between floating-point and fixed-point math, as well as providing an example and explanation that clearly shows the tradeoffs.]


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Insightful) by Thexalon on Monday September 16 2019, @05:39PM

    by Thexalon (636) on Monday September 16 2019, @05:39PM (#894715)

    Required reading: Fred Brooks - No Silver Bullet [unc.edu]

    Summary: Some of the complexity of software is due to software design and development making things harder than they need to be. A lot of it, though, is because the problem that it's trying to solve is complicated, and there's just no getting around that.

    For example, a major user of COBOL historically has been the IRS. Have you read the entire US tax code? No, of course not, because it's a big mess that's so complicated and changing so quickly that even the IRS has a tough time keeping up. In what universe would you expect the code to address all those nooks and crannies to be simple and clear?

    When I'm trying to explain the work of coding to non-coders, I tend to focus on the fact that the real skill of coding is anticipating and responding appropriately to everything that can possibly go wrong with something before it happens. For example, good code takes into account the fact that the power could be cut to the computer at any time, meaning that the program can stop unexpectedly on any instruction, and needs to usefully recover from that.

    --
    The only thing that stops a bad guy with a compiler is a good guy with a compiler.
    Starting Score:    1  point
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3