Recommended F# Beginner Resources

It's still very early in my F# journey, but after spending some time with several resources available to newcomers, I have some recommendations.  I believe the following list to be a decent path for moving from Novice to Advanced Beginner in F#.  If you think I've missed some gems or disagree, please leave a comment.

Try F#

This site takes the "Try [insert language]" idea that has been done in other languages and really runs with it, providing several topic-oriented tutorials beyond the basics.  It's a great way to get your brain prepped for F#.   Note:  I had some issues getting the script window to echo what I was typing in Safari on Mac OSX.  I had to switch to Chrome in order to get it to work.

The F# Survival Guide

Even though it is dated, I consider this the best tutorial on F# for a beginner.  The concepts are introduced in a logical progression that build on top of one another, the pacing feels right, the language used is simple and direct, and code is introduced in a way that can be run directly in fsi (a recurring theme in this post is learning by doing).   After getting discouraged reading a couple of books where the authors failed to trim the context down in their examples or would bounce around concepts in a strange order, this resource gave me confidence.  Once I finish this, I plan on going back to the books I gave up on because they are more current than the survival guide.

For some reason, the F# Survival Guide's original website is no longer available, but the contents can still be found on the Internet Archive.   It's obvious the authors put a lot of effort into this excellent resource.   It's a shame it doesn't have an official home or the ability to be updated.

F# Koans

Many languages now have Koans, but the basic premise is the same:  given a series of tests that cover the language's fundamentals, fill in blanks in the code that makes the tests pass.   Starting from simple basics and moving to more complex concepts, the Koans are a great way to have simple problems put in front of you that require thinking in the language to solve.

I recommend not attempting these until you have some F# practice under your belt.  Similar to the Koans, Exercism exercises present you with failing test cases that you must write code to fix.  The difference from the Koans is that the exercises are not F#-specific and you can get feedback from mentors when you submit a solution.  I wrote more about Exercism with F# in a post that includes how to get set up using Xamarin Studio on Mac OSX.

This one suffers a bit due to the size of the F# community participating.   None of the F# exercises I've submitted have gotten feedback.  Other languages have more mentors willing/able to provide feedback, and it does make a difference.   Maybe a combination of attempting these and checking in with the F# irc channel would suffice?

Domain Modelling with the F# Type System

This fantastic talk by Scott Wlaschin opened my eyes to algebraic types.  Scott has a knack for taking complex concepts and making them accessible.  Watching this talk made me feel like I've got a lot to learn (more fun ahead).  It brings up some questions:
  • What would business logic/service layers look like using these types? 
  • How would these relationships be stored in an RDBMS?
  • What are the best practices for structuring large F# programs?

Which leads me to the following...

Continuing Education

Once you've read/watched the above, you should be comfortable with a lot of the F# that you will encounter.  It's at this point where you enter a different phase:  knowing enough to be dangerous but feeling ill-equipped to tackle more serious problems.

For myself, I'm planning on building a couple of pet projects and writing about them, but I also need more directed learning.   Something along the lines of A Recipe for a Functional App on F# For Fun and Profit (also by Scott Wlaschin, mentioned above).  If you are reading this and have  any recommendations, I'd appreciate them.   Any books, talks?   Are there any non-trivial F# code bases out there that exhibit best practices and are ideal for learners?   Please share!

If you are working on something targeted at teaching F# newbies and need a guinea pig or some feedback, let me know--I love learning this stuff and am interested in contributing.

No comments: