HN Academy

The best online courses of Hacker News.

Hacker News Comments on
Functional Programming Principles in Scala

Coursera · École Polytechnique Fédérale de Lausanne · 5 HN points · 11 HN comments

HN Academy has aggregated all Hacker News stories and comments that mention Coursera's "Functional Programming Principles in Scala" from École Polytechnique Fédérale de Lausanne.
Course Description

Functional programming is becoming increasingly widespread in industry. This trend is driven by the adoption of Scala as the main programming language for many applications. Scala fuses functional and object-oriented programming in a practical package. It interoperates seamlessly with both Java and Javascript. Scala is the implementation language of many important frameworks, including Apache Spark, Kafka, and Akka. It provides the core infrastructure for sites such as Twitter, Netflix, Zalando, and also Coursera.

In this course, you will discover the elements of the functional programming style and learn how to apply them usefully in your daily programming tasks, such as modeling business domains or implementing business logic. You will also develop a solid foundation for reasoning about functional programs, by touching upon proofs of invariants and the tracing of execution symbolically.

The course is hands-on; most units introduce short programs that serve as illustrations of important concepts and invite you to play with them, modifying and improving them. The course is complemented by a series of programming projects as homework assignments.

Recommended background: You should have at least one year of programming experience. Proficiency with Java or C# is ideal, but experience with other languages such as C/C++, Python, Javascript, or Ruby is also sufficient. You should have some familiarity using the command line.

HN Academy Rankings
Provider Info
This course is offered by École Polytechnique Fédérale de Lausanne on the Coursera 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.
See also: all Reddit discussions that mention this course at reddsera.com.

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this url.
The author's struggles with Haskell resonate. I suspect it's just a very hard language to learn. I've given up attempting to learn it at least twice now.

I took Martin Odersky's Scala MOOC sometime around 2012-2014 and it was easy. It just made sense and the IDE experience was nice. I would recommend it to anyone who uses C# or Java and wants to learn FP. Although after 8 years I don't know if it's still as good, or if something better has come along. Either way, the course is still available: https://www.coursera.org/learn/scala-functional-programming

Next I worked through SICP and that was the best CS book I've read, although significantly more difficult than the Scala course.

odersky
Note that the course got revamped this year. It is now based on Scala 3 and new content was added. Some of the new topics are: enums, extension methods, and givens.
Jun 11, 2021 · 5 points, 0 comments · submitted by limp_quantity
If you haven’t done any functional programming I can recommend this course:

https://www.coursera.org/learn/progfun1

The techniques you learn there will transfer to javascript and make you a better web developer.

Functional Programming Principles in Scala https://www.coursera.org/learn/progfun1 on Coursera. It's taught by Martin Odersky, one of the language's creators. Very well organized, highly automated assignment testing (you submit via CLI). I went in wanting to learn Scala, but what I learned about FP has stayed with me for years. Even though I've moved on from Scala I'm a much better programmer for having taken that course.
Functional Programming Principles in Scala [1] taught by Martin Odersky, professor at EPFL and creator of the Scala language.

[1] - https://www.coursera.org/learn/progfun1

wongma
Would this course be appropriate for those with a lot of general programming (OOP) knowledge, but little to no FP experience?
dragonwriter
IMO, yes, very much.
acjohnson55
I'd go as far as to say that those folks would be the ideal audience.
necrobrit
Seconded! Odersky is a great lecturer (and very practical lecturer despite Scalas "academic" reputation) and the course was very well organized.

I did the course on the first or second run however, not sure if it has been kept up to date or if it is still well run.

Was disappointed with the follow up courses though, the lecturers didn't live up to Odersky.

andy_wrote
I'm in the middle of auditing the Scala track on Courersa.

The first course was great. I agree that Odersky is a very good lecturer, organized and easy to follow. I'd recommend it to anyone interested in Scala.

The second course was OK but not quite as good, it felt a little less systematic. It was mostly Odersky, but for part of the final week the course switches tracks to a different lecturer who clearly was preparing slides for a different lecture series, and I thought both the lectures weren't as clear and the stitch-in of the different material wasn't handled smoothly.

I've just started the third and while it's not Odersky, the lecturers have been good so far.

There is a course on Coursera thaught by the Scala creator: https://www.coursera.org/learn/progfun1
gingerbread-man
It's actually a series of 4 courses, 5 if you include the "capstone project." I've watched a few of the videos-- it's pretty decent, but intended for those who don't have much experience with functional programming. The first course I believe is modeled off the Structure and Interpretation of Computer Programs.

I think the answer to this question really depends on where you're coming from. An experienced Java developer will need to focus on different things than someone who has spent the last decade hacking Common Lisp or OCaml.

joncrocks
I would agree and disagree.

The first course is the one that's dedicated to Scala the language, whereas the rest are more focused on reactive/parallel programming that happens to be in Scala.

The first course is good, and acts as a good introduction if you've encountered functional programming before.

The canonical source for learning Scala from scratch (at least, when I was learning a couple of years ago) is the Coursera course by Martin Odersky, one of the language's founders. It appears that the course has grown somewhat, but you can still find part 1 here: https://www.coursera.org/learn/progfun1
blacksmythe

  >> Coursera course by Martin Odersky
Brilliant course.

Unfortunately, the next one in the series is not nearly as good.

