HN Academy

The best online courses of Hacker News.

Hacker News Comments on
Introduction to Functional Programming

edX · Delft University of Technology · 55 HN points · 8 HN comments

HN Academy has aggregated all Hacker News stories and comments that mention edX's "Introduction to Functional Programming" from Delft University of Technology.
Course Description

The aim of this course is to teach the foundations of functional programming and how to apply them in the real world.

HN Academy Rankings
  • Ranked #30 all time · view
Provider Info
This course is offered by Delft University of Technology on the edX platform.
HN Academy may receive a referral commission when you make purchases on sites after clicking through links on this page. Most courses are available for free with the option to purchase a completion certificate.

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this url.
Is this the class?

If not, can you share a link? Thanks!

that is the class! I might take it again sometime.
Having worked with Ruby on Rails in the past and with Play2 and Scala currently, I think I can answer that.

For your regular web app, both frameworks are mostly the same, both are boring - Rails is more productive for very common tasks, but Play2 is safer because of the underlying language (well, if you pick Scala, otherwise Java just stays in your way). Things get more interesting in Play2 when scalability or latency starts to matter.

That's when you discover that Play2's architecture is entirely asynchronous and that Play2 supports asynchronous responses and web sockets natively. It does so by means of futures [1], actors [2] and iteratees [3] (also being migrated to reactive streams [4]).

Of course, the easy route with Play2 would be with Java, however I recommend that you pick up Scala. By doing so you're going to get exposed to concepts from functional programming in a language sitting on a platform that's very much practical for real world use. There's also this book on functional programming in Scala that's amongst the best books written on the subject [5]. Functional programming changes the way you think and it's all about sanity, functional code being easier to test, being easier to parallelize and being much less prone to accidental bugs.

But while you're at it also consider learning Haskell, probably the best functional programming language available, because even if you're not using it, it's currently the lingua franca for FP concepts, so when reading papers and blog articles on interesting design patterns related to FP, most of them are described in Haskell. It also spoils you with its incredible type system, so a language like Scala will become the minimum that you'll tolerate, working in Java, C#, Python or Go becoming unbearable ;-) A really good beginners course is this one from edX [6]. And then go learn Clojure, because it's a really practical LISP that is also oriented towards FP, except that FP in a LISP is really different from FP in static languages like Haskell or Scala.

And you know, the best thing about this path is that you're not going to learn just a framework, or yet another language, but you're going to learn about functional programming, which is a concept that transcends programming languages with its related mentality and design patterns and is useful no matter what you're doing and in what language.

But then going back to Scala and Play2, well that's useful right now too. And did you know that Scala compiles to Javascript too and it's awesome?








In all honesty, I'd recommend the use of Erlang alongside a framework like Chicago Boss, N2O or Nitrogen over Play if you want the actor model concurrency, default asynchronicity and WebSocket support. It simply supports these ideas in a way that Scala cannot compete with, alongside its concurrent error handling, the OTP framework, location transparent distributed nodes out of the box, binary pattern matching and so forth. Issues of typing aside (success typing is still impressive), it is a much cleaner and more FP-focused language than Scala's chimera paradigm.
The actor model for concurrency is rather poor depending on use-case. I prefer to mix and match approaches. I mean, modeling concurrent state machines, with bi-directional asynchronous communication that makes you easily lose sight of how data moves in your architecture, what could possibly go wrong?

And yes, it's a pretty good model for concurrency, however I consider it to be a compromise on the way to finding better approaches. And in the meantime, it just feels wrong to use a language that forces this mentality on you, unless you have specific use-cases for which this model fits perfectly that is.

And also, on the FP side - many people say that Scala is less FP than other languages, like Erlang. That's a rather odd assertion, because my experience has been the opposite. But that's for another discussion.

1) Functional Programming: What? Why? When? by Robert C. Martin @

2) Erik Meijer Introduction to FP @

3) Do you want to learn F# and Functional Programming? Well, you better start coding! @

I want to note that LYAH may not work for you if you have my kind of learning style. I need to solve concrete, realistic problems to creatively use the knowledge imparted on me. I can't just read stuff and understand. Real World Haskell [1], the course by Erik Meijer [2] and the courses referenced here [3] worked much better for me.




For newcomers I'd suggest this introductory course by Erik Meijer: . It's about FP, not strictly Haskell, but it really helped me starting with it and really stimulated my curiosity (and he really can explain hard concepts in a simple way imo). I started reading the book after I completed the course and helped giving an answer to a lot of questions I had during the course.
What's the percentage of edX courses that are actually CC licensed?

As a quick and unscientific experiment, I checked out the 12 courses listed on the homepage and none of them were CC licensed.

With Google I found a few CC licensed edX courses [0:2], but looks like they're the rare minority.




This is part of Erik Meijer's Functional Programming 101 Course.

At 8:43 he briefly goes into async/async/sync support in Dart:

Oct 15, 2014 · 1 points, 0 comments · submitted by joehillen
Oct 15, 2014 · 5 points, 0 comments · submitted by nuriaion
Oct 11, 2014 · 4 points, 0 comments · submitted by dons
Oct 08, 2014 · 5 points, 0 comments · submitted by AlexeyBrin
Jul 15, 2014 · 2 points, 0 comments · submitted by pavel
Jun 28, 2014 · 2 points, 0 comments · submitted by miguro
edX also has an upcoming online course about functional programming:
I liked especially the Cojure part. For functional programming there are a lot of good resources imo.
A session of Martin Odersky's Functional Programming in Scala is just wrapping up. I'd reccommend it as a good way to bring a more functional style to the JVM. The Edx course, being in Haskell probably is a better choice for a different audience.

This Clojure course is a clear third alternative because of Clojure's pseudo.dynamic typing versus the Scala and Haskell's strong static typing.

What's "pseudo" about Clojure's dynamic typing?
That has nothing to do with static or dynamic typing. -1/3 is a clojure.lang.Ratio. java.lang.Math/abs is an overloaded method that knows nothing about it. If you want that to work, wrap it in a float or use abs from clojure.math.numeric-tower.
The same sort of thing that's pseudo about pseudo random numbers...usually it is indistinguishable, sometimes in the case of Clojure one is reminded that it is probably wise to keep the underlying mechanics of Java's type system in mind if one wishes to maintain an accurate mental model. In particular, it is useful to keep in mind the way in which class and interface types structure their child types within a system of static typing.

This isn't a bad thing. Being built on Java provides tremendous utility. But the way in which Java makes lumps under the Clojure language layer which blankets it gives Clojure a different flavor than say Common Lisp...and note I said "different" not better or worse.

Anyway, that's the idea I was trying to capture with the term. I wasn't disparaging Clojure, just suggesting its relation to the JVM comes at the price against Haskell style greenfield implementation.

Jun 05, 2014 · 2 points, 0 comments · submitted by klrr
Jun 04, 2014 · 20 points, 1 comments · submitted by psibi
Wow, thanks for pointing to this. Erik Meijer is awesome, and full of insights.

Even if he was a bit disorganized in the Reactive Programming class on Coursera, he still was a treat to listen to. Would like to see what he does here.

Jun 04, 2014 · 3 points, 0 comments · submitted by yawz
HN Academy is an independent project and is not operated by Y Combinator, Coursera, edX, or any of the universities and other institutions providing courses.
~ yaj@
;laksdfhjdhksalkfj more things ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.