cole lyman Bioinformatics, Emacs, Programming, and Life

The Art of computer programming

The title of Donald Knuth’s famed series The Art of Computer Programming is often misunderstood, and as he describes in his talk Computer programming as an art which he delivered when he received the 1974 Turing award. I love this talk! I think that it offers a unique perspective on programming that can be very beneficial.

Knuth starts his talk with an explanation of the difference between an art and a science through an etymologic analysis of the words. This seems to explain why the fields of medicine have historically been considered arts even though our modern perspective would consider them as sciences.

I can resonate with Knuth’s observation:

My feeling is that when we prepare a program, it can be like composing poetry or music; as Andrei Ershov has said, programming can give us both intellectual and emotional satisfaction, because it is a real achievement to master complexity and to establish a system of consist rules.

I believe that code can certainly be beautiful and the process of reducing a problem down into a set of explicit rules can be extremely satisfying (although at times, very frustrating). Many people consider programs to merely be a computational recipe that executes commands at the will of the programmer. However, I resonate much more with the idea of programming as “procedural epistomology,” (from Structure and Interpretation of Computer Programs) meaning that we construct programs to discover truth and use programs as a tool to justify our knowledge.

I do have a hard time reconciling this idea of programming as “procedural epistomology,” essentially idealistic programming for discovering truth, and pragmatic programming, programming to solve a problem. However, I think Knuth addresses this in his talk quite nicely when he states that “we shouldn’t feel guilty about programs that are just for fun.”

I enjoy how Knuth addresses the inverse relationship between amount of resources and enjoyment of programming. The more constrained the resources in which we work under, the more we tend to enjoy the programs we write. I like the idea of working under contrived constraints as an exercise to increase our programming abilities. I have never done this, but I sure would like to try it sometime!

In case you haven’t read the talk, I would highly recommend it. I wonder if there is a video recording of him delivering it, I’m sure that it would be a pleasure to watch Knuth himself deliver it.

Webmentions What are webmentions?