Live data from Hacker News

Ask HN: Has anyone here learned COBOL for fun?

news.ycombinator.com

41–50 of 82 posts

Re: Ask HN: Has anyone here learned COBOL for fun?

#41
post #28
post #10

I had to deal with a bunch of mainframes in a previous job and tried to learn a bit of COBOL. One interesting thing I learned early on was that programs are almost never written exclusively in COBOL. The language isn't Turing complete (by design), so a significant portion of a program's logic will be captured in the JCL (Job Control Language) script that configures how the program will run and orchestrates multiple p…

I'm with you on the idea that mainframe COBOL is typically only part of the actual program. But COBOL not being Turing complete sounds...not right.

I'm fairly sure it is. You can literally write to tape.

Re: Ask HN: Has anyone here learned COBOL for fun?

#42
I took a mainframe class in college (2016) after my mom encouraged me to (she just recently retired as a COBOL/JCL developer of 35+ years). We learned COBOL and JCL on zOS and completed IBM's Master the Mainframe challenge. It was a very interesting experience and a different paradigm than any other CS/information systems classes I took.

I could have gotten a job doing this work very easily. When I was applying and interviewing at my university career fair, I got a lot of interest and a couple job offers from having this class on my resume, but the pay wasn't good (small city it the south US that I wanted to leave), and I didn't want to lock myself into mainframes.

Re: Ask HN: Has anyone here learned COBOL for fun?

#43
I can't say that I specifically learnt COBOL for fun because I did it in 1997 or so in India when the entire Indian IT industry was bidding on a host Y2K migration projects. I only graduated college in May 2000, so I never actually used COBOL to solve any Y2K problems, however, I did figure out that you could use a large number of paragraphs in the SCREEN SECTION to build animation frames and use that to build fun animations. It was tedious though, so I wrote a C++ program to generate the SCREENs for the COBOL program.

Re: Ask HN: Has anyone here learned COBOL for fun?

#45

Yeah, I learned COBOL for sort-of-fun (in the sense that it wasn't strictly for a paid gig) a long time ago. It went pretty well, in that I learned that, while it isn't a fun language in any sense of the word, it Just Works and even adheres to the revered Unix principle "do one thing, and do it well" in most production situations. Most COBOL programs have a very well-defined batch-oriented flow: take this file, proce…

[deleted]

Re: Ask HN: Has anyone here learned COBOL for fun?

#46
I don't know about fun, but maybe you can cosplay a1970's/1980's developer. The press (and many managers, directors, and even developers) treat COBOL knowledge as something that was doled out between 1965 and 1985 and then the world just ran out of it. Policy and decisions are made around COBOL as if it's impossible to understand and all knowledge has been lost. That leads to some pretty crazy situations.

It's a language that's built for one purpose, business style applications like CRMs or accounting systems. It's not mystically bad or so undecipherable. It's actually a pretty simple language. If you're consulting/contracting developer, or an in-house developer at a bank, insurance company, etc., you should learn it. Even if you don't do anything with it, you can pick up a used book on COBOL and get most of the regular patterns and practices.

Learning the basics of the language itself, if you've already a competent programmer, won't take you long. Maybe a half dozen weekends. But COBOL exists in an environment (normally IBM mainframes) that does a lot of the other lifting. CICS is an application server for COBOL (essentially). JCL manages what job to run and when. VSAM for indexed files or DB2 are the most common databases. And WebSphere for messaging. Becoming a 'real' COBOL developer on a mainframe is maybe 33% COBOL and the rest a miasma of mainframe-isms. And unlike Linux, there's no 'free' equivalent to a mainframe. (Although you can spend about $40 a day accessing a mainframe on IBM's cloud).

A few weekends won't turn you into a COBOL migration expert, but you can at least join the rest of us, rolling our collective eyes, when the governor of New Jersey asks for volunteer cobalt [sic] programmers because some key system is breaking down.

Re: Ask HN: Has anyone here learned COBOL for fun?

#47
I've coded in a lot of different programming languages over the past forty years or so, some of them for fun, some of them as part of my job.

I've also coded COBOL at a few places, both on PC and on mainframes years back.

But I can honestly say that I have never done anything in COBOL for the fun of it.

However this is not to dissuade anybody from ever doing this. COBOL and a few other old languages are still used in areas like banking today. So you might cross it at some point in time, even at the most modern workplace.

But as others have written in the comments, there is more to it than the language itself. You should really have a mainframe emulator (like Hercules) and other parts of the environment like CICS, TSO, ISPF and JCL if you really want to know how it feels like to code in COBOL. I don't know if it's even possible to get all of this up and running for free, but that could be a challenge in itself.

Re: Ask HN: Has anyone here learned COBOL for fun?

#48
post #42

I took a mainframe class in college (2016) after my mom encouraged me to (she just recently retired as a COBOL/JCL developer of 35+ years). We learned COBOL and JCL on zOS and completed IBM's Master the Mainframe challenge. It was a very interesting experience and a different paradigm than any other CS/information systems classes I took. I could have gotten a job doing this work very easily. When I was applying and i…

I don't know if it's still true, but when we were doing a analysis of alternatives for a customer looking to modernize, we reviewed salary surveys to determine the future cost of maintenance. While COBOL developers were about 15% cheaper than Java developers, our concern is that (long term) it would dis-incentivize developers from learning COBOL.

Re: Ask HN: Has anyone here learned COBOL for fun?

#49
post #10

I had to deal with a bunch of mainframes in a previous job and tried to learn a bit of COBOL. One interesting thing I learned early on was that programs are almost never written exclusively in COBOL. The language isn't Turing complete (by design), so a significant portion of a program's logic will be captured in the JCL (Job Control Language) script that configures how the program will run and orchestrates multiple p…

What is COBOL missing that makes it not Turing complete?

Re: Ask HN: Has anyone here learned COBOL for fun?

#50
post #28
post #10

I had to deal with a bunch of mainframes in a previous job and tried to learn a bit of COBOL. One interesting thing I learned early on was that programs are almost never written exclusively in COBOL. The language isn't Turing complete (by design), so a significant portion of a program's logic will be captured in the JCL (Job Control Language) script that configures how the program will run and orchestrates multiple p…

I'm with you on the idea that mainframe COBOL is typically only part of the actual program. But COBOL not being Turing complete sounds...not right.

I'm not using the formal definition here -- I meant that there are programs you can write in other mainstream programming languages that just can't be expressed in COBOL due to limitations on recursion.

The COBOL spec doesn't allow recursive "paragraphs" (functions), though some implementations support it. (This may no longer be the case, or this limitation may have been specific to the language version used at my job.)

The main limitation is I/O, though. You typically use JCL to indicate what files/DBs a program will run against, and I recall that everything that touched the network was written in Java and called from JCL (whether this was because networking libraries don't exist in COBOl or because those that do are terrible, I couldn't say).

Post reply on HN