Daily Archives: August 5, 2012
As we race forward in technology, clamoring to be the first person to discover the next big innovation with all the chaos and enthusiasm of the great land rush of the American West, it is good to occasionally take a break from the race and check our bearings by looking back at our past.
Today is a very special day in the history of computer science. Not for the birthdays we are celebrating today (Happy Birthday Ed!) but for the memorial of one who passed away on this day in 2002. Today I write in honor of the Dutch computer scientist Edsger W. Dijkstra and his influence on this field of science.
Edsger Wybe Dijkstra (May 11, 1930 – August 6, 2002) made numerous important contributions to computer science. You can get a good feel for his impact in the Wikipedia article about him. As you read, search through the bibliography and you can find details of his original works that apply to software development even today. Even Google probably would not exist without Dijkstra’s insights. There is one topic that had a particularly profound impact on me. It all revolves around the Goto statement.
In 1968 this article by Dijkstra was published in the Communications of the ACM (Association for Computing Machinery).
In his letter, Dijkstra calls for the abolishment of the Goto statement from high level programming languages because it promotes bad programming practices that make for unmanageable code. The debate went on for awhile before subsiding. But then in 1987 a new article was published in the Communications of the ACM titled “Goto considered harmful, considered harmful”. This article debated the merits of the original article of 1968. That stirred the debate once again and over the next few months letters to the editor dominated the magazine. Then after several months of debate, there was one letter to the editor that was particularly detailed and scientific which poked holes in the arguments of both sides of the debate, first pointing out the incorrect syntax used in the arguments, like the use of upper case vs. lower case variables, then it ripped apart the content of the arguments. In the end, the author stated his disappointment that after 20 years, we had made no real progress on this position. The letter was signed by Dijkstra himself.
I find it fascinating to have been actively involved in that debate with the computer science legend himself in those days. Since that time, the topic has occasionally surfaced again in one form or another, though never with the energy and passion of the programmers and computer scientists (called developers now) in those first two waves of debate. And yet, even today, 44 years later, we still see the results of programmers who continue to fail to heed the real message Dijkstra was sending: the concept of structured programming. Corrupted data, security vulnerabilities, software crashes and incompatibilities are the result. While object-oriented languages make it easier to follow structured programming, they do not guarantee it. Learning to write a program (now we call them “apps”) is easy. There is an endless supply of self-taught developers. The challenge is getting the world to use the best practice concepts that Dijkstra was championing.
It might seem like 44 years is a surprisingly long time for such bad practices to persist. But, depending on what you consider the starting point, computer science is only about 60 to 80 years old. If you compare Computer Science to Medical Science, we are at the medical science equivalent of using leeches and witch doctors. With the explosion of information, it is no longer likely that any one person will accomplish the brilliant feats like DaVinci, Edison, or Einstein did, but hopefully our collective intelligence will make it possible to accelerate the maturing process of computer science that we can quickly realize the goals of Edsger Dijkstra in his pursuit of better software. So what do you think? Should the Goto statement be considered harmful?