Why Undergraduates Should Learn the Principles of Programming Languages

Why Undergraduates Should Learn the Principles of Programming Languages

The linked document is the first public release of a document discussing the value of programming languages principles for undergraduate CS majors. The intended audience is computer scientists who are not specialists in programming languages. Please leave comments on how well you believe it meets its goals and with suggestions for improvements.

Abstract: Undergraduate students obtain important knowledge and skills by studying the pragmatics of programming in multiple languages and the principles underlying programming language design and implementation. These topics strengthen students' grasp of the power of computation, help students choose the most appropriate programming model and language for a given problem, and improve their design skills. Understanding programming languages thus helps students in ways vital to many career paths and interests.

It would be nice if people interested in this as much as Kim Bruce could actively post such stuff to LtU as contributing editors, hint hint professors...

Edit: In case Kim Bruce is listening, I found this link today via Hacker News posting. There are some comments there, too.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'm sort of surprised

I mean, who out there actually questions this?

All you need is to see three or more crappy, dynamically-scoped languages (this should come up during your first six months post-graduation), all of which need to get re-designed for lexical scoping in their V3.0 (you can only be a non-believer for two major revs), and the need for this kind of training becomes obvious.

Did you read the first paragraph?

It clearly states the intended audience is computer scientists who aren't specialists in languages.

In other words, "We have colleagues in the offices down the hall who are only interested in algorithm design, and when curriculum design questions come up, they wave their hands at us programming language researchers, because they think programming language research is a bunch of caca." Loosely translated, of course.

Generally speaking, it takes a new generation to adopt the ideas of the brightest from the previous generation. Even then, some ideas might be lost. This was one of the key motivations behind the notion of object-functional languages in the 1990s. Even today I see practitioners stuck in old ways of doing things because they have been habituated by the tools they are required to use. Sometimes I am on the phone with a client and he is stuck trying to export data to me using Crystal Reports, because a billion dollar a year company is literally coordinating change data capture using Crystal Reports, because it started out with some small usages by somebody and grew into a big ball of mud (in the worst way imaginable).

Loosely translated indeed

but nevertheless very accurate. I have been in such meetings.

Material Matters

PL is a wide subject; such should not be surprising to the LtU audience. Also, the academic milieu has a tendency to shift the meaning and contextual use of words. The combination of these two factors make it hard to dispense with the area simply, as this paper tries to do.

For example, I took a graduate course in PL, mostly based out of TaPL. I now do language definition and analysis professionally. The course material has yet to come in handy. This illustrates the frequent split of an academic view of a subject with an industrial one. The industry-centrists will jump on this, and will paint much of the area with the same brush.

I recently saw a proggit link to a blog post explaining closures. The author mentioned how frequently programmers couldn't understand the standard definitions, such as this one from Wikipedia:

"In computer science, a closure is a first-class function with free variables that are bound in the lexical environment."

I consider a professional programmer, let alone a computer scientist, woefully undereducated if unable to parse terms like "lexical environment" and "free variables". There is certainly a foundation of common semantics and terminology that makes sense to integrate into the curriclum somewhere. But where does it go?

It can be difficult to suss out a place for directed PL education in a courseload. Most students already get ad-hoc PL information from various taught languages, compilers, and formal languages/computation. Since those subjects tend to be under the aegis of specialists in some other subject (e.g., algorithms, data structures), the courses rarely spend more time than strictly necessary on what the instructors consider extranous material. And adding required courses is just about impossible; one generally has to displace an established interest.

Finally, there is no established cannon in PL. Do you teach Haskell/ML and typing? Metacircular interpreters? Scripting and web languages? DSL design and use? Ground-up with SICP? C++ templates and libraries? Applicative/functional methods? Historical overview? Remember, this is a subject that can't even decide on a common terminology for typing variants. It's like the old trope about atheists-- get two PL researchers together and all they'll agree on is the importance of PL. Thus, consensus groups and political cabals are unlikely to form, preventing effective committee-wrangling.

The paper made some good points, but never managed to form a cohesive argument while pulling out old, easily argued tropes. Yes, Jane Street Capital loves them some ML and Paul Graham adores Lisp. Where does that get us? An argument for curriculum change needs to take into account a much wider set of issues, and it must stand on strong foundations. I've been part of those debates before. They get ugly fast, and you have to be superbly prepared.

Teach CTM?

A PL course should probably cover a wide variety of paradigms (including some esoteric ones, such as cellular automata), perhaps following trains of motivations (i.e. where did 'exceptions' come from? well, we've already been handling errors by passing them up the chain of calls...).

I'd have loved to see a survey course that goes beyond imperative/functional strict/normal-order and hits such issues as constraint programming, concurrent constraint programming, declarative concurrency, dataflow programming, reactive programming (spreadsheets as PL, publish/subscribe), term rewriting, finite state automaton, cellular automata, grammars-as-language, considerations for live programming, considerations for security, etc.

Unfortunately, I doubt you could fit that all into one course.

Exposure to a wide range of paradigms seems to give programmers a lot of tools for thinking about problems even when their day-to-day language doesn't directly support the styles.

I'd be happy if students learned that constraints are often liberating, that variations on interpretation can sometimes lead to vast differences in programming feel and style, that languages can be understood as much by their motives as by their structure. I'd also hope they learn to see syntax and type-safety as secondary considerations to structure and computation model.

Established canon

Finally, there is no established cannon in PL.

I think there is: untyped lambda-calculus, simply-typed lambda-calculus and System F. Even the books on object calculi that I've seen (such as Abadi and Cardelli's) make a point of showing a translation into lambda-calculi.