dv35z
I took the course - unfortunately, and to be honest, it didn't have the approachability and "fun" of Zed's books. To me - it felt very dry, academic, and quickly became a chore to complete rather than a joy. I need the version aimed for "C- python programmer" / newbie rather than "eager CS student" or "experienced Java dev".
I have suggested Odersky's introductory MOOC [1] to many of my students and they all thought it was great. It's heavily inspired by SICP, so it should be easy, given your background.

[1] https://www.coursera.org/learn/progfun1

wpietri
Yes, I second the recommendation for the course. And I can happily recommend it for people who don't even plan to use Scala, but who just want to get a feel for functional vs OO approaches. Odersky sees them as complimentary, and in some sense Scala is his way of proving the point.
That's interesting. Just a few days ago with great regret I decided to drop the (free) Scala course on Coursera after almost finishing week #3 (of 5 I think). I'm actually already pretty familiar at least with the essentials of functional programming but would like to go even deeper.

However, I found the step too steep between the easy to understand lectures and the exercises, and the latter not as useful as they could be. It felt like I was suddenly dropped off and left to my own devices with no guidance. "Now implement this!" Uhm... what? Sure, that's easy, I've been implementing much more complicated things for decades. The problem is I have no idea how to approach it "the right way" as far as Scala is concerned, that's why I'm taking the course!

Looking at the forum - extremely sparsely populated even after over 4 months - showed that I could also expect no guidance from there. That meant that even when I finished a task I was unable to find out if what I had done was the right (functional) way. For one and most importantly, there is hardly anyone to respond, but also since the only exercises are the homework assignments you can't just post your code, that's an "honor code violation". There also is no "solution", i.e. you can't see how the course author(s) would have implemented it.

Another example, people in the forum complained about extreme differences in performance for very minor differences in the way you wrote something, and you had to find all of this out completely for yourself, again no guidance at all.

Another point is that I found the problems too academic. Sure, I can walk a list of head.tail or a tree of left.element.right tuples. But overall the problems were all from what I did a long time ago at university and it felt very, very far from what I deal with now - and I don't just do CRUD or other boring stuff and actually do have interesting algorithms to implement. The course feels like being made for university students - in a negative way.

Overall I found the course more frustration than it was worth. I could have solved the programming challenges easily enough in a way I already knew, but what's the point? I wanted to learn the new (Scala) way, but felt all alone in trying to do that.

The course was like a good violin player demonstrating a piece and then giving me some sheet music and shoving me out the door "come back when you can play that". It's hard to complain about "free", but if course forum participation is a guide, both total numbers as well as the steep drop-off after week 1 and 2, it isn't very successful.

The course: https://www.coursera.org/learn/progfun1

Note: Enrolling in the courses individually is possible for free, going through the "specialization" page at https://www.coursera.org/specializations/scala only shows the for-pay option.

the_af
I actually liked the progfun1 course, which I took a few years ago. It's one of the cleanest courses I've taken on Coursera. It's true that it's slightly "academic", but that's what many introductions to functional programming often feel like.

However, the follow-up courses, Reactive Programming (retired) and Functional Program Design, are a total let down. They are a rip-off, especially if you paid for them: a complete mess, no relation between lectures and assignments, no introduction of new concepts in relation to a greater context, the slides are not proof-read, constant mentions to non-existent slides and lectures, repeat material from previous courses (a side-effect of the courses being mash-ups of previous material), and example code that doesn't type-check or compile. It's not any single mistake, but the aggregation of them all, and the feeling that the authors just don't care enough. Thankfully I didn't pay for this.

In my opinion, the gold standard for Coursera is Dan Grossman's excellent Programming Languages, which I fully recommend.

yawaramin
Have to say, I loved Dan Grossman's work teaching SML. Quite a few of those lecture videos had lightbulb moments for me.
davnn
I share the exact same story. Progfun is a really smooth introdu tion to FP in my opinion, no crazy syntax and only the core concepts. For any deeper concepts and if you don't understand what FP really means you should check out a purely functional language.
Noseshine
Just to clarify my opinion on progfun: The lectures are good.

The coding tasks could have been okay - if there was any guidance. I don't even get to see any sample solutions. So even if I make it work, I don't know if that is a good way to do it, the "functional", the "Scala way". And the performance issue I mentioned, it was a major one, the difference between the code even being usable for more than a thousand elements in the list or getting a stack overflow, and the difference was extremely minor, in one case the order in which you called "union" on sets. All of that had to be found out by the students, and even after they found out nobody really had a good idea or explanation for why it was so.

Also, there only was one (small!) opportunity to actually practice what you just learned per week - and that came without any feedback apart from "works/doesn't". Since the course was about a particular programming style that really wasn't enough.

They are orthogonal. Program in Scala and do both.

http://www.scala-lang.org/

Free course(s):

"Functional Programming Principles in Scala" https://www.coursera.org/learn/progfun1

"Functional Program Design in Scala" https://www.coursera.org/learn/progfun2

(There are two more free courses in the "specialization" - only the certificates and the capstone project cost money - original announcement http://www.scala-lang.org/blog/2016/05/23/scala-moocs-specia...)

pekk
"Program in Scala" is just promotion, not an answer to the question. There are more than a few languages which advertise the possibility of using both OO and functional styles.
mafribe
That's correct, but in which other ones is the integration so smooth as in Scala?
ridiculous_fish
Swift, OCaml, F#, Common LISP?
airless_bar
No?
ridiculous_fish
I am not a Scala programmer. Can you please give some examples of how Scala integrates OO and FP better than other languages?
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
yahnd.com ~ 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.