TITLE: OOPSLA Day 3: Sussman on Expressing Poorly-Understood Ideas in Programs AUTHOR: Eugene Wallingford DATE: October 24, 2005 7:36 PM DESC: Sussman explained the ideas that make his "Structure and Interpretation" books so important to their disciplines. ----- BODY: Gerald Sussman is renown as one of the great teachers of computing. He co-authored the seminal text Structure and Interpretation of Computer Programs, which many folks -- me included -- think is the best book ever written about computer science. Along with Guy Steele, he wrote an amazing series of papers, collectively called the "Lambda papers", that taught me as much as any other source about programming and machines. It also documented the process that created Scheme, one of my favorite languages. Richard Gabriel introduced on Sussman before his talk with an unambiguous statement of his own respect for the presenter, saying that when Sussman speaks, "... record it at 78 and play it back at 33." In inimitable Gabriel fashion, he summarized his career as, "He makes things. He thinks things up. He teaches things." Sussman opened by asserting that programming is, at its foundation, a linguistic phenomenon. It is a way in which we express ourselves. As a result, computer programs can be both prose and poetry. In programs, we can express different kinds of "information": The practical value that we express in programs sometimes leads to the construction of intellectual ideas, which ultimately makes us all smarter. Sussman didn't say anything particular about why we should seek to express beauty and emotional content in programs, but I can offer a couple of suggestions. We are more likely to work harder and deeper when we work on ideas that compel us emotionally. This is an essential piece of advice for graduate students in search of thesis topics, and even undergrads beginning research. More importantly, I think that great truths possess a deep beauty. When we work on ideas that we think are beautiful, we are working on ideas that may ultimately pay off with deeper intellectual content. Sussman then showed a series of small programs, working his way up the continuum from the prosaic to the beautiful. His first example was a program he called "useful only", written in the "ugliest language I have ever used, C". He claimed that C is ugly because it is not expressive enough (there are ideas we want to express that we cannot express easily or cleanly) and because "any error that can be made can be made in C". His next example was in a "slightly nicer language", Fortran. Why is Fortran less prosaic than C? It doesn't pretend to be anything more than it is. (Sussman's repeated use of C as inelegant and inexpressive got a rise out of at least one audience member, who pointed out afterwards that many intelligent folks like C and find it both expressive and elegant. Sussman agreed that many intelligent folks do, and acknowledged that there is room for taste in such matters. But I suspect that he believes that folks who believe such things are misguided or in need of enlightenment. :-) Finally Sussman showed a program in a language we all knew was coming, Scheme. This Scheme program was beautiful because it allows us to express the truth of the domain, that states and differential states are computed by functions that can be abstracted away, that states are added and subtracted just like numbers. So, the operators + and must be generic across whatever value set we wish to compute over at the time. In Scheme, there is nothing special about + or . We can define them to mean what they mean in the domain where we work. Some people don't like this, because they fear that in redefining fundamental operations we will make errors. And they are right! But addition can be a fundamental operation in many domains with many different meanings; why limit ourselves? Remember what John Gribble and Robert Hass told us: you have to take risks to create something beautiful. This point expresses what seemed to be a fulcrum point in Sussman's argument: Mathematics is a language, not a set of tools. It is useful to us to the extent we we can express the ideas that matter to us. Then Sussman showed what many folks consider to be among the most beautiful pieces of code ever written, if not the most beautiful: Lisp's eval procedure written in Lisp. This may be as close to Maxwell's equations in computer science as possible. This is where Sussman got to the key insight of his talk, the insight that has underlay much of his intellectual contribution to our world:
There are some things we could not express until we invented programming.
Here Sussman distinguished two kinds of knowledge about the world, declarative knowledge and imperative knowledge. Imperative knowledge is difficult to express clearly in an ambiguous language, which all natural languages are. A programming language lets us express such knowledge in a fundamentally new way. In particular, computer programs improve our ability to teach students about procedural knowledge. Most every computer science student has had the experience of getting some tough idea only after successfully programming it. Sussman went further to state baldly, "Research that doesn't connect with students is a waste." To the extent that we seek new knowledge to improve the world around us, we must teach it to others, so I suppose that Sussman is correct. Then Sussman clarified his key insight, distinguishing computer programs from traditional mathematics. "Programming forces one to be precise and formal, without being excessively rigorous." I was glad that he then said more specifically what he means here by 'formal' and 'rigorous'. Formality refers to lack of ambiguity, while rigor referd to what a particular expression entails. When we write a program, we must be unambiguous, but we do not yet have to understand the full implication of what we have written. When we teach students a programming language, we are able to have a conversation with them of the sort we couldn't have before -- about any topic in which procedural knowledge plays a central role. Instead of trying to teach students to abstract general principles from the behavior of the teacher, a form of induction, we can now give them a discursive text that expresses the knowledge directly. In order to participate in such a conversation, we need only know a few computational ideas. One is the lambda calculus. All that matters is that you have a uniform system for naming things. "As anyone who has studied spirituality knows, if you give a name to a spirit, you have power over it." So perhaps the most powerful tool we can offer in computing is the ability to construct languages quickly. (Use that to evaluate your favorite programming language...) Sussman liked the Hass lecture, too. "Mr. Hass thinks very clearly. One thing I've learned is that all people, if they are good at what they do, whatever their area -- they all think alike." I suspect that this accounts for why many of the OOPSLA crowd enjoyed the Hass lecture, even if they do not think of themselves as literary or poetic; Hass was speaking truths about creativity and beauty that computer scientists know and live. Sussman quoted two artists whose comments echoed his own sentiment. First, Edgar Allan Poe from his 1846 The Philosophy of Composition:
... it will not be regarded as a breach of decorum on my part to show the modus operandi by which some one of my own works was put together. I select "The Raven" as most generally known. It is my design to render it manifest that no one point in its composition is referable either to accident or intuition -- that the work proceeded step by step, to its completion with the precision and rigid consequence of a mathematical problem.
And then concert pianist James Boyk:
A work of art is a machine with an aesthetic purpose.
(I am uncomfortable with the impression these quotes give, that artistic expression is mechanistic, though I believe that artistic work depends deeply on craft skills and unromantic practice.) Sussman considers himself an engineer, not a scientist. Science believes in a "talent theory" of knowledge, in part because the sciences grew out of the upper classes, which passed on a hereditary view of the world. On the other hand, engineering favors a "skill theory" of knowledge; knowledge and skill can be taught. Engineering derived from craftsmen, who had to teach their apprentices in order to construct major artifacts like cathedrals; if the product won't be done in your lifetime, you need to pass on the skills needed for others to complete the job! The talk went on for a while thereafter, with Sussman giving more examples of using programs as linguistic expressions in electricity and mechanics and mathematics, showing how a programming language enables us -- forces us -- to express a truth more formally and more precisely than what our old mathematical and natural languages did. Just as most programmers have experienced the a-ha! moment of understanding after having written a program in an area we were struggling to learning, nearly every teacher has had an experience with a student who has unwittingly bumped into the wall at which computer programming forces us to express an idea more precisely than our muddled brain allows. Just today, one of my harder-working students wrote me in an e-mail message, "I'm pretty sure I understand what I want to do, but I can't quite translate it into a program." I empathize with his struggles, but the answer is: You probably don't understand, or you would be able to write the program. In this case, examination of the student's code revealed the lack of understanding that manifests itself in a program far more complex than the idea itself. This was a good talk, one which went a long way toward helping folks see just how important computer programming is as an intellectual discipline, not just as a technology. I think that one of the people who made a comment after the talk said it well. Though the title of this talk was "Why Programming is a Good Medium for Expressing Poorly Understood and Sloppily Formulated Ideas", the point of this talk is that, in expressing poorly-understood and sloppily-formulated ideas in a computer program, we come to understand them better. In expressing them, we must eliminate our sloppiness and really understand what we are doing. The heart of computing lies in the computer program, and it embodies a new form of epistemology. -----