Jeff Atwood over at Coding Horror wants to know where all the COBOL programmers are.
Well, one of them is sitting at her computer typing this. To be fair, I haven’t written any COBOL code in more than four years and even when I did I wasn’t that enthusiastic about it. But still, I did my apprenticeship in an IT company providing services for some of the major insurance companies in Germany, so guess what language all their programs were coded in?
Here’s a quote from Jeff Atwood’s article:
If these 220 billion lines of COBOL code are truly running out there somewhere, where are all the COBOL programmers?
I think it’s safe to say that a lot of them just ran. I didn’t exactly run from COBOL and the fact that I wrote code in MUMPS after my COBOL gig probably is prove enough, but I wasn’t sad to leave it either. However, it might have been one of those experiences that in retrospect don’t seem that bad and leave you with that superior feeling of been there, done that.
COBOL is indeed a strange language, and to those who are not familiar with its strangeness, here’s a quick introduction to its weirdest character traits.
- Fixed divisions and sections. Start with the IDENTIFICATION DIVISION, move on to the ENVIRONMENT DIVISION with its INPUT-OUTPUT SECTION, then on to the DATA DIVISION to define yourself some fancy variables. Only then can you start writing actual code in the PROCEDURE DIVISION. It’s kind of awesome and insane at the same time. You can’t mix up any of the divisions, there’s a fixed order and you can’t define your variables anywhere else than in the DATA DIVISION.
- Defining variables itself is a blast. First, you have to define them all upfront, which is not that unusual, but still. Second, you have to set a size. I mean really set a size. Like, this is a string and it’s 30 characters long. This is an integer and it’s 6 digits long. This is a freaking decimal and it’s 4 digits and two decimal places. No re-defining during code. I think apart from the fact that COBOL doesn’t provide a modulo operation which left me with no choice but naming a variable „USELESS“ once1, this was the part of COBOL that annoyed me the most.
- This doesn’t have to do with COBOL directly, but I’d like to throw in JCL. JCL – or Job Control Language – was a scripting language that could at best be described as cryptic and was needed to actually run the COBOL programs. I’m pretty sure that in the whole company there seemed to be only one guy who actually understood the language. Everyone else was doing it the copy/paste/pray way. Maybe I’m wrong, but that’s what it seemed like.
No, I don’t miss writing COBOL code. But maybe it was worth learning how to write COBOL anyway. First of all, I am one of those COBOL programmers. Plus, you can always tell one of those coding nostalgia stories at lunch and get that glassy look in your eyes remembering the time when you spent hours a day writing those copybooks. Good old days.
It’s even more fun though when you get me started on MUMPS. Because that, my friends, is one fucked-up language.
—
1How do you work around that? Well easy, you can use a division and the save the result and the rest. Unfortunately you have to store the result, which when you really only need to use the rest, doesn’t leave you with any choice, but to passive-aggressively name your variables the only way they can be properly described: useless.