Where to start
If you are reading this, you are probably in the same position as most developers, you already know the definition of functional programming, you’re keen to learn more, but don’t know where to start.
Over the last couple of months I’ve been trying courses and searching for beginner friendly content that will help you on that journey. Here is what I can recommend to get you started.
-
Learn the fundamentals of functional programming — for free, in your inbox - an excellent intro to fp from Preethi Kasireddy
-
JavaScript Allongé - by Reginald Braithwaite an excellent read on declarative modern JavaScript.
-
Fundamentals of Functional Programming in JavaScript by Nate Taylor. You will need a PluralSight subscription for this one.
-
repl to try out new functions and function composition for yourself. This is the most important step of all.
There are many other resources that I could have listed here, but it is easy to get overwhelmed and give up before you get started. The most important thing here is to have fun and practice what you have learnt, as much as possible.
Tackle some challenges
Congratulations if you have made it this far, even though fp is great fun, it takes a fair bit of persistence, well done!
Time to test your hard gained knowledge!
Please come join us on Exercism to tackle some challenges in ES6 or JavaScript. I’ve set up a team for like minded fp’ers at a beginner level. If you can’t complete a challenge, just submit anything and that way other team members can leave helpful code reviews to help you get over the hump. Setup can also be a bit of challenge, so let me know if you get stuck and I’ll try and help out. Barely Functional exercism team
Next steps
This is where it starts to get really exciting and equally very frustrating. I’ll break this up into next steps in JavaScript and next steps in other functional languages.
Sticking with the JavaScript World that we all know and love:
-
Professor Frisby Introduces Composable Functional JavaScript egghead.io video course
-
Take a look at JS libraries like Ramda or lodashFP. They offer most of the functionality you are looking for, without having to write your own library.
-
If this is all too easy for you, check out Sanctuary JS
Although JS can be considered a Functional Programming language, it is not a pure functional programming language. Many of the more advanced patterns can become quite contrived and are so difficult to implement, they probably aren’t worth attempting. Time to try something new.
An excellent place to start is Elm. I can’t offer enough praise for their amazing compiler or the super friendly community. Sure there is plenty of competition popping up in the frontend FP arena, but none are quite as beginner friendly(at present).
This is where I run out of experience. My personal journey has taken me down the path of starting to learn Haskell. It is an amazing language. For example this is a way to create a list of even numbers in the range 1 to 10, that aren’t 6: [ x | x <- [1…10], x mod
2 == 0, x/=6 ]. Try that for yourself in JS and let me know if you manage it in one line. If that has peaked your interest, check out these resources:
If you haven’t already joined, come join us at Barely Functional Exercism and test your new Elm, Haskell or JS skills and help out your fellow learners, by leaving code reviews.