« Stuff The Internet Says On Scalability For April 4th, 2014 | Main | The Mullet Cloud Selection Pattern »
Thursday
Apr032014

Leslie Lamport to Programmers: You're Doing it Wrong

Famous computer scientist Leslie Lamport is definitely not a worse is better kind of guy. In Computation and State Machines he wants to make the case that to get better programs we need to teach programmers to think better. And programmers will think better when they learn to think in terms of concepts firmly grounded in the language of mathematics.

I was disappointed that there was so much English in the paper. Surely it would have been more convincing if it was written as a mathematical proof. Or would it?

This whole topic has been argued extensively throughout thousands of years of philosophy. Mathematics has always been a strange attractor for those trying to escape a flawed human rationality. In the end as alluring as the utopia of mathematics is, it lacks a coherent theory of meaning and programming is not about rearranging ungrounded symbols, it's about manipulating and shaping meaning.

For programmers I think Ludwig Wittgenstein has the right sense of things. Meaning is derived by use within a community. Programs built and maintained by programmers is at bottom a community of effort.

Abstract:

For quite a while, I’ve been disturbed by the emphasis on language in computer science. One result of that emphasis is programmers who are C++ experts but can’t write programs that do what they’re supposed to. The typical computer science response is that programmers need to use the right programming/specification/development language instead of/in addition to C++. The typical industrial response is to provide the programmer with better debugging tools, on the theory that we can obtain good programs by putting a monkey at a keyboard and automatically finding the errors in its code.

I believe that the best way to get better programs is to teach programmers how to think better. Thinking is not the ability to manipulate language; it’s the ability to manipulate concepts. Computer science should be about concepts, not languages. But how does one teach concepts without getting distracted by the language in which those concepts are expressed? My answer is to use the same language as every other branch of science and engineering—namely, mathematics. But how should that be done in practice? This note represents a small step towards an answer. It doesn’t discuss how to teach computer science; it simply addresses the preliminary question of what is computation. 

Related Articles

Reader Comments (8)

I think it is a big misconception that language supercedes concepts. E.g. you'll find objectoriented concepts in plain C, Lisp, JavaScript, .. programs.

Being a person having significant (+3 year each) programming experience in Assembler, C, Lisp, (Object-)Pascal, C++, Smalltalk, Java I'd say the language is just a way to describe your concept/solution to the machine. The larger the conceptual gap of the language to the underlying hardware execution platform, the higher the price (performance, memory cost).
Ofc some languages favour specific concepts, but you can do a functional programming style in Ansi-C no problem, its just somewhat inconvenient ..
Actually overestimating the role of the language is a typical misconception of beginner programmers :-) (no offense to great Mr Lampert, however from his bio I'd expect he spent most of his brain activity in higher order orbits than programing bread-and-butter software applications ..).

April 3, 2014 | Unregistered CommenterRuedigerMoeller

I wholeheartedly agree that better programmers are better thinkers.

But I definitely do not think that average-joe-codemonkey would benefit from more maths.

In fact there is probably not enough good-at-maths people in the world to fill all available software-egineering positions, let alone software-developer.
And people who are good at math have a higher correlation correlation than average to being bad-at-obeying-orders and understanding-other-people-needs (good qualities for sw engineers). My opinion of course.

Heck, I am not good at maths. I do not think about code as maths. I think about code as control flow essentially, layers and interacting components.

As a professional IT consultant, what I see daily from big-corp developers is violation of all those rules which are so hard to have automated checkers for. You train them, teach them, and say yes. And then they go and do the opposite.

April 3, 2014 | Unregistered Commentergggeek

My experience is that universities in the US do not focus on languages but on fundamentals. Most of the programming courses teach programming languages in tutorials, and students learn about the ins-and-outs of the taught languages by working on assignments. Nonetheless, Computation and State Machines is a wonderful read.

April 3, 2014 | Unregistered CommenterDanny Yuan

Mathematics is a language of details but loses those not good with it in a maze of trees not seeing the forest around them,

I am not excellent at math (of average high school ability I estimate.) yet give me a computer and a programming environment and I can express ideas that I have no mathematical concept for.

The assumption that rational thinking and math ability being related is as flawed as any other theory of human stupidity.

programming only relates to math in their being comparable on equal terms as any other language for expression of concepts to present as a communicative flow of both concept and *agreement* symbology.

programming is the expression, math is the details and language is the symbols as expressions using details for purposeful communications.

there is nothing empowering math over any other language as it is a tool of language equal to other symbol sets as recognized and agreed to concepts for language based communications.

Like anything else, "better" has no meaning beyond the origin of its expression without agreement and consensual communication use of the language it is expressed within.

Abstraction and expression of abstraction is a skill learned by interest and practice,

Everyone is different in some way so therefore programming using non-math languages expressing use of math to encompass parts of the expression expands the scope of who can use the tool or you find yourself enforcing a slavery and segregation through disenfranchisement of anyone who does not memorize math concepts to join those with access and power

A computer language is not a language, it is code. Code give us symbols that we use to represent the state and transfer of electrons in the computer. We give meaning to these symbols and how we manipulate them. It is the creative part of ourselves that allows us to ask not only questions about the meaning of those symbols, but how to ask the right questions that gives us answers that we learn from. Therefore, learning how to ask the right questions is the true goal of any profession: programming, science, art, diagnostics of car repair, etc. Mathematics is just a tool that we use in the process of learning. Insisting on using just one tool for everything is just as bad of an idea as using a mechanic's crescent wrench to debug kernel code. Creativity and learning how to ask the right questions is the fundamental process of creating anything. We can teach others how to go about asking the right questions by emphasizing always thinking of the concepts--the big picture--involved, which results in an insight that allows some to create something new, useful or a fix to someone's buggy code before the deadline.

April 4, 2014 | Unregistered CommenterMike

"Thinking is not the ability to manipulate language; it’s the ability to manipulate concepts." Ever since Noam Chomsky's transformational grammar we know there is a depth and a surface structure to linguistic utterances. The depth structure is where the thinking is done - BEFORE language. Man thinks in pictures, not language. It is to teach to think clearly, i.e. in pictures, albeit rather abstract ones, that makes better developers. Nathan Myrvold of Microsoft fame said an average and a genius programmer differ not by a magnitude of five times, ten times, a hundred times more lines of code written, but by a whopping ten thousand times! And you cannot improve this by teamwork. Not only does tramwork slow down things, Shakespeare's plays also were not teamwork nor was the Iliad.

April 4, 2014 | Unregistered CommenterDarragh McCurragh

I like to think of programming as an excersize in Platonic ideals.

April 16, 2014 | Unregistered CommenterBrady

Link is broken . Interview is present at http://www.budiu.info/blog/lamport.html

January 2, 2015 | Unregistered CommenterSairam

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>