Even if you reject lambda-calculus, almost every serious paper on PLT uses the same formalisms: terms, variables, substitution, values, evaluation, confluence, termination, types, typing judgements, soundness, completeness, etc. These concepts at the very least are concepts that every programmer (and computer scientist) ought to be at least cognizant of -- in the sense that, even if they can't remember them exactly, they know they are out there are and are the de facto tools to reach for when you need to reason about programs.

untyped lambda-calculus,

untyped lambda-calculus, simply-typed lambda-calculus and System F.

This "established cannon" seems to be almost entirely restricted to the functional programming paradigm. This is partially justified because FP has a relatively straightforward denotational semantics--especially when dealing with provably terminating ("total") functions. Still, this cannon will reap few or none of the benefits that the SIGPLAN paper ascribes to a PL course. At the very least, a comprehensive course should include the denotational semantics of mutable state and other imperative features (using monads or substructural types) plus subtyping and coinductive models of OOP.

Shot by one's own can(n)on

This "established cannon" seems to be almost entirely restricted to the functional programming paradigm
...
At the very least, a comprehensive course should include the denotational semantics of mutable state and other imperative features

This is a bit like complaining that a course on elementary arithmetic focuses too much on addition and multiplication and really needs to include subtraction and division.

Well, yes, that would be good, but we expect that the students will master the former before they can productively study the latter.

Lambda-calculi with mutable state, etc.

Lambda-calculi with mutable state are quite standard, for example Scheme and ML, which come with denotational semantics. Fsub is a standard typed lambda-calculus with subtyping; I venture to guess that Scala is founded on a variant of Fsub.

Substructural logics help with concurrency, but not state; you need something like Freyd categories for that since state is not compatible with bifunctoriality (any tensor product, for example). Monads don't have anything to do with state in particular

Anyway, substructural type systems and coinductive models are nice research directions, but I would not place them in the canon yet.

In any case, untyped lambda-calculus is much more tractable than Turing machines, which are a pain to reason about. I can see why they still teach them -- besides tradition, it fits into the FSA-pushdown automaton-TM chain in curricula. But if it were up to me I would teach these things via analogous type systems instead. Students should get exposure to the ideas of formal language, grammar and recognition, but it is more important they understand what algorithmic complexity and computation mean in the context of programming languages than in parsing.

Edit: Added last para.

The "established canon"

The "established canon" rather focusses on creating a feedback loop between researchers and researchers. When you are a number theorist your only practical aspiration might be educating young people to become number theorists. When those become professors teaching number theory the circle is closed. Students who go for pure mathematics are all aware of this. There is no kidding.

Not sure about CS students? Maybe lots of them feel annoyed by abstract nonsense used to recycle academic positions; they know it won't get them a job in the industry. Knowing about lambda calculi is not a demanded skill. They are less interested in the S than the C of CS - and as it seems even those decrease in number.

Stepping stones

Knowing about lambda calculi is not a demanded skill.

Knowing about Turing machines is not a demanded skill either, but we teach it. We teach these things because they are stepping stones and provide a coherent perspective for more practical skills.

I agree that TMs are

I agree that TMs are important for universality considerations but their application is still restricted to theory i.e. giving equivalence proofs for models of computations. It doesn't help in reading processor specs selectively or understanding security guidelines, which are "practical" skills in the restricted sense that those are practised outside of the greenhouse.

My observation is that in the 1990s it was still easy to get an IT job with just a math diploma because everyone expected you would "get it". This has changed towards demanding atomic skills, requiring lots of experience with various languages and commodities you might not even heard about, or which are outmoded and don't reflect the state of the art ( I get regularly offers to work as an MFC programmer; this would force me to spend my energy using a legacy toolkit I always considered rubbish ). Math skills don't sell. This makes it very tough to convince people engaging in a more contemplative manner with the scientific basics. One might still find an audience in the Haskell grassroots or LtU readers who nourish their hobby horses but that is little.

Math skills don't sell. This

Math skills don't sell. This makes it very tough to convince people engaging in a more contemplative manner with the scientific basics.

We're entering a data-driven era so I find that increasingly hard to swallow. There's a bit of a strange and unsolved transition point to parallelism and concurrency challenging the programming side of achieving it, but the transition seems inevitable, either by frameworks and languages or brute force from the hardware. As such, I wouldn't worry about people who can do math and want to use computers ;-)

I'm with Dijkstra.

From EWD 1283:

Another remark is that it is the task of a "leading University" to lead. In particular this means for us that we should give society not what it asks for, but what it needs. This issue is particularly acute for CS because their society asks for snake oil, for more of the same, though we all know that it hardly works.

(My emphasis.) There is an EWD where he goes into detail on this topic, but I can't find it offhand. Maybe it's EWD 1165: There is still a war going on.

The war has been long lost

The war has been long lost and you realize it, when you leave university without a track record of wanted skills but just high potential to gather them on the job. There is no advantage for a young graduate to learn the hard stuff aside from personal satisfaction.

I sympathize with the idea of the university as a place of resistance against an omnipotent market with its dumbing down tendencies, cultivating some sort of intellectual priesthood and meritocracy. It is a moral standing. I'm not totally sold to it either but it shall at least play an important role in the balance of powers and it can work quite well as long as there is a lack of adequate and precisely defined labour commodity, aligned with language, tool and framework commodities, but this is past us, maybe for the whole time of our lives.

Not resistance

