Marcin Świerczyński's blog

Functional Programming Principles in Scala Course

posted 27 Mar 2023 in CoursesScalaFunctional programming

A few days ago I finished Functional Programming Principles in Scala course by Martin Odersky and Coursera. I just wanted to share my thoughts on it, since it took quite a bit of my time during last seven weeks.

Goal

My goal was to get a taste of functional programming which I had a very little contact with before. Also, I wanted to polish my Scala skills, because I’m still learning it. Was the plan accomplished? Well, definitely! But it wasn’t a piece of cake!

Challenges

It’s quite challenging to change your mindset and start thinking in a functional way. But when you get the point, it’s unbelievably rewarding!

Also, the resulting code is very elegant and consistent. However, I got to the point where I think it needs more understanding (or maybe just experience) not to make it inefficient, mainly because of have usage of recursion. Scala helps the situation by introducing tail recursion, but again, it takes time for a beginner’s mind to wrap around it. Paradoxically, that’s probably the biggest gain from the course - to change the way you think.

Assignments

The most important part of the course were weekly assignments. I spent a lot of time on them and I really enjoyed every minute! They were challenging, but not in “turning you off” way.

Each assignment was rated in 10 points scale - 8 points for code validity and 2 for style. The score was calculated using automated tests, which is actually fully understandable, considering participants number (~50k last time I checked it). However, it looks like the grading introduces a lot of misunderstanding. I’ve read many comments about how it’s misleading and how a high (or low) rate doesn’t proof anything. I agree, but I can’t really imagine how it could work without grades. I, personally, was really excited when I got 10/10 after a few hours of exercising my mind. And while it doesn’t proof anything, I was at least ensured that I was on a good path.

Lectures

Lectures were integral part of the course. I was watching them before each assignment and they were helping a lot. They were mainly focused on theoretical aspect. I could learn how the code is evaluated and how data structures work internally. That’s good because most of tutorials and articles on the Internet focuses on a practical part, so a source of knowledge about what’s going on under the hood is much appreciated. That wouldn’t be so easy, however, without Martin Odersky. He is a great teacher and it’s quite obvious he’s excited about what he is doing.

What’s next?

Well, I think I’ll get back to reading Programming in Scala (which I highly recommend, by the way) and learning Play! Framework.

To sum up, I need to say again that I really enjoyed the course. I feel I gained a lot from it. I’d like to thank you to both Martin Odersky and Coursera team!

Leave a comment