Post: COBOL Is the Asbestos of Programming Languages

COBOL Is the Asbestos of Programming Languages

In the beginning In the wake of the CoVID-19 pandemic, New Jersey’s governor made an unusual admission: He will outsource COBOL developers. State unemployment insurance systems were written in a 60-year-old programming language and needed updating to handle millions of claims. Trouble was, few state employees knew how to do it. And the crisis extended beyond New Jersey, just one of many states that depended on these weak systems. At a rough estimate, COBOL’s inefficiencies cost the US GDP. 105 billion dollars in 2020.

You’d think New Jersey would have changed its system after that — and that Covid was COBOL’s last gasp. Absolutely not. The state’s new unemployment system came with an improvement in living standards, but it was still made possible by a mainframe running the old language, on the background.

COBOL, short for Common Business Oriented Language, is the most widely adopted computer language in history. Of the 300 billion lines of code written by the year 2000, 80 percent were in COBOL. It is still widely used and supports a number of government systems, such as motor vehicle records and unemployment insurance; On any given day, it can handle something on order. 3 trillion dollars worth of financial transactions. I think of COBOL as a kind of digital asbestos, once almost ubiquitous and now incredibly, dangerously difficult to remove.

COBOL was first proposed in 1959 by a committee consisting of much of the American computer industry (including Grace Hopper). It called for “specifications for a common business language for automated digital computers” to address a growing problem: the cost of programming. Programs were custom-written for specific machines, and if you wanted to run them on something else, it meant almost a total rewrite. The committee approached the Department of Defense, which happily accepted the plan.

COBOL’s design set it apart from both languages ​​then and now. It was intended to be written in plain English so that anyone, even non-programmers, could use it. Symbolic mathematical notation was added only after much discussion. Most versions of COBOL allow the use of hundreds of words (Java only allows 68), making it easy to write “is,” “then” and “to”. Some have even said that COBOL was intended to replace computer programmers, who occupied a rare place in many companies in the 1960s. The hope was that it would produce its own documentation, saving developers time and making it easier to maintain in the long run.

But what did it mean to be able to read? Programs are not books or articles; They are conditional sets of instructions. While COBOL could distill the complexity of a single line of code into something that anyone could understand, the difference dissipated in programs running to thousands of lines. (It’s like an Ikea assembly manual: every step is easy, but somehow the thing still doesn’t come together.) Furthermore, COBOL was implemented with a piece of logic that’s often despised: the GO TO statement, an unconditional branching mechanism that sent you rocketing from one part of the program to another. The result was “spaghetti code,” as the developers like to say, that documented itself to a point.

Many computer scientists had problems with COBOL from the beginning. Edsger Dijkstra famously detested it, saying, “The use of COBOL cripples the mind; therefore its teaching should be considered a criminal offense.” Dijkstra similarly hated the GO TO statement, arguing that it made programs almost impossible to understand. There was a degree of real misogyny: COBOL was often seen as a purely utilitarian language intended to solve boring problems.

Jean Samet, one of the original designers, saw it differently — language simply had the complex task of representing complex things, like Social Security. Or as another defender wrote, “Unfortunately, there are too many business application programs written by programmers who never had the benefit of a well-taught structured COBOL.” Good COBOL was indeed self-documenting, but it depended on the specific programmer. Fred Grunberger, a mathematician at the Rand Corporation, put it this way: “COBOL, in the hands of a master, is a beautiful tool—a very powerful tool. COBOL, as handled by a low-level clerk somewhere, would be a miserable mess.”