This is not really a matter of "resistance" by the universities. It is extremely impractical to teach these "atomic" skills in college, except when they happen to be remarkably well-engineered _and_ firmly established as standards, which is a rare case. Generally speaking, technologies and frameworks should be taught in third-party certification courses.

I also disagree with the connotation of mathematical foundations of programming as "the hard stuff": if anything, this shows that universities are failing to teach basic mathematical thinking.

I sympathize with the idea

I sympathize with the idea of the university as a place of resistance against an omnipotent market with its dumbing down tendencies, cultivating some sort of intellectual priesthood and meritocracy.

I don't think that's a fruitful way to view universities and any curriculum that teaches these abstract concepts. I would view it instead as the university teaching problem solving skills, and by forcing students to learn these highly abstract ideas and modes of thought, you improve those skills. That's what will make them a valuable employee, not learning any particular tool or language.

In order for a university to lead...

It needs to judge itself by the same standards it judges the outside world.

And as far as I can see it, the only universities who are somewhat good at that are the ivy league ones, since their professors are judged in salary partly by industry.

Leadership = humility?

In order for a university to lead...
It needs to judge itself by the same standards it judges the outside world.

Hah, I can think of plenty of leaders who refute that claim. :)

Only serious. I think peer review and transparency are pretty stringent standards. Consumers vote for technology with their dollars but they are rarely peers, and corporations are notorious for being opaque and secretive.

I confess my perspective on this is colored by the fact that I think that neither capitalism nor democracy are ideal institutions. The university institution is not ideal either, but in my experience it works better.

Whatever gave you that idea?

Despite the mess everyone is in. If I'ld bet on who's doing the better job, if there is any clear-cut difference, between academia and industry, I'ld bet on the latter.

Depends on what you want

If you want a great deal of hot air, some papers nobody will read, and software that's theoretically interesting but impractical, produced at moderate expense before being abandoned, academia is the place to be.

On the other hand, if you want a poorly designed piece of junk that solves a trivial problem badly (if it works at all), produced very slowly at breathtakingly great expense, go for industry.

As a third option, if you need software that solves a difficult problem well, but with a bafflingly arcane interface and no documentation, produced at minimal expense, try open-source software.

It's not a matter of better or worse, really; each approach has its own uniquely valuable way of failing.

You just made it

into my development team ;)

Which important new

Which important new ideas/tools/techniques came out of academia vs industry?

E.g. Industry: Smalltalk, Academia: Lisp

If you would elaborate that further

Industry: C, C++, Java, C#, javascript, SQL, Fortran, Cobol ...

Academia: Python (Van Rossum wasn't employed as a researcher), Lisp, Haskell, HTML (but by a physicist), Pascal

Open Source: Php, Perl..?

(Defense: Ada/VHDL)

There is a message there. It is: Industry knows best.

(As far as my contacts went, when it comes to CS industry just looks at academia as a supplier of education. Which is odd. Why is it that chemistry, electrical engineering, physics, are all hold in high esteem, whereas CS is just frowned upon?)

C++ development began in

C++ development began in 1979, the exact same year Bjarne Stroustrup got his PhD from Cambridge.

SQL was developped by Donald Chamberlin and Raymond Boyce less than two year after the latter got his PhD from Stanford.

I suspect most of those "Industries" languages were more influenced by academia than you describe it.

Why is it that chemistry,

Why is it that chemistry, electrical engineering, physics, are all hold in high esteem, whereas CS is just frowned upon?)

CEOs don't know how to do chemistry, but they know what it is: it's for creating new kinds of stuff, like detergent. For CS, they don't even know that much.

Huh? C++ was already

Huh?

C++ was already debunked. C was from Bell Labs (equivalent of today's MSR, which is squarely on the academic side), as was Unix. JavaScript is a fairly direct result of Self and Scheme. Etc.

I think the message is that it takes industry backing for uptake and non-research groups are generally incapable of coming up with fundamentally new languages.

I get that

Especially the heritage of Javascript/Scheme, and -I guess- Ada/Pascal/Modula/Algol are straightforward, and I understand by now most people writing languages were probably researchers at some point.

But it still begs the question. Why not just Pascal instead of C, Scheme instead of Javascript, or just Algol instead of Ada. What did they see what wasn't good enough about it?

Has academia, for as far as there is a clear cut, ever been good enough to get it right in one turn?

Hand waiving? Or class struggle?

I am a bit surprised that you support anything so vaguely defined.
Probably I need to read between the lines, but what is the main point of EWD 1165?
Is it that (many of) the US universities teach the skills that should be taught at vocational establishments or even better in the industry (by the system of apprenticeship)? I can agree to this, though I do not understand why this simple statement must be wrapped in so much socialistic propaganda.
I apologize if my post is totally non-PC, I just wanted to make sure we clearly demarcate political views vs. scientific beliefs.

Not Politics, human nature

Don't think thats socialism. I read it as the standard comment of CS versus industry.

To be honest, my personal believe, industry = idiots and academia = fools.

So, you've got a fool complaining against the idiots. Quite eloquently, though. ;)

Confused

I have to admit I might have been confused by the phrase "For instance, there is no such thing as “making money”: some people succeed in transferring money out of the pockets of others into their own". This view of economy as a zero-sum game is a hall mark of Marxism. Another smell was the use of military terminology ("war", "battle"). Yet another give-away: "discrepancy between what society asks for and what society needs" - but who can decide what it really needs if not the society itself? Gosplan?

If one came from a different economic perspective, one would (for example) blame government subsidizing inefficient education, and businesses trying to salvage what possible given the situation.

Another analysis could result in blaming principal-agent problem - corporations hiring managers without aligning their interests sufficiently, resulting in managers optimizing for short-term profits, or empire-growing, etc.

To bring this more on topic, can we clarify our definitions? What is industry and what is academia? Do we differentiate by the methods used (hunch vs. scientific), financial sources (profit-driven private vs. politics-driven government), types of products (software vs. papers)?

Probably no discussion

EWD poses that there is some kind of class struggle between industry and academia, I grant you that. That is an oversimplified world view, but not marxism.

There are a lot of academics in industry, even PhDs at the management level. They know exactly what's going on within 'academia,' so there is no clear cut.

Who works with hunches? If I look at how academic 'free form' projects are managed, you might as well claim that it is industry -with well defined processes- which uses the scientific method, and academia does not.

I don't think you'll ever get a discussion like this right. But, my personal view. I think we're, or were, stuck at the moment at a game where industry produces software, but not enough money from that, and academia produces papers, but not enough good ideas in that. Fundamental CS just stopped solving industries problems, though there is a lot of exciting CS research outside of fundamental CS.

[To be honest. If the scientific method is anything, it is working on a hunch. Toss an idea in the air and see where it ends is research, the rest mostly is not.]

Dichotomy

I think there is a fundamental dichotomy between the facts that 1) we (= society, including industry) install people at universities because we regard them as experts in their fields, and 2) industry complains that the experts do not agree with them.

