Sooner or later, COBOL will kill us all

I read with some trepidation that the computer language COBOL (Short for COmmon Business Oriented Language) is fifty years old today.

“Why does this matter to me ?” I hear you cry. “I’m only here by accident, it is but a whistle-stop on my eternal quest to find play slime at wholesale prices .”

And well might you ask, for unless you share in the freemasonry of computer programming, it is unlikely that you’ve ever heard of COBOL. So a little background is required. Hold tight, I shall be mercifully brief.

To set the scene, COBOL was invented by the US military to make it easy for accountants to programme computers. But that is not the most frightening thing about it. It was initially specified during a really boring Pentagon meeting by US Admiral Grace Hopper. Notable for being one of the very few female computer geek icons. Foxy hard coding programmer of the Harvard Mk I, vaunted developer of the first compiler and fabled as the originator of the term “debugging“, she was a woman of exceptional talent and achievement known amongst her contemporaries as “Amazing Grace”.

It therefore remains a mystery to many computer programmers just why she chose to inflict such a Crawling Horror as COBOL upon the world. Presumably she was acting under orders.

COBOL is one of the canonical Bondage & Discipline Languages. From personal experience, it is unpleasant to create new programs with it and even more unpleasant to maintain old ones. While significant, this is not why we should worry about it.

What we should worry about are the following figures quoted at The Register and supplied by Microfocus, possibly the world’s only remaining COBOL vendor.

There are two hundred times as many Cobol transactions as there are Google searches every day, … in the UK we all use Cobol-powered applications ten times daily on average.

Anyone using a cashpoint or booking a holiday is probably also touching some of the two hundred billion lines of code in use (and counting).

The continuing popularity of Cobol can be attributed to the fact that it just works.

I can vouch for this personally. I can also vouch for the fact that some of that code is over thirty years old. Yeah, read that back, some of that computer code is over THIRTY YEARS old.

So yes, COBOL systems do tend to ‘just work’. COBOL grew up in the mainframe era, a golden age during which – although modern computer users would be surprised to hear it – computers were expected to ‘just work’.

But computer hardware doesn’t normally last thirty years. Many of the systems programmed originally in COBOL, the ones used by your bank, by your insurance company, by your credit card company, are now running in virtual machines, emulated on shiny brand new kit, their execution environments having migrated over the years as each new generation of hardware comes along. This means that they are now thirty years distant from their original environment, and thirty years distant from the media (tape or even punched card, I shit you not) that were used to originally load them.

A goodly number of such programs will have no source code, the human written and human readable set of instructions that define how they work. They consist only of extremely long sequences of binary numbers. This is bad. It is possible, but extremely difficult to reverse engineer binary code on any decent scale. Finding and fixing bugs in programs without source code is an expensive nightmare, and the skills to do it are genuinely rare. Worse, without source, and without applying massive reverse engineering resources, it impossible to say for certain what exactly a system is doing, or how it will respond to certain inputs, which makes recreating it in a modern incarnation much harder.

Even for the programs that have had their source code carefully preserved along with their operational environments there is a huge problem. I am 36 years old. I belong to the last generation of computer programmers who were taught COBOL, and even in that generation I was one of a scant few.

When the next Year 2000 happens, or when the systems succumb to bit-rot, hardware failure or disaster there may well be almost no one left who knows how speak the language in which they are written.

There may be none at all. Some of the systems are so robust that people don’t even know they’re there. They could already have exceeded the working life times of the last person within an organisation to know that they even exist.

Sooner or later there will be two horrible disasters. Firstly, some of the big COBOL programs will eventually break. Chaos will ensue. Secondly, those programs will have to be replaced. This task will be given to neophyte coders working for the lowest bidder. Chaos will ensue.

So, happy birthday COBOL. You are vile, and I hate you, but you are also ever living, mysterious, essential, and a valuable skill set. And Rear Admiral Grace Murray Hopper, Amazing Grace, we salute you. Ma’am.

So now, dear reader, you know our dirty secret. Large parts of the software eco system that sustains our critical infrastructure is written in a language that practically no one knows, almost no one can fix, and is effectively immortal.

May god have mercy on your soul.

Advertisements

2 Responses

  1. […] Blind Steve is alarmed because it turns out that there are still things running COBOL some fifty years after it […]

  2. “They could already have exceeded the working life times of the last person within an organisation to know that they even exist.”

    So true.

    I once worked in a large pharmaceutical factory, a modern, highly-regulated, controlled-to-within-an-inch-of-its-life plant, where all sorts of life-critical things were synthesised.

    And in the heart of that factory, in a basement hardly anyone ever visited, on a dusty shelf, there sat an ancient 286-processor PC running a Pascal program written by some long-departed sandwich student, upon which, by a roundabout route which most people had forgotten. the entire operation depended.

    The program ran entirely in memory, loaded at startup from a 5.25″ floppy disk, which was still in the drive. We didn’t dare to turn it off to find out what how it worked, in case it never started again. Anyway, how would we find out? There was certainly no documentation.

    Probably, it has not been replaced yet; at least, the factory is still there, still producing, so I guess it must not have been.

    Scary stuff.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: