Positively Lazy

How laziness drove John Backus to develop programming languages

Karl Beecher
Great Moments in Computing History
5 min readFeb 18, 2016

--

“Much of my work has come from being lazy. I didn’t like writing programs, and so…I started work on a programming system to make it easier to write programs.”

— John Backus (1924–2007)

Computer scientists are positively lazy. I say positively lazy on purpose. When a computer scientist is faced with a task, he does his utmost to concentrate on the parts of a problem that matter. Anything laborious that he can delegate to an automaton to avoid needless work is all the better. So when John Backus, a lifelong IBM employee, said that his motivation was laziness, he was actually saying something quite profound.

When we think of those responsible for great discoveries, we usually think of people who pushed themselves hard or put in grinding hours of toil beyond what most of us could bear. Perhaps it’s Columbus spending months at sea crossing the Atlantic; maybe it’s Darwin travelling the world for decades and painstakingly compiling evidence of evolution; or Einstein revolutionising physics and pushing himself to exhaustion in the process. “Lazy” is a word far from our thoughts as we ponder these folks. Computer science is hard work, believe me. But a peculiarity of the field is that many advances come from the type of laziness Backus was referring to. We saw an instance of this in an earlier article when Leonard Euler sought a specific route across the bridges of Köngisberg. Rather than check every possible route, Euler was lazy. He attacked the essence of the problem and found a shortcut, and came up with graph theory in the process.

Anyway, back to Backus. Programming in assembly language was very hard. Backus hated it and tried to find a way to avoid it. In so doing, he and his team at IBM came up with one of the most important breakthroughs in programming history, one which earned him the 1977 ACM Turing Award[1]. The citation on the award says Backus earned it “for profound, influential, and lasting contributions to the design of practical high-level programming systems…” So what were these programming systems he developed to make his life easier?

The problem was that, after figuring the algorithms out (the fun stuff), the inevitable torture of writing assembly language instructions followed.

Backus had identified that a lot of needless work was distracting him from concentrating on what he really wanted to do. He wanted to spend his time developing algorithms; entering them into a computer as a program was just a procedural detail. The problem was that, after figuring the algorithms out (the fun stuff), the work was far from done. The inevitable torture of writing assembly language instructions followed.

What was needed, Backus thought, was a system that aligned closely with the way people naturally thought about algorithms. Assembly language forced one to think in low-level terms, rooted deep in the gubbins of the computer. Backus’s new system expressed solutions in higher-level terms, which were more purely mathematical. He created FORTRAN (from FORmula TRANslation), the first fully-functional, high-level programming language. FORTRAN allowed someone to write programs that were conceptually much closer to the algorithm in their head. Many of the tedious details, like memory locations, accumulators and the low-level machine instructions, weren’t visible — they were papered over by the programming language. Although it didn’t eliminate all of the technical details, FORTRAN became a great success. Other programming languages quickly followed, each with their own ridiculous name, like ALGOL, COBOL, LISP or BASIC (lower-case letters hadn’t yet been invented).

It’s hard to overestimate the liberating effects these languages had on programmers. You can see what I mean in the following example.

Here’s the kind of program that got up Backus’s nose. It’s a very simple program (believe me!), written in an assembly language, and used to find the highest number in an unsorted list of numbers.

If you’ve never programmed in your life, you’re probably thinking to yourself, “Sure, I don’t understand it, but I’m not supposed to. It probably makes perfect sense to a programmer.” This is true, but it misses the point. Programmers may understand this code, but it takes some effort even for a talented programmer. There are a lot of technical details the programmer has to worry about in addition to the problem at hand.

Let’s compare it to the kind of program Backus preferred to write.

This program does the same as the previous program, except that its written in the BASIC programming language, which originated in 1964. A novice programmer with a basic grasp of algebra should have no trouble getting the hang of it. Even if you’ve never programmed before, it probably makes some kind of sense to you as you read it.

If it doesn’t fully make sense to you, here are the important points:

  • The input to the program is a list of numbers called (imaginatively) NUMBERS.
  • Line 1 initialises a variable called HIGHEST, which holds the value of the highest number found so far.
  • Line 2 opens a for-loop, which is a form of iteration. Its job is to run all the instructions between itself and the following NEXT statement (in this case, there’s only one instruction: line 3). It repeats the statements for each item in NUMBERS. So if NUMBERS has three items in it, line 3 will be executed three times.
  • Every time a new execution of the loop starts, N is assigned the value of the current item under examination. If NUMBERS contained 3, 7 and 4, then the first time line 3 is executed, N would contain 3; the second time through, N would contain 7; on the last execution, N would contain 4.
  • Line 3 compares the currently examined number to the highest known number. If it’s larger, the highest number is replaced by the current.
  • Line 4 tells the computer to move onto the next item in the list. If the end of the list has been reached, the computer exits the loop.

With a name like BASIC (which stands for Beginner’s All-Purpose Symbolic Instruction Code), you can guess that this language was invented for newbies to programming. Later, in the 1980s, home computers took the world by storm and got a whole generation of ordinary people programming in the comfort of their own home. That’s largely because BASIC was built into almost every machine. The language was designed so that the programmer could write a program in terms that were familiar and relevant to the problem they were trying to solve. You didn’t need to know about accumulators, memory addresses, program counters and so on…just some familiarity with algebra was enough to get started.

Not all high-level languages are as friendly as BASIC, but they’re certainly superior to assembly language in many respects. They allow programmers to be more productive, make fewer mistakes, be far less distracted by irrelevant details and write more general programs.

This is an excerpt from my book, Brown Dogs and Barbers: What’s Computer Science All About?, an introduction to computer science for everyone, no expertise required. Available here.

1 The Turing Award is a kind of Nobel prize for computer science named after the late Alan Turing.

--

--

Karl Beecher
Great Moments in Computing History

Budding novelist. Recovering academic. Available now: INTERSTELLAR CAVEMAN (http://amzn.to/2X9C9RP)