Dijkstra's story is: I hire an expert. Expert says do X. I do Y. Y doesn't work so well. Do I therefore blame the expert?

I think there is some truth to this.

I also think that there is some truth to the idea that industry does not always get relevant results from academia. However, I don't see the problem. Universities are, in my view, not factories to produce workers; they are there to teach much more fundamental skills. (Maybe I am biased by the fact that I attended a liberal arts school.) And what industry wants new workers to learn does not take four years of daily eight-hour classes. Far from it.

In fact, what stuns me is that our universities do not produce students who cannot switch from Java to Javascript to C# to Python in a week's time. They are not that different. If our universities have failed us, it's not because they do not teach enough specialized skills; it's because they do not teach enough fundamental skills.

There is something odd about the computer industry's gripes with academia. People who get degrees in psychology or history or journalism or physics do not bitch that they did not get enough vocational training in their degree programs. They knew going in that, whatever sort of job they get, they would have to do some more learning, and that what they learned in their degrees was fundamentals, skills which enable them to learn more specialized skills. But the idea of a "computer" is so closely tied with commerce and industry, that computer science students and industry folks think that it equates with "corporate programmer" and that therefore it needs to teach whatever the hell nonsense is flavor of the week.

Well, it doesn't. Computer science is about computation in the same way physics is about natural laws; it's not about Java or IBM WebSphere or CVS or Cocoa CoreData or MySQL version 5.x anymore than physics is about the equipment of various vendors of experimental equipment or Matlab or various brands of resistors. And just like I would expect a physicist to be comfortable learning about those things on the job, I would expect a computer scientist to be comfortable learning Java or whatever as needed.

Dijkstra's story is: I hire an expert. Expert says do X. I do Y.

No way. I do Y because is has been proven that it works. Now I hire an expert and he insists in doing X, and I know X doesn't work.

The manager in Dijkstra's story was right. It doesn't make sense to sit down for a mundane problem, do it on paper, then do it on a machine, and then find out you were wrong to start with.

Now there's nothing wrong with engineering a solution, but there's everything wrong with engineering a non-solution to a problem which didn't exist in the first place.

Wrong Problem

I actually agree with most what you say, that isn't it.

But compare a CS major, or PhD, with a physicist or engineer. The whole problem shouldn't have been about vocational training to start with.

If I take a PhD in chemistry which knows everything about coating, then I can build a company around him. If I take a PhD in physics who knows everything about nanoscale optics, then I can build a company around him.

Now I look at PhDs from fundamental CS. How many can I use to build a company around him/her?

The problem is not that CS doesn't produce programmers, the problem is that CS doesn't produce enough new ideas which industry can use. If CS PhDs were such that you could use them to start companies, industry would stop complaining immediately.

Is PLT really fundamental (for business)?

If I take a PhD in chemistry which knows everything about coating, then I can build a company around him.

Do you mean a manufacturing company (selling coated goods), or a service company (using coated tubes to provide customers with clean water), or a designing company (selling designs/licenses for coated goods)?

Now I look at PhDs from fundamental CS. How many can I use to build a company around him/her?

You forgot the "knows everything about" bit.

You can build a service company (web search), or a designing company (selling codecs), or even a manufacturing company - provided the PhD "knows everything about" your core business technology.

What you probably meant is that the ratio of PhDs "who know everything about" something in CS is lower than in chemistry and physics? And then we may assume that the industry complains about this? Well, I think they have all the rights to complain - spending ~10 years studying in universities without specializing in anything is really inefficient usage of time. At the same time I believe that PhDs (and MSCS and BSCS) benefit from fundamental knowledge - but I still have to see a proof that PLT is as important for a student not specializing in it as information theory or algorithmic complexity or even cryptography are. At the end of the day, the core CS PhD specialist of a company does not bring more money by quickly switching from Ruby to Perl - he does that by quickly analyzing and matching good ideas together.

To summarize - I believe a lot of long-term achievements will be done via PLT research, and there are some niches (PL vendors?), but for the most of companies based on software, PLT is not part of the core performance.

Yeah, some underpinning

Yes, the ratio was implied, and the ratio was about people who are specialized in a field a company needs. I don't know who thinks about what in industry, I just know of a few opinions, which is anecdotal evidence:

