I joined a new team as Tech Lead about 6 months ago. Rather than sit back and bark orders, it has become even more important to sharpen my technical skills. I’ve chosen to start on my functional journey to become proficient in F# - the .Net functional programming language.
F# has been around for a long time but many from the C# camp have dismissed it as a niche language for the scientific and mathematic arena. But cross-pollination started bringing functional constructs to C#’s imperative landscape and I clearly remember my first experience with lambda expressions back in .Net 3.5 (2007):
Man, I hate this weird syntax! It looks cool but it isn’t optimised for performance.
I’ve grown to love lambdas over the last decade for its concise and descriptive nature, especially when used in conjunction with LINQ extension methods like Select and Sum, which originated in functional languages. I started thinking about designing for immutability and organising my methods into behaving like functions.
However I have realised that C# will always pale in comparison to a pure functional language because it is too easy to fall back to an imperative and mutable coding approach when things get tough. Hence my decision to look at F# a little closer because it is a solid functional language within the rich .Net ecosystem. Thus begins my functional journey… we’re not in Kansas anymore!
The opportunity presented itself via the Functional Programming Auckland Meetup when they organised a Learn F# Hands-On session. Sam from Coding With Sam was our tutor and he was great in tailoring the content to each learner’s experience level. That real-time feedback and personalised content is something that online courses struggle to match, so I really appreciated Sam’s guidance during and after the session.
(Note: I previously showcased another Functional Programming Auckland Meetup event when I wrote extensively about Functional Reactive Programming)
The session focused on FSharpKoans and that is a great introduction to F# syntax and constructs for people who know a little programming. It is a very gentle and guided tour… until the training wheels come off midway with the Stock example. I’ve read gripes about how some found this difficult but I relished the challenge as it shows who understood the concepts vs. those who were filling in the blanks.
I completed the Koans and have now moved on to exercism.io to continue my F# education. It is a little fiddly to get the initial set up right, but is a great learning platform because you can use your favourite IDE to solve the problems vs. using an online-only solution like HackerRank. The exercises are focused on implementing algorithms while bringing in important techniques such as tail recursion - something I’m still trying to get comfortable with. I like this approach because I need to get comfortable with syntax before I worry about real-world tasks like querying DBs and updating UIs.
Do you know other good learning resources? Sound out in the comments! I will share new resources as I learn about them.