• Richard Harvey

Gresham College Lecture on Programs: more of an art than a science.

There have been various attempts to produce a "tree of life" that covers programming languages and, as I was preparing this lecture, I thought briefly about building one. But the whole enterprise is fraught with difficulty. Firstly, what do we mean by a programming language? I think we probably mean languages that are universal -- languages that one can use irrespective of the hardware architecture. Hang on there -- all architectures? If we are restricting ourselves to only languages that compile on a very wide variety of machines then that's really only one language: C.


The C programming language was devised in 1972 by Dennis Ritchie, and immortalised in the famous book "The C Programming Language" by Dennis Ritchie Brian Kernighan. It remains one of the most used and most popular programming languages on the planet. It has a simple and compact syntax and is famous, or infamous, for the freedoms it gives to programmers. In C you can manipulate individual bits in your computer's memory if you wish, which is why it is the favoured tool for people writing operating systems and other computer brain surgeons. There are people, among which I include myself, who think that having gone to the effort of learning C they should jolly well not go to the effort of learning languages in which you can do less (such as Pascal) or do the same but with more cupholders (C++). Whereas others regard the freedom of C as equivalent to replacing the airbags in your card with inward facing sabres -- dangerous but a constant warning to drive carefully.


So, maybe a programming language merely has to be declared as such -- the equivalent of Marcel Duchamp declaring a urinal to be art. Well, if we follow that axiom, then there gazzilions of languages. Ada Lovelace's notes on how one might program Babbage's Analytical Engine would count as a program. And graduate theses that develop programming languages to prove an arcane point also count as languages.


Furthermore, as with real languages, we cannot be really sure about the origins of a computer language. That said, there are a few influential and widely used languages that are attributed one person. Fortran is one such example. Developed by John Backus in 1957, the Fortran language is still in use today. It is is easy to learn, has good numerical analysis, and compilers exist for a wide range of computers, particularly super-computers. But most languages arise from jumble of contributions, predecessor languages which were a little bit like this one and serendipidous hardware developments which enabled some of the fancier features.


So why do we have so many languages? The trite answer is that each language arises as a solution to a slightly different set of circumstances. The analogy is that of a plumber. Just as a skilled plumber reaches into his or her toolbag to retrieve exactly the right for the job, the programmer reaches into the internet and selects exactly the right language. If you have ever worked on a large programming project you will know that this is complete nonsense. Of course a languages should be selected to fit the problem, the interfaces, and the skills of the programmer. But I am sure we have all worked on projects where we really had no idea why we working in that language. Furthermore, if languages really were selected in this way, then there would be a literature that lists languages by their features. Without that list it is very hard to believe that the choice is systematic. Rather, to return to our analogy, the plumber rustles around in the toolbag picks up the hammer they used on the last job and uses that.


For me, this is a rather surprising state of affairs. To be sure, once one has chosen a data structure and an algorithm the programming language is a secondary consideration but it mistakes are rarely made in the first two stages. It is the act of programming that introduces the failure modes. To be fair, there are some studies of the effectiveness of various practices in software engineering (not many and even fewer that measure error rates) but the business of coding that remains more of an art than a science.


And for those of you who just clicked on this to get a list of a references on the slides (sometimes they are little small on the small screen), here they are:


  1. "Konrad Zuse’s Plankalkül: The First High-Level, 'non von Neumann Programming Language'”, Wolfgang Giloi, IEEE Annals of the History of Computing, Vol 19, No 2, 1997

  2. "Rear Admiral Grace Murray Hopper ’28“Queen of Code” Earns Posthumous Honors, Continues to Open Doors for Women in Tech" Kimberley Schaye, https://stories.vassar.edu/2020/grace-hopper.html

  3. Simon Peyton-Jones, "Escape from the ivory tower: the Haskell journey", Lecture at Churchill College, 25th April 2017, Available on YouTube at https://www.youtube.com/watch?v=re96UgMk6GQ

  4. The RedMonk Programming Language Rankings: June 2020, Stephen O'Grady, https://redmonk.com/sogrady/2020/07/27/language-rankings-6-20/

  5. TIOBE Programming Community Index, https://www.tiobe.com/tiobe-index/

  6. "The FLOW-MATIC and MATH-MATIC Automatic Programming Systems," Alan Taylor. Annual Review in Automatic Programming, Pergamon, 1960, pp 196-206, ISBN 9780080092171, https://doi.org/10.1016/B978-0-08-009217-1.50021-9.

  7. "Ogilby and Morgan's Large Scale Map of the City As Rebuilt By 1676 ," in Ogilby and Morgan's Large Scale Map of the City As Rebuilt By 1676, ([s.l.]: [s.n.], 1676), British History Online, accessed January 2, 2021, http://www.british-history.ac.uk/no-series/london-map-ogilby-morgan/1676/map.

  8. "Go To Statement Considered Harmful," Edsger Dijkstra, Communications of the ACM, 11, (3), 1968.

  9. "Algorithms + Data Structures = Programs, " Niklaus Wirth, 1976, Prentice-Hall ISBN 978-0130224187

28 views0 comments

Recent Posts

See All