Classes on Functional Programming — CLUEHQ
Random Thoughts from a Computer Science Student…
Random header image... Refresh for more!

Classes on Functional Programming

I’ve been busy with finals this past week so the posting has been light. Now that I’m all done with the Fall semester I’d like to bring up a particular area of concern about the computer science classes at Harvard Extension: there are no classes that focus on functional programming.


I have taken a few really great classes at HES: CSCI E-124 (Intro to Algorithms) and CSCI E-177 (Intro to Cryptography). Both of these classes did a great job of giving the student a significant level of comfort with a complex subject area and are primarily courses that focus on theory. There are some other classes like this: CSCI E-207 is mainly about formal methods in computer science; essentially, theoretical ideas about the computability of certain classes of problems. It night not seem practical to study these topics which don’t focus on a particular area of technology or a programming language, but they end up being the best classes that you take in any CS program. They teach you how to think about problems and how to solve them with computers in very abstract ways. That kind of abstract thinking (when applied) can be the difference between a program that does something the hard way and the kind that does it the smart way. Programs that do things the hard way tend to be poor performers, so it’s worthwhile to learn how to work intelligently.

Which is why it’s mysterious that there aren’t any classes on how to program in Lisp. It may seem strange to suggest learning to program in such a language is a big deficiency in any CS program. Certainly, Lisp doesn’t command the same mindshare that languages like Java or C do. Why is Lisp important then?

To put things simply, Lisp is important because it forces you to embrace a model of programming that pays big dividends when solving complex problems. Lisp is one of a class of languages (Haskell being another) that enable you to treat programming operations as mathematical functions. Essentially, writing a functional program is similar to solving a math problem over a set of data. The result of intermediate computations is passed to other operations much the same way that parentheses group related mathematical operations. The programming part is where you get to decide what the result looks like as the output of a math operation. Code written in these languages tends to be short and clean and has the side benefit of being very high performance. A recent comparison benchmark showed that Haskell code can be faster and more compact than code written in other imperative languages (like C or Java).

This makes it very curious that there isn’t a class to teach this very powerful class of languages at Harvard Extension.

There IS a class called CS 152: Programming Languages at Harvard that appears to cover functional programming but this topic isn’t even breached at HES. Why? It can’t be because the topic is too difficult for the HES audience. Classes like CSCI E-177 are hardly for the faint of heart. My suspicion is that the course offerings reflect a bias towards “workforce education” that is only corrected in the ALM in IT program, where there is a mandate to teach the theory as well as the practical skills.

I think this is wrong. My undergraduate course in data structures and algorithms at another state school used Scheme as the primary instruction tool. At HES, it’s Java. If HES wants to focus on Java because it’s what the students demand, then that’s fine with me. I’d just like to see a bit more offerings of functional language theory when it comes to class suggestions. The best and most interesting work in the research schools always ends up finding a way into industry. If HES offered a course on Lisp or Haskell, then their students wold be ahead of the curve rather than trying to catch up later on in night school.

2 comments

1 Jason { 01.23.08 at 1:05 pm }

After reading this, Richard, I’m curious your thoughts on this discussion and it’s follow-up over on Slashdot.

The language debate may never settle down.

2 richard { 01.23.08 at 1:55 pm }

Those slashdot articles actually reference the same article I was talking about. Of course, they got to it first. :P

Essentially, there is a tug of war going on. Traditional CS programs were very much math oriented. There was a healthy dose of computing theory at the core of every decent CS program. The problem was that CS programs did a poor job of communicating why that core theory piece was important and students left the programs because those classes were difficult.

Now the schools are turning out CS grads who can’t reason properly about algorithm or data-structure efficiency and only know how to write simple programs that do simple things. The net result is a population of CS grads who don’t measure up to the challenges of modern CS problems.

Java isn’t the problem. It’s a symptom of a higher-ed effort to appeal to students’ desire to gain practical and marketable skills for employment. Unfortunately, this is doing everyone a disservice. CS programs should be able to provide both.

Leave a Comment