Learning Scala
What I recommend in retrospect, and what I did IRL.
My recommendations
I haven't personally used this, but I know the author and have heard good things about it. Supposedly quite a good resource for beginners with little to no background in programming:
- Creative Scala
- This comes from underscore.io, which has tons of other amazing, free resources: https://underscore.io/training/
These assume you already have working knowledge of another strongly-typed programming language, ideally Java (Scala's JVM predecessor) or another functional language.
- If you're learning it on the job, see if you can get safe hands-on experience by writing tests.
- Get more hands-on experience by writing your own small application.
- Read (or at least skim) the Scala Cookbook.
- Take Udemy's Rock the JVM! Scala and Functional Programming for Beginners
When you have the basics down, then...
- (This is hard, but) take the free Coursera course, Functional Programming Principles in Scala.
- Take Dick Wall's Stairway to Scala, Applied courses
- Reference Alvin Alexander
After maybe a year...
- Take Dick Wall's Scala Advanced courses
- Watch Eugenia Cheng on an intro to category theory and applying it to real life
- Watch Daniela Sfregola on an intro to category theory for FPers
- Find other videos and beginner-friendly articles on category theory
- Read the Cats docs and book
And after some more time...
- Read the scalaz posts
- Finish the rest of Coursera's Functional Programming Scala specialization track
- Read and do the exercises in Functional Programming in Scala, the famous "Red Book" by Paul Chiusano and Runar Bjarnason
What I actually did
I went through a variety of resources, which of course varied in effectiveness--either because of quality or because of my skill level at the time I consumed them.
In the beginning
- Started the Functional Programming Principles in Scala course first. This was a mistake. The first module was fine, but then the following modules were soul-crushing and took me hours. I wish I had taken this course later in my learning journey.
- Started reading the "Red Book" shortly afterward. An ambitious fellow new coworker wanted to start a book club on this book, but attendance quickly petered out due to its difficulty. I regret inefficiently spending so much time on this book so early in my journey. I stopped trying the exercises maybe after chapter 5. I stopped reading the book after chapter 9. I want to go back to this book one day.
- Took Udemy's Rock the JVM! Scala and Functional Programming for Beginners -- good, gentle intro to Scala from a Java developer's perspective. Kept me sane as I felt like an idiot taking the Coursera course at the same time. As of now, it seems they've further updated the course to have more hands-on exercises. I did find their initial big exercises a little too hard when I was an absolute beginner, but maybe I misunderstood a few things.
- Read/skimmed the Scala Cookbook cover to cover, as recommended by my boss. May have been excessive, but I felt that a lot of the material effectively passively established itself in my head as I continued to get more hands-on experience.
- Wrote (bad, but correct) tests at my job.
After a couple of months
I was starting to write decent production code and better tests. I was getting into the groove of my team's coding style and become more hyped about functional programming in general.
But I was still quite stressed about not knowing a thing about category theory and having struggled through the Coursera course and red book.
After 8 months to a year
I (was told I) became one of the best Scala programmers at my job, but still constantly learning more. I started beginning to wrap my head around category theory and take advantage of the scalaz
library and cats
documentation.
But I continued to doubt myself and get bogged down by wtf category theory was.
After 1 year to 1.7 years (now)
I came across the Youtube videos I referenced earlier and suddenly had Eureka! moments on finally (kinda) grokking category theory concepts.
I can now fumble through explanations of core category theory terms as applied widely in Scala's FP libraries (scalaz and cats). I changed jobs and am now encountering another code base with a slightly different coding style and other major usages of Scala tools I have not used myself before, such as Future
s. In response, I have begun revisiting these core tools (and others) to fill knowledge gaps by taking Dick Wall's Udemy courses. I find even the beginner "Applied" series really helpful and illuminating, and I'm excited to take his "Advanced" series next. I wish I had taken this series earlier, but better late than never!
I've wanted to make my own side app (either a productivity tool or something related to my husband and my gigantic board game collection) for awhile, but I have still not gotten around to it... I should do that sometime.
I would like to take my own advice and someday go back to the red book and the remaining Coursera courses on Scala and FP.
I have attended a functional programming conference, which exposed me to more advanced FP stuff and other FP languages, especially Haskell.
I have given a tech talk on category theory for FPers. The blog post is here.