Michał’s notes

Learning Scala? These 6 books are for you

Scala community is exceptionally lucky to have number of great authors who have given us many quality books. It’s worth taking advantage of that. While learning, I’ve spent some time picking the right titles. So here is a list of works that have helped me to make a progress on different phases of learning. I am ordering them according to the difficulty and mutual dependencies. All together these books make up a complete learning path, that could take you from zero to a competent FP programmer. Enjoy!

Atomic Scala (B.Eckel, D.Marsh)

A friend recommended me this book when I was making first steps with Scala, and I found it to be a really good guide for a beginner. The authors start from very basic concepts, possibly it could work even for someone who has very little experience with programming. With next pages they lead you through more and more complex topics, and by the end of the book you are able to read idiomatic Scala code and write own of course. The authors have done very good job with providing reasoning for language elements, that could be a novelty for programmers having background in less functional languages. If you are an experienced programmer, you can just quickly skim through first part of the book (introduction), focusing on the later part, and have book completed in one weekend.

Atomic Scala can be found on its dedicated website.

Functional programming in Scala (P.Chiusano, R.Bjarnason)

It may be the most praised title among all Scala books. It’s an excellent introduction to the functional programming, well written, with a good balance between theory and practice. Authors go through all essential concepts, present number of examples, show how to implement most popular combinators and give a gentle introduction to basic categories. I would recommend this book as the step no. 2. Some familiarity with Scala syntax will allow you to focus on FP concepts. However you don’t have to be a Scala master to be able to do FP, so you can go for this book before diving deeper into the language itself.

Functional programming in Scala on Manning.

Learning Concurrent Programming in Scala (A.Prokopec)

It’s a must read for all programmers coming from languages, where you don’t have to worry about concurrency, like JS or PHP, but of course not only for them. Author starts from building up foundations by describing Java Memory Model and concurrency primitives, and follows with modern concurrency abstractions and models, including actors and reactive programming.

Concurrency support with FP are the primary reasons for Scala commercial adoption, so this work together with Chisano & Bjarnason’s book give you a very good sense of how and what for Scala can be used.

Learning Concurrent Programming in Scala on Packtpub.

Programming Scala: Scalability = Functional Programming + Objects (D.Wampler, A.Payne)

The step no. 4. Although I reached for this book when I wanted to deepen my understanding of several more advanced concepts, the book itself is like a bible, a thorough work stretching from complete basics till topics like metaprogramming. Perhaps it could work for a Scala newbie too. Well written, clear and deep. It’s less popular than M.Odersky et al. “Programming in Scala”, but definitely worth checking. I decided for this one, as 3rd edition of M.Odersky book was not yet available, and I wished to have a more up-to-date title.

Programming Scala on O’Reilly.

Advanced Scala with Cats (N.Welsh, D.Gurnell)

It’s a little gem. I couldn’t find for a while a practical and systematic introduction to type classes and basic categories, that would be focused on Scala, so I was very happy when I found this book. Although the title announces that it’s based on Cats library, major part of examples from the first part of the book is written in a generic way, with no dependencies on any library, so if you prefer Scalaz or need something more general, then this book will serve you well too.

Advanced Scala with Cats comes from Underscore.

Functional and Reactive Domain Modelling (D.Ghosh)

The last piece of puzzle. Scala is a rich ecosystem, having often multiple ways of doing the same thing. Other books put emphasis on particular topics, details, and sometimes one may feel a bit lost and have difficulties to figure out how to put all this stuff together. And here comes in handy Ghosh’s book. Here you can get familiar with common FP modelling techniques, see how to leverage language richness and functional design patterns in order to build expressive models for a real life domain. Author solves one problem using different approaches, so you can compare and better understand their differences, costs and advantages. You will find here variety of modern architectures and learn how to implement them in Scala.

Functional and Reactive Domain Modelling on Manning.