Functional Programming Principles in Scala

This is a course I’ve been meaning to take for a while now but the timing was just never right for me before now. The reason obviously is that this course is taught by Martin Odersky of the École Polytechnique Fédérale de Lausanne. After all, how often can you attend a course for a programming language taught by the designer of the language?

Of course, as per its name, Functional Programming Principles in Scala, this course isn’t supposed to be a Scala tutorial. It’s supposed to an introduction to functional programming, using Scala as essentially the medium of instruction. I had no prior knowledge of Scala before this course but I have had experience in functional programming due to taking Dan Grossman’s Programming Languages class last year.

In practice, I’m not sure that this is quite the case. One poster on the official discussion forums claimed that the lectures sometimes feel like Odersky justifying his design decisions when making Scala. This isn’t completely true of course, since stuff like higher-order functions, currying, immutability, lazy evaluation etc. apply generally to all functional programming languages and not just Scala. But it does feel true in parts. Many lectures explicitly talk about why Scala specifically does things a certain way and not some other way and one whole week of the 7 week course is completely devoted to the object oriented features of the language.

But you know what, I am completely fine with that. After completing this course, I have drunk the Kool-Aid and am totally on board with how awesome Scala is. The conciseness of the language compared to Java is pure beauty. I love the unified object hierarchy and how everything is an object, but at the same time you have the full expressive power of functional programming idioms at your disposal. I concede that part of this is because I know Java but have never touched C# which has many of these new features.

The content of the video lectures is excellent and I really enjoyed how Odersky poses topics as challenges for students to think about first before walking us through the solutions. One minor complaint I have is that the videos are usually composed of two separate sequences. One, in which we see Odersky introducing the topic, and the rest of the video, in which we see slides and mostly video captures of him working in the Eclipse IDE. The sound quality for the introductory sequences is usually quite poor and it would make for a better presentation if Odersky had been able to show us a talking head box occasionally while working with the slides and typing the code.

I also greatly enjoyed the programming assignments. They mostly require to think a lot rather than write a lot of code. The assignments start out being rather easy but nicely ramps up in difficulty. The instructions include plenty of detailed step-by-step guides. For me personally, the hardest problem was figuring out the combinatorics needed for the Anagrams assignment in week 5.

Unfortunately, aside from the usual links to exterior resources which all courses provide, the video lectures and programming assignments comprise all of the content the course has to offer. Shockingly, while you can download the slides Odersky used in the lectures, there is no option to download the complete code of the examples used. You need to type them in manually, which isn’t always easy because of how the video moves around and sometimes shows the wrong things.

As Odersky himself indicates in the lectures, EPFL students are tested on the theoretical knowledge in exams and presumably quizzes as well. Neither of these are available here and seriously detracts from the pedagogical value of a lot of the material. It can seem ungrateful to gripe about this when I’m paying nothing for the course, but it is a valid black mark, especially since many other computer science courses on Coursera do offer them.

Finally, I believe that this is the second or third offering of the course and Odersky has not been personally supervising the session I studied. Basically we’re being doled out the same course content that was developed for the first offering of the course. This is fine, except that with Odersky not being present, there is a distinct lack of direction. The course staff and community TAs try to fill in the gaps but can’t provide the needed leadership.

This results in a number of annoying issues. The front page of the course site is never updated apparently because no one is in charge of it and consequently there are no e-mail notifications of new content being released from week to week. Solutions for the assignments are readily available on GitHub, partly because no one makes even a token effort to police them. Of course, I realize that it’s impossible to really stop this but it can at least be minimized if the instructor exhorts students to refrain from posting the code publicly and TAs browse the usual code repository sites and ask the owners to take code down, as has been done in some of the other courses I’ve taken and have served as a TA for. But you really need someone to speak authoritatively for the course to make these things happen.

None of these really detracts from the quality of the core content so this is still an amazing course to take. There is plenty to learn and Scala is a great language to pick up. But I still feel that these flaws do prevent this from being considered a top tier course.

Leave a Reply

Your email address will not be published. Required fields are marked *