Six weeks ago I enrolled in Functional Programming Principles in Scala on Coursera, and today I submitted the last assignment: it looks like I started yesterday, while one month and a half have passed.
If you are planning to join the course, or just gathering information looking for the right one, here’s my thoughts and suggestions.
Is this course about Scala or about Functional Programming?
The course is definitely about Functional Programming: Scala is just the language you will use to better understand concepts like immutability, recursion, pattern matching, and list comprehension. And it helps a lot since Scala is not a pure functional language, but rather a hybrid one, supporting object-oriented constructs with a Java-like syntax and thus accessible to the average OOP developer.
So I would say that even if for some reason you don’t like Scala or you don’t want to learn it you could attend to this course: what you will learn is to think functional. You can apply principles like recursion and immutability also in your favorite language, while techniques like pattern matching need more specific support from the language.
How easy are the “Principles”?
The lectures gradually introduce you to the FP world, so I would say that this is a beginner’s course.
Nonetheless, bear in mind that at the end of the day the course is facing you with a completely different programming paradigm. Regarding this, I can tell you that the most difficult weeks for me were the first and the third. I was trying to solve the problems with an imperative approach, looking for loops and mutations: nothing worse than it!
Also, be prepared to pick up you maths books once again: there’s a good amount of math in this course, and this is good since it will show you how to verify parts of your code in a functional way.
Of course, the usual ones are always valid: build a routine, catch up with deadlines and do the exercises while watching the lectures. The last one will slow you down, turning 14 minutes long lecture into an hour of notes, coding, and googling. But it will eventually make your life easier when it comes to the assignments.
With regard to the assignments:
- read carefully the descriptions, as one-half of the solution is there, under your eyes.
- go through the week’s exercises, as the other half of the solution is there
- forget all you know about control flow statements, rather try to think using the patterns exposed in the lectures
- don’t over engineer, if it looks complicated it means it is wrong
- submit as many times as you need, as the log from tests is quite verbose and will give you some useful insights
- write your own tests
A final note about the academic background: I have no degree, nor I studied Computer Science at the University. I found tremendously useful sites like Wikipedia, StackOverflow for most of the academic topic. I know it can sound trivial, but it actually helped me.
A book I strongly suggest you to prepare your mindset for the course is Seven Languages in Seven Weeks, especially if you don’t know Functional Programming at all.
Thank you, happy learning!