Ask HN: Is Learning COBOL a Good Idea
I'm currently tossing around the idea of learning COBOL. The reason this has been on my mind is because its a very very old language. It seems that it has long since been out of the lime light for a long time but, many companies still use old legacy COBOL code. As the years go on I feel COBOL will become more and more in demand as many younger developers and students are no longer bothering to learn it but there are still systems running it and there are still people who are paid quite will to maintain it.
What does HN think? I actually have used it, and I'd recommend that you steer clear. About twelve years ago, I had to translate 30k lines of Micro Focus COBOL into Delphi (object-oriented Pascal). It ran on Solaris and relied heavily on memory-mapped files (it called mmap() through an FFI). While I got the project done, it was a nightmare to work with. Why? - Most COBOL programs generally use global variables everywhere. I suppose that some newer dialects exist that allow you to limit variable scope slightly, but that doesn't really help because no one writes new COBOL programs anymore. - Want to install the compiler? Call our support line. (They probably thought that leaving bugs in their installer constituted some sort of anti-piracy measure.) - Want to define a function? No problem! Just open a new file and type half a page of boilerplate code. - Want to recompile even a simple COBOL program? No problem! Just wait a minute! - Want to recompile a moderately-sized COBOL program (30k lines)? No problem! Just wait five minutes! - Want to buy a COBOL compiler for Solaris? That'll be $2995 for a single-seat development license. Don't even think about trying to run the resulting binary in anything like a production environment because that costs many tens of thousands more. (Maybe you're thinking that you'll just use a competing company's compiler. Well, you thought wrong! On the platform I was stuck with, Micro Focus was the only game in town.) - Put COBOL on your resume, and people will rightly think less of you. I will think less of you. We live in a golden era, where you can do almost anything you want. We have gobs of RAM, lots of cores, fast internet connections, great programming languages, etc. -- all things that were barely imaginable to the brightest minds of 50 years ago. Why saddle yourself with the language of that generation's dullest minds? tl;dr: Please, just let this stinking heap of a language die! Depends on what you want to do career-wise, and what's going to make you happy. There are billions of lines of COBOL running out there, doing all the unhip, non-HN, bread and butter IT/MIS types of things that keep the world running (like getting your paycheck right, or processing your insurance claim, or calculating your utility bill). Because many of these applications incorporate decades of tribal knowledge and accumulated tweaks, all the "COBOL needs to die" nonsense in the world will not make them go away in my lifetime, and probably not in yours. And since the cool kids keep hearing that COBOL is the ultimate in looser languages, you are correct that there's a declining pool of COBOL talent. One of my clients even funded the CS department at the local CC so that there would be a COBOL/Mainframe oriented degree track to develop talent. Up side: You'll be in a field with declining talent but not equally declining demand and will generally be able to find a job and be paid well (though don't count on off-the-charts compensation). You'll usually work in mature, stable operational environments at large, established companies. You'll almost always be involved in core business processes, making you less likely to be the subject of cuts when budgets get tight. Down side: There are no COBOL start-up companies; you won't be working on cutting edge stuff. "Modify the taxation calculator to reflect changes in the FY2015 tax code" would be typical projects. Stable also usually == staid & bureaucratic, and if that sort of work environment annoys you, you won't be happy. COBOL is a horrid, ugly language especially if you're used most anything else. COBOL is often tied to IBM Mainframes, so it's somewhat rare to not have to also know something about z/OS, CICS and other IBM-isms. Hipsters and brogrammers will judge you negatively not because of your talent or accomplishments, but because you solved problems with COBOL, instead of their choice of cooler languages (I get this some times having done a fair bit of FORTRAN back in the day by people who ignore how cool the problems we were solving were). So if career stability is important enough to give up on faster paced, more cutting edge environments, then you might give COBOL a go.