1. After my major's I went to a big IT firm to be told: Any CS majors here? Don't bother, we don't want you.

2. I have been working in small companies a bit. Usual manager view on good coding practice was then: I got some weirdo who's code look like a painting. (Not me btw, I was a consultant at that time.)

3. I have been to some bigger companies. Their view on coding mostly is: We just do C, or Java/C#, after have been burned too often for our own good with academic experiments.

That list of evidence goes on btw since I have also been a teacher at a University for Professional Education. Gave me roughly 100x the exposure to industry, and somewhat to academia, what I had at an Ivory Tower University. The view I got, small companies don't know jack unless run by an academic in CS, sometimes EE, and then it's mostly a very narrow view, big companies know everything.

But no, the point is that a CS PhD shouldn't be a Ruby or Perl enthusiast --I would associate that kind of thinking with an undergraduate, which should be a generalist in my view-- but good in something a company needs for its core business: say, man-machine interfaces, graph theory, control theory, embedded systems, cryptography. Or they should use a PhD for his general skills, what is what they mostly do now.

The point is that academia, as it stood, just didn't deliver enough of the former, and the latter are often just wasted by having spend too much time in academia to be good for them. A good CS major who spend his time getting additional CE skills is often way more valuable than a CS PhD which just needs to be reeducated for several years, and may turn out to be just as good as an average CS major.

Of course, my views are somewhat dated by now, and I think universities are professionalizing since the amount of social/IT information they get is now way more than ten years ago. But, yeah, my guess is the ratio is still pretty much off.

As far as PLT goes, why not. If my business is gaming, and I need a good language for that, why not hire a PLT PhD/or someone who majored in that field? (Guess like Tim Sweeney or Wouter van Oortmerssen)

