Lecture series on advanced (functional) programming concepts


Added 10 Aug 2010:

Here is the link to the first lecture's video: "The Expression Problem".


If you are a programming nerd or something of a similar species, you may know of C9 Lectures at http://channel9.msdn.com/tags/C9+Lectures. Several of the lectures are given by Erik Meijer who has turned many chapters of Graham Hutton's book "Programming in Haskell" into videos. In my recent, recorded lecture on "Programming Paradigms and Formal Semantics", I also incorporated Graham's text, but you should really watch Erik's lectures, if you haven't---they are more fun. I am inspired by his ability to present relatively simple content in such a crisp, insightful, and enjoyable manner.

In the aforementioned lecture, I covered all kinds of "crazy stuff" though, and in the end, I had to deliver body bags to my Bachelor students---in the form of a radically simple examination. Thanks a lot btw to @grammarware for helping with this matter. Thanks a lot to my students who coped with this deadly mix of process algebra, semantics, Haskell, constraints, type systems, and what have you. Some of the topics from the lecture may be of interest though to advanced programming nerds (and similar species), and this is where this post fits in.

Based on an ECOOP 2010 tutorial proposal, which was never implemented, Charles Torre (@C9, this is how he looks like) and Erik Meijer suggested in January 2010 that I could do a few C9 Lectures on advanced (functional) programming concepts. So the idea would be to dive deeper into subjects that were introduced in Graham's chapters, and to generally include some advanced subjects, also possibly related to the tension between mainstream programming and Haskell programming. Well, this sounded cool!

It took me some time to come up with a concept that is hopefully useful for both---the community, say developers or CS students who want to dive deeper into programming, and me who wants to aggregate and improve material that helps with my general occupation in academic and industrial research and education.

Perhaps I have figured out an option.

What this bunch of lectures will not be like:

  • A detailed Haskell programming tutorial.
  • An otherwise technology-centric discussion.
  • A totally Haskell-centric lecture series.
  • A never-ending lesson in Greek (Math).
  • An otherwise academic discussion.
  • A pure functional programming story.
  • An OO bashing series.

Here is what I will try to cover:

  • Advanced topics in functional/OO programming.
  • Properties of programs such as modularity or purity.
  • Composition of programs from function combinators.
  • Multi-paradigm programming (functions, objects, predicates).
  • Software Language Engineering (incl. language processing).

The first few lectures
  • Let's begin the series with the Expression Problem because it connects OOP and FP ingeniously; it helps understanding pattern matching, dispatch, function application, encapsulation in a combined fashion that complements established means of introducing those subjects in isolation. In this lecture, I don't present solutions to the problem---because they are too hard and too idiosyncratic. I rather present non-solutions because they are insightful and make you ask for more (I hope). See the slide deck here.
  • Let's continue with a lecture on Haskell's type classes. Thereby, we cover one of Haskell's supernatural powers. Again, I am not describing type classes in the manner of a language manual; I rather demonstrate a few of the mechanisms that are supported by type classes; I will also discuss a bit the underlying principles. For instance, type classes allow us to solve the expression problem like a charm, and to also address several sophistications thereof. It will take a while until C# and Java are on par with type classes. See the slide deck here.
  • I will discuss language interpretation because it is such a fundamental subject in computer science and programming that also allows us to deeply understand some properties and styles of functional programming. Unfortunately, language interpretation is often obfuscated by academic style of presentation---as if it was something purely mathematical. So this will be the challenge for me to find many advanced Java and .NET programmer who say in the end that language interpretation is a "must-know".

More keywords:
  • Effects (monads)
  • Continuations
  • Algebraic structures (e.g., monoids)
  • Parallelism (e.g., MapReduce)
  • Genericity (e.g., "Scrap your boilerplate")

For the rest of the lectures, please see C9 or follow-up posts on my blog. I have started to upload decks and code for lectures to the open-source project https://sourceforge.net/projects/developers/. You can browse the SVN repository and download files here. If everything goes as planned, then the first video will go live at C9 somewhere next week.

I am really excited to work on a lecture series like this because I feel that it allows me to focus on non-trivial, conceptual stuff. This is a welcome break from the typical Bachelor-level lecture where I am supposed to go slowly so that "no student is left behind". In the present lecture series, I enjoy the privilege of diving deep into concepts, and I assume that folks will figure out many details for themselves. I inject riddles into the lectures here and there; some of them are incredibly hard, but you will figure out I hope, and you will gain understanding no matter what---even if the riddles are too hard (perhaps infeasible) in the end. Enjoy, and please let me know how I can improve the concept of the lecture series within the implicit and explicit bounds that I described above.



  1. This sounds very interesting; I'm very much looking forward to it.

  2. Sound interesting, do you know the extension mechanism in smalltalk. It look like partial classes and you can have separate compilation. It is surely not static type safe as the language is dynamically typed. Anyway you got the safety properties at run time.

  3. Yes, thanks mathk. Smalltalk is cool for this sort of stuff and way more than that. With Robert Hirschfeld, some time ago, we have stretched the extensibility idea with Smalltalk to obtain something would we called "Reflective Design" back then.

    But yes, for the purpose of the narrow definition of the Expression Problem, I disallow myself to use a language setup without static typing. Sorry :-)

  4. The Typeclass video was very well put together. Seems like promising series!

    Btw. here's an interesting related technical report, Type Classes as Objects and Implicits: http://lambda-the-ultimate.org/node/4039

  5. Hi Henrik, thanks for the pointer! And sorry for my lateness in finding those comments. Ralf