5 Books to Learn Scala and Functional Programming - Best of Lot

Scala is one of the relatively new programming languages which encompasses best practices of many programming languages. The biggest strength of Scala is that it provides a nice blend of object-oriented programming and Functional programming. So, you can not only construct elegant class hierarchies for maximum code reuse and extensibility, you can also implement their behavior using higher-order functions. It has a concise syntax with less ceremony which also makes it ideal for scripting but doesn't underestimate its power. Like Java, Scala has also used for mission critical applications by technical giants like Twitter, LinkedIn, and Intel. Let's be honest, learning Scala is not easy, even for experienced Java programmers. When I started learning Scala, the syntax looks quite different to me. Being used to the verbose style of Java, the brevity of Scala looks cryptic to me but once I learned, that brevity is what I liked most.

Another challenge while learning Scala comes in a way of learning functional programming concepts e.g. monads, lambdas etc. Since I have never used any functional programming language e.g. Haskel and Lisp it was quite overwhelming for me. I even stopped learning Scala for few weeks, before I restarted when I gain some ground on functional programming. That's why in this list of best books to learn Scala, I have also included a book on functional programming using Scala.

Even though, there are a lot of free material is available online and even Scala documentation is a great source to learn Scala, I found learning from the book is the best way to learn a new programming language.

Top 5 Scala and Functional Programming Books

Here is my list of some of the best book to learn both Scala and Functional Programming. You can first start learning Scala programming concepts by starting with the first book in this list and then move to learn more useful functional programming concepts by using the second book in this list.

You must read at least these two books if you really want to master Scala because the second book will show you how you can use functional programming concepts to solve real-world problems which are a very useful skill if you are looking for a Scala development job.

Many programmers think that just learning scala basics like case classes, traits, scala collection, and optional is enough to get a Scala programmer job but that's not true. If you are serious to become a Scala developer you must understand functional programming concepts like the map, reduce, fold, flat map, monads and lambda as well. Just learning Scala basics won't be enough to get a Scala programming job on Twitter, LinkedIn or Intel.

Programming in Scala 3rd Edition
This is by far the best book to learn Scala, particularly for Java developers. Having designer of Scala programming language, Martin Odersky as the co-author of the book really helps in terms of providing more depth on concepts. The 1st and 2nd edition of the book was a huge success and the revised 3rd edition covers Scala 2.12. You can use this book as a reference because it provides comprehensive coverage of all Scala concepts and features. It also discusses similarities and differences between Scala and Java, which makes this book more valuable for experienced Java programmers. In short, Programming in Scala 3rd edition by Martin Odersky, Lex Spoon, and Bill Venners is a must read books for Scala programmers.

how to learn Scala read this book

Functional Programming in Scala
When I first started learning Scala, the most challenging part for me was functional programming concepts e.g. monads, lambdas, carrying etc. Even though initially struggle with Scala syntax because it is ver concise and less readable, the FP concepts bother me a lot until I read the Functional Programming in Scala 1st Edition by Paul Chiusano and Rúnar Bjarnason.

This is seriously one of the best books to learn Functional programming concepts irrespective of language. Even if you are not learning Scala, you can read this book just to refresh or learn functional programming idioms and concepts. It teaches Scala and Functional programming by leading you through exercises where you are expected to work out key features of the Scala library for yourself.

One of the drawbacks of the book is that there aren't many examples or illustrations about how to use Functional programming to solve real-world problems, So I recommend reading "Advanced Analytics with Spark" at the same time. Both of these books compliment each other.

Top 55 Books to Learn Scala and Functional Programming

Scala for the Impatient
Let me put the big disclaimer first, I am a big fan of Cay S. Horstmann. Having read his Java 8 for Impatient and Core Java Volume 1 and 2 I was sure that Scala for the Impatient will be a great book. The 1st edition of the book was a big success and now you have the 2nd Edition of Scala for the impatient by Cay S. Horstmann.

The revised 2nd edition of the book covers Scala 2.12 and current Scala usage. The book is written for experienced Java, C++, or C# programmers who are new to Scala or functional programming. This book introduces the key Scala concepts and techniques you need to know in order start coding in Scala. It is the perfect introduction to the language, particularly for impatient readers who want to learn the fundamentals of Scala so they can become productive quickly.

Best book to learn Scala

Scala Puzzlers
This book is similar to Java Puzzlers by Neil Gafter and Joshua Bloch. I like this kind of books because it helps you to learn the programming language in depth by exposing the corner cases. The headline of the book "The fun path to deeper understanding" completely justify the content. In short Scala Puzzlers by Andrew Phillips and Nermin Šerifović is a must read books for experienced Scala programmers. Even though you have been using Scala for a couple of years, you will learn a couple of things for sure.

Best Scala book for experienced programmers

Scala in Action
Having been read many titles on the action series e.g. JUnit in Action, Hibernate in Action or Spring in Action, I was confident that this book will also keep the tradition intact.The books are full of examples and teach you many day-to-day tasks by adopting how to do this in Scala approach. The book covers Scala 2.10 and last updated on 2013 so it is a little bit out-of-date now but you can still use it to learn the core, Scala. The hands-on examples are the key strength of this book. It will also teach you how to use Java and Scala open source libraries, debugging and test driven development with Scala.

5 Books to Learn Scala and Functional Programming

That's all about some of the best books to learn Scala and Functional Programming. The best thing about learning Scala is that you will get the best of both worlds i.e. object-oriented techniques as well as functional programming goodies. To be honest, the learning curve of Scala is a little bit difficult, especially if you are from Java background and never used any functional programming language like Haskel or Lisp, but, once you crossed that barrier, you will love things which you hated when you start learning Scala e.g. syntax. So all the best with Scala, better job and better salary too.

P. S. If you are looking for Scala job, you may like to practice some of the frequently asked Scala Interview Questions, which has been asked by many companies. You can check them here

Other Recommend books by Me you may like to explore

Thanks a lot for reading this article so far, if you like these recommendations then please share with your friends and colleagues. If you have any suggestion or feedback, please drop a comment. 

No comments :

Post a Comment