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: 5, Insightful) by DannyB on Monday September 16 2019, @04:48PM (6 children)

    by DannyB (5839) Subscriber Badge on Monday September 16 2019, @04:48PM (#894676) Journal

    I've got it myself. (eg, Perl) I've seen it here on SN.

    Here is a true thing: If there were one perfect programming language, everyone would be using it already.

    (Or at least migrating to it.)

    If there is a language you don't like, but it is among the top languages in use and top languages for high paying job offers, then there is probably a reason for that. Even if you are too dumb uninformed to realize why these languages have such high level placement.

    Different languages have a better fit for different porpoises.

    Would you write a device driver in PHP? Yet PHP seems to work great for creating small one-off pages or sites -- which then morph into Facebook. Which is one my problems with dynamic language. I love the quick one-off-ness of Lisp or Python. But I wouldn't write a gigantic system like I maintain at work in such a language. An earlier generation of software that I work on was in a "dynamic / duck type" language (specific to Microsoft) and as the code base grew I came to understand why such languages are inappropriate for this. Despite how appealing they are for small quick projects or one-off tasks.

    Clearly C and C++ have a place, but not in the software I write. But people who should know better, here on SN, just don't get it.

    If you're going to criticize a language because it has certain warts or artifacts of evolution, then I would point out the thing about throwing rocks and glass houses.

    --
    The lower I set my standards the more accomplishments I have.
    Starting Score:    1  point
    Moderation   +4  
       Insightful=3, Interesting=1, Total=4
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 0) by Anonymous Coward on Monday September 16 2019, @05:39PM (1 child)

    by Anonymous Coward on Monday September 16 2019, @05:39PM (#894716)

    Well, sort of. Sure, there are some languages that are bad for certain purposes but good for others. COBOL is bad for all purposes. The only reason to use it is because you have to. That was always true : even in the 60s the only reason it got any traction was because the Department of Defense mandated it (and it very much feels like a language designed to implement the processes of the 1960s military).

    I'm old enough to remember the 80s and everyone hated COBOL then, too. It has twice the verbosity of Java, half the convenience of assembly, twice as many land mines as perl and half the power of BASIC. Its type system is designed to cause the maximum number of errors while also getting in the way whenever possible. The few features it has to make things easier instead end up forcing you to do things wrong.

    Aside from joke languages [wikipedia.org], it's very close to the worst possible language.

    • (Score: 2) by DannyB on Monday September 16 2019, @05:56PM

      by DannyB (5839) Subscriber Badge on Monday September 16 2019, @05:56PM (#894728) Journal

      I remember the 70s.

      I agree with everything you said about COBOL.

      I hated COBOL. I think I mentioned it somewhere in this topic that I hated COBOL. (look for it) But looking at history I came to understand why it is. It was the path of least resistance.

      Many things in life aren't perfect, but we live with them. How many people use Microsoft Windows? Internet Explorer?

      So COBOL was used. Tons of software written in it. Now here we are. It is too big to simply replace overnight. (BTW, my other post I mentioned pointed out the prediction, which I disagreed with and was proven wrong, that COBOL would be here at the turn of the century.)

      --
      The lower I set my standards the more accomplishments I have.
  • (Score: 2) by DeathMonkey on Monday September 16 2019, @05:41PM (2 children)

    by DeathMonkey (1380) on Monday September 16 2019, @05:41PM (#894717) Journal

    You should post this in the Python thread too!

    • (Score: 2) by DannyB on Monday September 16 2019, @05:47PM

      by DannyB (5839) Subscriber Badge on Monday September 16 2019, @05:47PM (#894721) Journal

      I posted something about Java in the Python thread. And I got one example of that kind of bigotry. Conflating various things together -- where I could create counter examples for C, such as blaming C for there being wxWindows, Gtk and Qt.

      The amusing thing is one of the very first things I said was Java has warts.

      People who hate are never going to see the legitimacy of things they hate. Even if they should know better.

      --
      The lower I set my standards the more accomplishments I have.
    • (Score: 2) by DannyB on Monday September 16 2019, @06:29PM

      by DannyB (5839) Subscriber Badge on Monday September 16 2019, @06:29PM (#894748) Journal

      I suddenly realized we're talking about different Python threads. :-)

      --
      The lower I set my standards the more accomplishments I have.
  • (Score: 0) by Anonymous Coward on Monday September 16 2019, @05:51PM

    by Anonymous Coward on Monday September 16 2019, @05:51PM (#894726)

    Very true, and it reminds me to one of my favorite web comics about programming languages [sandraandwoo.com].