[ The list for PLT isn't that short, btw. Just think of: data engineering, DSLs for embedded systems, document retrieval, genome querying, ... ]

Is PLT really fundamental

Is PLT really fundamental (for business)?
...To summarize - I believe a lot of long-term achievements will be done via PLT research, and there are some niches (PL vendors?), but for the most of companies based on software, PLT is not part of the core performance.

An interesting question. Program analysis is now an industry, whether for basic software quality or, I suspect more lucrative and booming, the security field. Most of the products I've seen are actually fairly stupid -- Coverity is an interesting example where we know the team behind it can do a lot more, but are sticking to the very lightweight. Industry has shown it is hungry for low-effort (highly automated) solutions.

At least at the big companies I've worked at (Macromedia, Adobe, Microsoft), languages and DSLs are common, including many introduced in-house. Intel and others are snapping up multicore framework/language startups (though these are rare). So not much concern for PL designers should they want to tackle PL problems people with money are facing. Unfortunately the model here seems to be more of consultant / salaried employee of a megacorp than an independent player, but so goes.

Type theorists etc. typically walk the line between automated analysis and language design: I don't see as compelling a story there, but I am likely swimming in the wrong waters.

Company out of PhDs

What company would you build around a fresh PhD in (fundamental) mathematics wich knows lots of things about algebraic topology ?

There are manifold

There are manifold possibilities

Was that a reply to me?

If so, well, it's probably to abstract an idea to be of a lot of practical use.

The whole point I made is that if you play EWD's game to the extreme, and don't listen to others, and universities would insist in churning out say fundamentalist type-proof theory/category theorists instead of embedded systems experts/man-machine experts/what-do-I-know 'visualizing data' experts i.e. direct applicable knowledge (say at a ratio 10:1), instead of the reverse, they have nothing to blame but themselves that they marginalized their own role in IT.

Not unique

There is something odd about the computer industry's gripes with academia.

To be fair to the computer industry, I see pretty much the same kind of gripes coming from lot of employers in the various engineering disciplines. They inevitably want graduates who are both well-grounded in all of the fundamentals, and can also drop straight into a productive role with no additional training.

Apprenticeship

The system of apprenticeship worked really well for craftsmen of old.
Many see programming as a craft - then why does not programming apprenticeship work in the modern US education system?
It certainly works in some Eastern Europe countries, perhaps because of laxer law enforcement (I personally worked and studied in parallel for 7 years).

What Dijkstra Wanted

Dijkstra wanted what Steve Yegge jokingly referred to as "Wizard School". Instead of something like Full Sail or DigiPen where people go to get an inside track on the game industry straight out of high school by taking dedicated courses on game design, people would go to a school where they just train you to be a generally great system designer. This place used to exist, and it was called MIT, but although a place exists by the same name today, it has changed (supposedly because not enough MIT C.S. graduates haven't become fabulously wealthy donors that give back to the program, and a lot of MIT CS graduates had the skills to meet needs of the future, but not the needs of today).

Technically speaking, even MIT was not quite up to par with Dijkstra's requirements. I am curious to what extent Dijkstra influenced the way University of Texas-Austin runs its CS program. When I was a senior in college and comparing my little college's methodology for curriculum design and assessment vs. other colleges, I was extremely impressed by how all Texas faculty are forced to face the same instruction quality metric (standardized exams).

Even to this day, MIT has not really published any public stats on how well their transition to Python has gone.

Dijkstra assumed...

Programming is applied mathematics, therefor, programmers need to be mathematicians of some sort. What he, in my opinion, failed to see is that there are a lot more qualities beside math which come into play when writing a program, and that, in some sense, most programming is of a mundane nature where other qualities of the programmer start to play a bigger role than being able to do math.

Too trivialize it, in a lot of cases, you don't need proofs, but unit tests and documentation are just good enough.

But he came from an era where a few mathematicians and physicists were looking in wonder what to do with these strange constructs called 'programs' which should be given to nice ladies in the form of punch cards. Not from an era where 11 year olds patch up their own websites with Javascript and just get it right sometimes by a series of approximations.

The world changed, he didn't.

What he, in my opinion,

What he, in my opinion, failed to see is that there are a lot more qualities beside math which come into play when writing a program, and that, in some sense, most programming is of a mundane nature where other qualities of the programmer start to play a bigger role than being able to do math.

Agreed, but I would also posit that the more expressive your language, and the better designed your abstractions, the less "mundane" programming you need. Which means, hopefully, that as programming languages progress, Dijkstra will end up being right.

what is the main point of

what is the main point of EWD 1165?

The way I read it: on one hand, industry does not follow the recommendations of academia; on the other hand, industry blames academia for the problems it encounters not following the recommendations of academia.

I am a bit surprised that you support anything so vaguely defined.

I support lots of vaguely defined things. I just don't care to argue much about them since they seldom reach productive conclusions.

Related

March 9th, 2010 blog article by Object Contraint Language co-designer, John Daniels: Why OCL Shouldn't Die. He argues teaching OCL helps students understand what UML diagrams actually mean.

This is in response to Jason Gorman arguing OCL is a dead language. Universities: stop wasting time teaching it. Some of you might say, well, UML sucks, so teaching less of it (e.g. OCL) is great! But read Gormon's closing argument, where he advocates for teaching practical tools and not principles of programming:

If you don;t believe me, search on the big IT job sites for "OCL" or "object constraint language". Nada. Nil points, as they say. There's no demand for it at all. Not a sausage. Time spent learning OCL today is time wasted. That time could be spent practicing writing better unit tests, or learning to automate acceptance tests with FitNesse, Watir or Cucumber. employers are falling over each other for those kinds of skills.

Perhaps OCL is irrelevant. But is the idea of using formulas and rules in conceptual modeling irrelevant? Tools like Cucumber mentioned by Jason Gorman are interesting sociolinguistic phenomena. There are a ton of tools just like it, and they all basically validate run-time configurations for software, but they're very procedural in nature and require a lot of boilerplate, and Cucumber itself was designed to overcome syntactic boilerplate in other languages[1]. The "big" difference from OCL, and the reason for the proliferation and cross-polineation of these syntactic sugar testing libraries, is that Cucumber is human readable, human writeable. The acronym average programmers use to describe this syntactic sugar is BDD - Behavior-Driven Development. It's interesting marketing, and Alloy creator Daniel Jackson should take note. After all, Daniel Jackson co-wrote the definitive academic rebuke of OCL: Some Shortcomings of OCL, the Object Constraint Language of UML.

Are languages that are used for software specification part of "principles of programming languages" undergrads should learn about? Well, papers about them do appear at POPL...

[1] "Cucumber is Aslak Hellesøy’s rewrite of RSpec’s “Story runner”, which was originally written by Dan North. (Which again was a rewrite of his first implementation - “RBehave”). Early versions of “Story runner” required that stories be written in Ruby. Shortly after, David Chelimsky added plain text support with contributions from half a dozen other people." from http://cukes.info/

A minor success

At UCL we have been facing the problem of how to teach programming languages for many years. For us it was a classical Catch-22 in the engineering school: if we teach programming as an industrial skill with only industrial tools, the other engineering departments do not consider us as equals (we are mere technicians). On the other hand, if we teach it in a more scientific manner, they complain that we should be teaching more industrial tools (and especially the ones they need in their courses)! We have managed to find a modus vivendi. It started as a piece of luck for me. Some years ago, the second-year programming course was vacant. Nobody else wanted to teach it because of the heavy load (300 students, 13 assistants and student monitors). I volunteered, under the condition that I do it my way. The department accepted reluctantly. I have taught this course for six years now, and the students give it very high marks (it's one of the most successful of all second-year courses), despite (or because of?) the "weirdness" of the course and the strange programming language it uses (Oz). I have written up the experience here (a chapter to appear in the book Horizons in Computer Science Research).

Mark Guzdial comments

In this blog post, Mark Guzdial argues that the claims made in the document lack empirical validation.

Scanned, went to the Trash Can

I didn't find it a particularly enlightening document. Now, without doubt the writers are good professors, but I also found the anecdotal evidence troublesome. By the same arguments, I can start teaching Graph Theory, Category Theory, or DNA databases. (One out of three good.)

They should have posited the question why PL theory matters, and that's, in my personal book, easy.

1. We study Computer Science, and despite EWD's well-known comment, we do study Computer ('s design/implementation) too.
2. Central is that a Computer is a calculating machine. Central to that is that calculation is symbolic reasoning.
3. In order to communicate with the machine, we need PLs, which need to be programmed. Almost everybody in the field does that.
4. Given the zoo of languages, and language interpreters/compilers -all written in different manners,- out there we can only conclude there either is no best manner of doing anything, or we haven't found it yet, which makes it:
5. A central topic in CS research.

Scholarly knowledge when to use Prolog, Oz, or some pattern derived from FP is beside the point.

Historical context

I think there is an interesting historical context here. When I grew up with programming languages in the late '60s and '70s, we were interested in designing reasonably formal languages with crisp syntax and semantics. When I worked with CLU and later on with Common Lisp, we spent lots of time trying to make sure that the semantics was consistent, complete, and clear. Indeed, the languages were big, but they were well formalized and well documented.

Now we have Perl. It's a step in the wrong direction as far as I'm concerned, but maybe I'm just an old fart. Does the slap-dash syntax of Perl really inhibit software development? Heck, I bet 75% of Perl programmers don't know the term "sigil." Does the somewhat funky semantics really matter? Natural languages certainly aren't well formalized, but everyone speaks them just fine.

I think we'd do better if people understood more of these formal concepts, but it's an empirical question.

~~ Paul

Various replies

I'm going to reply in this new thread to a couple comments (mostly marco's) just because the other ones were getting too narrow on the screen for my taste.

[marco:] The manager in Dijkstra's story was right. It doesn't make sense to sit down for a mundane problem, do it on paper, then do it on a machine, and then find out you were wrong to start with.

If I were given a complex problem, I would organize my thoughts on paper before I started coding. It doesn't make sense to do in the machine and then find out you were wrong to start with. ;)

Now I look at PhDs from fundamental CS. How many can I use to build a company around him/her?

I can't speak to the usefulness of other areas of CS (although, frankly, a lot of the stuff I saw coming out of our algorithms dept. at UU looked very applicable). What I am pretty sure of is that all the people in my group, the Software Technology Group, were all exceptionally productive programmers -- and, by the way, they are all far more pragmatic than I am, so don't judge them against me.

I used to make the claim that, "Anyone in this group could make a million dollars in a start-up in a year or two if they put their mind to it." I still sort of believe that and the reason is not just that PLT experts are good programmers; it's because they can pick up anything they need to to get the job done, and they don't whine about it. I saw this over and over again.

If someone wanted to write a paper about how to use so-and-so language feature to do graphics programming, they did a survey on 3-4 popular frameworks, picked one, became an expert for a month or two, published their paper and then forgot about it. If they wanted to write a paper about compression, they learnt that. If they wanted to do something in cryptography, they went and learned that. I did it too. I needed to write about XML, and for a couple months I was an expert on data binding, XML schemas and their formal semantics, and various other crap I found completely pointless but knowledge of which is extremely valuable in industry.

I find this sort of phenomenon to be commonplace in PLT. Yes, there are some people who only do abstract work and might not be fantastic programmers. Well, that's fine with me; I still find what they write to be useful to me. But the majority of researchers are very pragmatic, very "get things done" sort of people who are exactly what industry likes. I could name some of these people, but I won't because they might be reading and I know a couple of them. But for example people who work at places like Galois or on projects like GHC.

I hear a story on the Internet from programmers all the time, about pointy-headed PhDs who somehow get thrust into industry and turn out to be completely useless in practice. That just runs completely counter to my experience. I don't know; maybe it's true more often of people in other CS fields -- I have limited interaction with people in algorithms or computer vision or HCI -- but I know it's not true of PLT. If anything, PLT produces (or perhaps accepts) people who I think would be the most valuable workers in industry.

[marco:] At the same time I believe that PhDs (and MSCS and BSCS) benefit from fundamental knowledge - but I still have to see a proof that PLT is as important for a student not specializing in it as information theory or algorithmic complexity or even cryptography are. At the end of the day, the core CS PhD specialist of a company does not bring more money by quickly switching from Ruby to Perl - he does that by quickly analyzing and matching good ideas together.

Yes, being able to switch easily from Ruby to Perl is not a very valuable skill; the ability to do that is rather a side-effect of other skills.

And I even agree that PLT itself is not as valuable (in industry) as those other things you mention, not directly. (At this point, I could add, "And why is industry the final arbiter of what is valuable and what is not? Industry's notion of 'value' is only money, and the profit you can extract from an idea in the short term is inevitably linked to fashion. How about other notions of 'valuable'? Whose ideas were more valuable, Watt's or Leibniz's? Ford's or Frege's? My point is: all of them were valuable.")

But what is valuable is that PLT gives you the willingness and ability to view programs as mathematical, or at least formally accessible, objects and thus enables you to integrate and apply formal ideas -- like cryptography, or algorithm complexity, or specific algorithms like for computer vision or robotics -- from other fields much more readily.

(For most programmers, I gather, this is a huge hump. The other day I read someone who, on the one hand, claimed to have a good grasp of concurrency while on the other complained about Haskell 98's formal specification of the case-expression sugar being "academic shitheaddery". How can you claim to understand something so complex as the first when you reject a trivial example of formalism such as the second just on the basis that formal = bullshit? No one with this attitude can be relied on to learn anything nontrivial outside of their comfort zone.)

I intended to write a bit more, but I will leave that for the next round, if any.

Subjective theory of value, time preference, and sound money

And why is industry the final arbiter of what is valuable and what is not?

You may call me naive, by I believe that consumers are the final arbiter.

Industry's notion of 'value' is only money, and the profit you can extract from an idea in the short term is inevitably linked to fashion.

Some economic theories demonstrate that time preferences of consumers drive the selection of businesses. If businesses focus mostly on short term, it means consumers wanted that.
The same theories demonstrate that when money is manipulated by governments (as all of the money is, for about a century now), the link between customer's time preferences and the most efficient strategy for businesses breaks - if the state encourages spending, short term perspective wins. Who is to blame? Definitely not businesses.

How about other notions of 'valuable'? Whose ideas were more valuable, Watt's or Leibniz's? Ford's or Frege's? My point is: all of them were valuable.

What is more valuable, a loaf of a bread, or a sack of grain? A fish or a fishing pole? It is not objective, and depends on the time preferences of the person making the valuation. The same goes with applied vs. fundamental research - some people value one over the other.

Having said that, I agree that PLT is valuable (at least to some people, including me). But if some employees and employers decide they do not need PLT, why force it onto them? Let the people choose what kind of education they want for their money.

Yeah, I think this discussion died

Can you please update the 2nd quote? That wasn't my remark.

Who really doubts this? What about practical graduation reqs?

Undergrad readings in lambda calculus are fine--- as are functional discussions regarding the von Neumann bottle-neck, &ect, at the undergrad level. But lets face it folks, most "Lambda the Ultimate" discussions are graduate level intellectual pursuits, and this includes many aspects of PLT.

To make the point simply, we need to graduate these kids at some practical level and hopefully within a four year period! There are going to be trade-offs, and unfortunately the trade-off problem is only going to get worse not better.

The authors counter their own points--- most CS grads are not going to design a major general purpose programming language in their careers. But the other edge of the same blade is also true--- most CS grads are going to implement "designed" pseudo code within a carefully controlled venue (design context) and with limited freedom for philosophical decisions regarding PLT.

At the undergrad level it is best to focus on the basics realizing that software engineers with a CS degree are not necessarily (and probably not) computer scientists who "need" PLT to get their careers off the ground in the field today. Solid practical tools are more beneficial commercially and more marketable industry wide.

To put a finer point on this in my own experience at IBM; I completed a successful 25 year career in CS as a Staff Software Engineer. Many of our software engineers worked successfully for many years in the field *without* a CS degree at all! And none of them needed graduate level PLT to do their jobs. Certainly there were those who did--- and they had a Ph.D. to back it up.

I am not disputing the benefit of knowledge. I just do not buy the idea that undergrads need to be immersed in graduate level work too early without getting their feet wet in the real world first--- just an opinion.

You're addressing the wrong crowd here...

Que? I doubt you'll find teachers here. With the sole exception, of, well, erm, me. This is a place of pedantic academic researchers and wanna-be's.

Because of market pull, student number maximization and the change in vocational skills for Bachelors, I doubt that there is still place for academics in vocational training. In the Netherlands, we switched to task oriented learning where the trainee is mostly responsible for his/her own progress. Undergraduate teaching belongs to the industrially trained and pedagogists now.

For Master degrees, this crowd is also not your crowd, because that training is both easy and easily done by the less ambitious.

No place for academics

I doubt that there is still place for academics in vocational training

There are a number of private and commercially oriented universities with excellent faculty who are very active in both research and teaching. E.g., De Paul is strong in LtU-friendly research, and is active in vocational training.

I agree that there is a problem, but overgeneralisations don't help.

I guess you're right

Regarding the overgeneralization, or even the academics: As it stands now, because IT is, or has become, a very wide business with ranging careers between content writers, flash animators to DSL implementors, vocational training increasingly belongs to those who teach well, but teach because of their love of teaching, not necessarily their passion with IT or computers. The job skills required just changed, still academics, but different ones.

radical curriculums

Two comments in a broad spectrum reply to many of the interesting comments above (but no one in particular):

First: I was in college up until about 1986 and worked for a few years beyond that in a research group on my campus. I've watched various departments in the years since (mainly trolling for interesting research, job opportunities, and such). There has been a very distinct change over those 20-something years. Somewhere, in that period, the main measure of success in academia seems to have shifted to a researchers ability to generate spin-off start-ups. To my eyes, this shift changed the quality and quantity of research initiatives dramatically and for the worse. (I've seen a similar shift in some of the harder sciences, too.) To my mind, the distinction people are making between academia and industry is, these days, a false distinction.

Second: I still retain my utopian fantasy of the "right" CS curriculum and the right relation to industry. Industry, I think, mis-serves the public by building ever more bloated and sprawling, buggy and otherwise problematic software stacks that grow until they collapse under their own weight, often with severe negative consequences. Academia currently piles on to that same effort. What I'd rather see - just as kind of a customary practice - is that about every 10 years we throw away most of our core, commonly used software and replace it with new stacks built mainly by students during those same 10 years.

In that utopian curriculum, of course PLT would be a critical component - both theory and practice. More importantly, our core stacks would be continually re-though, re-built, and kept at a scale of human comprehension and maintainability.

(Obviously I see no practical way to actually bring about that utopian vision - but perhaps it could be reached in small steps.)

Don't think it is that bad, now is it?

I, by now, use the next analogies:

1. Bachelor, code monkey/industrially trained (Programming, SE, and design skills)
2. Master, scientific programmer and wanna-be scientist (Formal training in logic, graph theory, discrete math, PLT and everything you want to toss in after that like signal processing, type theory, category theory, etc.)
3. PhD, a doctor in philosophy (can be anywhere between new formalization of number theory in Coq and soft-sciences overlap with UI design)

Looks like it's business as usual in most countries. What do you want to improve?

times changed?

2. Master, scientific programmer and wanna-be scientist (Formal training in logic, graph theory, discrete math, PLT and everything you want to toss in after that like signal processing, type theory, category theory, etc.)

What?!? Really? It's *that* bad now? In my day, except for type and category theory, those were all curriculum items met before junior year undergraduate. Fancier type theory and category theory were not inaccessible to the ambitious student.

Looks like it's business as usual in most countries. What do you want to improve?

In my utopia, undergrads should graduate with significant chunks of production quality, theory-informed serious practical work under the belts. I'd (with my magic wand) structure the theory curriculum around serious practical projects. The average undergrad from a decent school should be graduating with better skills and sense than a lot of today's PhD's.

Also: get off my lawn, you damn kids. And: "Awwww... youth is wasted on all the wrong people."

Uh.. Well

What?!? Really? It's *that* bad now?

Yes.

No.

No.

Depends

grin