6 ms·
One thing I don’t understand with these very old languages is that I thought the reason they are still around is because of some programs written in the 70s to
by cm2187 9y ago
One thing I don’t understand with these very old languages is that I thought the reason they are still around is because of some programs written in the 70s to early 90s are still around and needs to be maintained.
But how complex can these programs be? Surely anything written before 1992-ish can’t involve that much code just because of the limitation of the machines they were designed to run on. What makes it that expensive that no one wants to rewrite them in a modern language?
- nothrabannosir 9y agoI don’t know about cobol specifically , but I do know about technical debt: Liability and cost of switching. Who will take responsibility for any outages (or much, much worse) if it goes wrong? Who will pay for all the safeguards and processes to prevent that from happening? Easier to keep paying the (predictable, consistent, piece meal) upkeep fee than to spend an unknown chunk of money to take a huge risk for a very low immediate gain. It’s in a local maximum. Just like all technical debt. And as far as I hear, cobol is used for things that put that risk and liability factor on steroids. I know I wouldn’t touch it without some serious budget to set up massive amounts of redundancy and fail safes.
- coldtea 9y ago>But how complex can these programs be? Surely anything written before 1992-ish can’t involve that much code just because of the limitation of the machines they were designed to run on. You'd be surprised. The business rules and exactitude of results can be documented in 1000s of pages.
- andyjohnson0 9y ago> What makes it that expensive that no one wants to rewrite them in a modern language? From a business perspective there may not be much to gain from doing so. If the old software works in a current environment then there often isn't a justification for the cost of rewriting/testing/integrating just to end-up with the same thing in a shiny new language.
- shakna 9y ago> But how complex can these programs be? Surely anything written before 1992-ish can’t involve that much code just because of the limitation of the machines they were designed to run on. What makes it that expensive that no one wants to rewrite them in a modern language? You would be utterly shocked. I did some COBOL work for a bank. Most of the new code they write is in C++. However, COBOL was still a huge part of their stack, and they still had several heavy duty mainframes that it ran on, and maintaining that was part of my job. For an example of how much COBOL was written back then, and how huge the technical debt to replace it would be: * The interbank transfer system alone was ~750,000 lines of COBOL. * It handled around 1.2million transactions every three seconds. That's not capacity, that's real world data. * They had less than five minutes of downtime in the last twelve months, and that was considered poor. It's a mammoth task to replace the system, and getting transactions from the old to the new without incurring a huge overhead is nigh impossible. And yes, dropped transactions can mean dropped customers, and big customers. It's far cheaper to hire and train programmers in COBOL, than to rewrite everything. COBOL and Fortran have millions of lines of code in use, and such frequent use that replacing them may cost more than the lifetime of returns would give.
- fork1 9y agoCobol programmers are starting to get few nowadays, and finding people that actually want to be trained in it is not that easy. Plus you dont just need programmers, but z/OS engineers, DB2 DBAs, MQ specialists, etc. And that's before you even start talking about the nice cheque you're writing for IBM every month. It does add up.
- pjmlp 9y agoIt is still cheaper than porting to the language du jour, like changing plane engines in mid-flight, while ensuring that the new system meets 100% of the existing requirements.
- fork1 9y agoThere are alternatives, but i'm biased. See my other comment. One of the biggest hurdle we have is that the clients dont usually have many tests in place. Testing and validating a full batch night for example (ie 6 hours of intense batch work) is quite complicated.
- CJefferson 9y agoI once spent a month completely figuring out a 5000 line C program. You'd be amazed at the complexity a programmer can fit into a small number of lines, particularly when they knew memory mattered, so they needed to make best use of every byte.
- skissane 9y ago> But how complex can these programs be? Surely anything written before 1992-ish can’t involve that much code just because of the limitation of the machines they were designed to run on An ex-colleague used to work for a major US insurance company, and this is what he told me: They had a bunch of products, and due to the state-by-state nature of US insurance regulation, they had a slightly different version of each product for each of the 50 US states. And then, for every one of those different versions of those products, they had a separate suite of COBOL programs to manage them. And, all these COBOL programs basically did the same things, but all with slight variations due to the different rules of each state's insurance regulators. So they basically had hundreds, maybe even thousands, of separate COBOL programs to maintain, a mess of horribly repetitive code. Their problem with moving off COBOL was not that any of the code was particularly complex, just that there was so much of it, and trying to rewrite it into another language (or, maybe more sensibly, translate it into some sort of business rules engine or insurance policy automation product) would take major effort and run a big risk of getting something wrong in the translation. (He worked there more than 15 years ago, so things at this insurance company might be very different by now.)
- cm2187 9y agoThat's interesting. It's a form of adverse selection. The least maintainable and readable languages end up sticking around the longest whereas the clear, concise and readable languages are likely to be replaced regularly with the shiny new thing...
- cafard 9y agoCOBOL is readable, in the way that Soviet-era novels were: it all makes sense, it's just tedious. COBOL is as we have seen maintained, so how is it not maintainable? I agree with you that it is not concise. [Edit: changed period to question mark]
- dzdt 9y agoThis. Suppose you want to rewrite. Your task is to create a new, cleanly written program in a new language that produces the same output as the old, slightly messy COBOL. It must work identically for all appropriate inputs. There is no documemtation of the code and insufficient documentation of what combinations of inputs must be supported. No one understands the business logic fully. And there are 500,000 lines of copy-paste-modified code to convert. Any screw-up will likely cost more than your annual salary. How do you sell the risk-vs-reward of the rewrite project? COBOL will outlive us all.
- jmngomes 9y agoBecause the knowledge required to fix, update or port these programs is almost completely owned by the programmers that developed them, who are in the process of retiring or are unwilling to share knowledge for (justified) fear of losing their job. Regarding "how complex can these programs be", these programs run core operations for banks and insurance companies, so you can probably imagine the amount of hidden business logic and technical hacks that have stacked up over decades of operation and changes. This will not surface in requirements gathering meetings without A LOT of blood, sweat and tears. The alternative would be to reenginer the company's processes before the building the software to support them, but that would mean a lot of change and that tends to be harder than most software engineering endeavours. Not only are these programs complex (projects to re-implement them from scratch in J2EE would certainly be measured in years), but they are mission critical and the organization cannot afford to live without them or something 100% equivalent. There was a lengthy discussion about this on HN some time ago: https://news.ycombinator.com/item?id=12096250 https://news.ycombinator.com/item?id=12096250