Live data from Hacker News

COBOL: Thinking about it wrong

gcn.com

81–90 of 116 posts

Re: COBOL: Thinking about it wrong

#81

I have seen the COBOL issue come up a number of times, and I just don't get it. Am I thinking about this wrong? COBOL seems to be a straightforward language by modern standards. Any programmer with experience with imperative languages should be able to pick it up. Learning the language itself cannot be a real barrier. The barrier seems to be the enormous amount of legacy code that has to be digested and understood. B…

So isn't the real problem that we have 800 billion lines of legacy code that needs to be understood and maintained; it just happens to be written in COBOL?

No.

800 billion lines of COBOL = 1 million lines of BASIC

A gross exaggeration, of course, but after 7 years of COBOL, I discovered BASIC and instantly became 10X of my former self.

I would never go back. I get enough overhead from my bosses. I don't need it from the tech too.

Re: COBOL: Thinking about it wrong

#82
post #29

COBOL was actually in the CS curriculum for my university, a fact that several of my friends brought up when the 'COVID is prompting a real need for COBOL programmers in light of the need to change benefits rules and unemployment!' stories were a regular feature on the nightly news. 'You should do it, man!' Yeah, sure. I'd already suffered through the liquidation of my entire department in 2018, the prospect of the h…

If you know COBOL and know other languages and are fluent in "current" tech, then I see nothing wrong with consulting for $300 an hour doing some COBOL. Company I work for still uses AS400, which has been released in 1988 just after I was born. We have a dev who supports it. This isn't a small company either. COSTCO is still using and a lot of huge organizations. I'm focused on newer tech C#, .NET, Blazor but I do in…

Most consultants cannot get $300/hour for COBOL though. It is those who have specific other knowledge - like experience in the system before they retired who can get that much.

Re: COBOL: Thinking about it wrong

#83
post #72

I grew up hearing COBOL as a joke language, until one day, I learned that COBOL has the most accurate arbitrary precision math, surpassing modern languages. This is crucial for financial applications. When I then think about how it doesn’t seem any more verbose than SQL, COBOL seems to me like a very respectable language. Somewhere early in my career, I worked with an accounting app that thought a double float is goo…

Ada’s support for fixed-point arithmetic is worth looking at too for financial apps.

Re: COBOL: Thinking about it wrong

#84

Earlier quoted context omitted.

COBOL is good for dealing with money because it was built with the sort of numeric types required as a natural part of the language. Popular programming languages treat them as an afterthought and provide awkward library functions, if they have anything at all.

C# has Decimal built in. Enough precision for any money-related calculation.

Lots of languages have Decimals (and arbitrary precision integers for another example) builtin, but they're usually never the default.

Re: COBOL: Thinking about it wrong

#85

How would one even go about finding opportunities to program COBOL professionally? I feel like I'd actually go for it if I was able to do it remote, but mainframes conjure up this image for me of sitting next to a tiny green terminal somewhere deep underground, leashed to The Beast or Blue Giant or some other whimsically-named thing.

There's lots of software for emulating IBM 3270 terminals over TCP/IP using the tn3270 protocol.

https://en.wikipedia.org/wiki/IBM_3270#Telnet_3270

Re: COBOL: Thinking about it wrong

#87
post #10
post #7

I'm pretty sure I'm thinking about it right. How much COBOL code can run on a regular Ubuntu machine? What's the package manager for OSS packages? What test frameworks are in common use? You know you're in trouble when "There's a syntax file for VSCode." is the height of your modernity.

> How much COBOL code can run on a regular Ubuntu machine? All of it. GNU Cobol exists, as do proprietary solutions from companies like Micro Focus that target the JVM and .NET (which is what you're looking for for a real COBOL solution). But why is it so important to run COBOL on Ubuntu? If you need Linux, create a Linux LPAR on your mainframe. > What's the package manager for OSS packages? COBOL code runs Western c…

> COBOL has entire modern IDEs written for it.

In fact the very first visual compile/debug environment was written in COBOL over 40 years ago: Micro Focus's Animator (from which Microsoft paid to use the patents in their Visual products iirc).

Re: COBOL: Thinking about it wrong

#88
post #78

I have seen the COBOL issue come up a number of times, and I just don't get it. Am I thinking about this wrong? COBOL seems to be a straightforward language by modern standards. Any programmer with experience with imperative languages should be able to pick it up. Learning the language itself cannot be a real barrier. The barrier seems to be the enormous amount of legacy code that has to be digested and understood. B…

I only have minor experience with COBOL, but in my mind the issue is that those 800 million lines of code don't have a single unit test, because testing COBOL is really hard. Which makes it dangerous to do any refactoring. Specifically the snippets I've seen do some in-line SQL to get its data, some business logic and then updates. The logic is rarely in a procedure that takes parameters, because that doubles the num…

I know hindsight is 20/20, but that feels like the perfect setup for a rules engine like Drools.

Re: COBOL: Thinking about it wrong

#89

Earlier quoted context omitted.

It's the same reason why I opted to spend only minimum time with the dying tech in my old role and find something more broadly applicable. You're super important until you're not, so general tech that is useful in many areas is a lot safer. Cobol ain't going away anytime soon, but it certainly might limit what jobs you can get other places depending on the hiring algorithm.

Even important people aren’t compensated based on their importance but their marketability. Also, pay is usually just enough to prevent employees from leaving to a competing jobs. Too much institutional knowledge can ironically leave an employee uncompetitive in the market.

Agree. Institutional knowledge is vastly underrated. A lot of jobs exist where the knowledge IS the employee value and not just some crank-turning process that can be taught to someone in a few months. It can take years to adequately understand an organization's tools, software architecture, customers, what works and what doesn't...etc.

Re: COBOL: Thinking about it wrong

#90
post #63

COBOL (COmmon Business-Oriented Language) was designed by Grace Hopper to make it easier for business folks to write code. https://www.zdnet.com/article/cobol-grace-hoppers-gift-to-th... That goal a flop, so programmers had to take over. Wasn't there a Cucumber/Gherkin story here really recently? That grew out of Fit/Fitnesse (from Ward Cunningham of "tech debt" and "the wiki" fame), which was intended to have busine…

There is always money to be made by peddling the idea that you can bypass those pesky programmers and get Don from accounts to write his own applications instead. See also: most low-code / visual programming environments.
Post reply on HN