Monday, February 3, 2020

Top 5 Free Scala Programming Books for Java Programmers, Download as PDF or Read Online

Scala is another JVM based programming language, which is quickly gaining popularity because of its exciting mix of object-oriented and functional programming paradigm. Many companies have started using Scala for there strategic and mission-critical development. One of the best known is Twitter, which is also one of the key factors in the growing popularity of the Scala programming language. If you are a Java, C++ or C# programmer, who is willing to learn Scala in your spare time, then you will be surprised to see how much helpful content is available for FREE on the internet. By the way, Java 8 is not far away, the only couple of months to go, and there are already some decent tutorials available online. If you are learning Java 8, you may like to see my list of resources on Java 8 as well.

I personally prefer books to start with, and that's why, when I recently started learning Scala, I did some research on Scala programming books, which are available for FREE download or online reading. I am surprised to see lots of useful content, including Scala for the Impatient from Cay Horstmann, which I already had.

Other good FREE Scala books I found were Effective Scala, looks inspired by Effective Java, by Marius Eriksen, Twitter Inc. This is not as exhaustive as Effective Java, and I guess it will evolve into similar length, but still contains lots of good advice on Scala programming.

One more Scala book which is available for free is Programming in Scala, First Edition by Martin Odersky, Lex Spoon, and Bill Venners, this is a bit old, first published at December 10, 2008, but still, an excellent book to have, given Martin, inventor of Scala is a co-author.

Another good tutorial cum book I found is Scala School, a collection of lectures from Twitter to prepare experienced engineers to be productive Scala programmers. You can read this online.

Best things about all these resources are that they are FREE, you don't need to spend a single penny to get these tutorials, of course, if you like you can also purchase some more good books, I have mentioned in my earlier post about the difference between Scala and Java programming language.

Now let's see from where you can download these free Scala programming books and how good they are.





5 Free Good Books to Learn Scala Programming language

So here you go, my list of some of the best resources, tutorials, and books to learn Scala programming language for free. Some of the books can be downloaded as PDF, while others can be read online. If you know any other Scala book, which you think is an excellent resource to learn, and it's also available for FREE, you can share it with us. Apart from these, you can also see tutorials, manuals, API reference from scala-lang.org, and official Scala API documentation to learn more.


1. Scala for the Impatient

This is one of the few good books on the Scala Programming language, written by Cay Horstmann, published by Addison-Wesley 2012. It's one of the best, compact introduction to Scala programming language for programmers who are already familiar with popular first-class languages e.g., Java, C++, or C#.

It contains small, chapter wise content, which is very easy to comprehend, a much-needed requirement to understand a language like Scala, which initially looks cryptic to many Java developers.

Once you went through the book, you will be most likely use it as a quick reference as well. To give you an idea about different levels of Scala programmers, level A1 is for the Beginning application programmer, level A2 stands for Intermediate application programmer, and level A3 is used for the Expert application programmer.

Similarly, they have three levels for the Scala library designer, where level L1 is for Junior library designer, level L2 is for Senior library designer, and level L3 is used for Expert library designer. Btw, for quick learning, you can also combine this book with the Rock the JVM! Scala and Functional Programming for Beginners course on Udemy. I personally found learning from a course and book a lot easier and work really well.

Free Scala Programming for Java Programmers

As part of level A1 contents, you will learn the following topics in Scala :

1) Java-like statements and expressions: standard operators, method calls, conditionals, loops, try/catch
2) Infix notation for method calls
3) class, object, def, val, var, import, package
4) Collections with map, filter, etc
5) Simple closures
6) for-expressions

Now the best part is that you can get the A1 level chapters of this Scala book for free at typesafe. All you need to do is to enter your first name, last name, email address, and company name. You need to thank Martin Odersky, the inventor of Scala, for that.

He has also written forward for this book and so impressed with the basic concept of the book that he asked cay if the first section could be made available as a free download on the Typesafe website, something Horstmann graciously assented to.

So what are you waiting for, you can download FREE pdf of Scala for the Impatient here.





2. Programming in Scala First Edition

This is one of the first books in Scala programming language, a comprehensive step-by-step guide by Martin Odersky, Lex Spoon, and Bill Venners. One of the highlights of this book is that it is co-written by the language's designer, Martin Odersky.

It covers Scala in great detail and can be used as a reference as well. Like any good book, Programming in Scala flows well with each chapter building on concepts and examples described in earlier ones.

The fantastic thing is that the first edition of this books available for FREE, by the way, if you like, you can also get the second edition of this book from bookstores. And, if you want to pair this book with an online course Scala: Getting Started on Pluralsight can be a good companion.

I rate this book a very precious free resource for Java cum Scala programmers. You can read this book on the internet here.



3. Scala School from Twitter

Scala school is started as a series of lectures at Twitter to prepare experienced Java, C, and C# programmers to be productive Scala programmers. Scala is a relatively new language but draws on many familiar concepts.

Thus, these lectures assumed that programmers already familiar with the concepts and showed how to use them in Scala. This is actually an effective way of getting new programmers up to speed quickly.

This online tutorial cum blog cum book is the written material that was used in those lectures, you can read them one by one in the order they are presented to get the most out of them.

They are short, full of examples, and straightforward to understand, but the same time not trivial. You can check out this book online here. And, if you need a free Scala course to pair this book and tutorial then  Scala Tutorial For Absolute Beginners is a great course to start with on Udemy.  It's completely free and all you need a Udemy account to access this course. 




4. Effective Scala

This is another Scala programming books which are freely available online and another contribution from Twitter towards education programmers on Scala. Effective Scala is Twitter's "best practices" for the Scala programming language, much like "Effective Java" is for Java programming language.

This book is particularly useful for understanding idioms in Twitter's code. It's written and compiled by Marius Eriksen, Twitter Inc. marius@twitter.com (@marius), and covers Scala programming best practices on Formatting, Pattern matching, Types, and Generics, Variance, Type aliases, Implicit, Collections, Performance, etc.

I also cover Java Collections, Concurrency, Control structures, Functional programming, Object-oriented programming, Error handling, Handling exceptions, Garbage collection, and Java compatibility.

You can check out Effective Scala here.




5. Scala Tutorials for Java Programmers

This is one of the best Scala tutorials for Java developers, directly from source scala-lang.org. This book gives a quick introduction to the Scala language and compiler. It is intended for people who already have some programming experience and curious to learn Scala to see what they can do with this new programming language.

It also assumed a basic knowledge of object-oriented programming, especially in Java. They start right from the Hello World program, which is what most Java programmer like to see:

object HelloWorld {
  def main(args: Array[String]) {
     println("Hello, world!")
  }
}

From here, they went on to explain how Scala programs are a structured and comparative analysis of Java vs. Scala. It is useful as gold and absolutely free as well. You can download a PDF version in a book-like format here.



Further Learning
Scala: Getting Started
Learn By Example: Scala
Rock the JVM! Scala and Functional Programming for Beginners

Thanks for reading this article so far. If you like these free Scala books, then please share it with your friends and colleagues. If you have any questions or feedback, then please drop a note. 

8 comments :

SZ said...

I've been trying to learn Scala casually. I would highly recommend the videos on Coursera.

Benoit said...

The picture for "rogramming in Scala First Edition" is the vcover of "Programming in scala" by Dean Wampler, not the one of Odersky and alii"s book!

Seth Willians said...

This is perhaps one of the best list on Scala programming that I have come across. Thanks a lot for sharing.

cristina said...

Thanks for listing the resources to learn Scala! As a Java programmer, I would like to learn languages related to Java. Hope some people might like to learn Javascript too. Below is the link, I found useful for Javascript, http://netultimateschool.com/javascript-operators/
Thanks !

Unknown said...

Your technical information related with java programming is very useful and interesting.

Anonymous said...

If anyone, who has strong background in Java, C# or C++ is looking to learn Scala, I would recommend following books, ofcourse they are not free, but you must there is nothing like FREE lunches in this world :)

1) Scala for the Impatient by Cay S. Horstmann, it's a concis language reference written by one of the best in the market. It offers a rapid, code-based and practical introduction of Scala as language and platform.

2) Programming in Scala: A Comprehensive Step by Step guide, 2nd edition by Martin Odersky. This is written by creator, promoter and father of Scala language himself. It starts with introducing functional programming from the practitioner's perspective, and shows you advanced language feature, patterns incorporated which can help you to become better, more productive developer.

3) Scala in Action by Nilanjan RayChaudhri is my how to do in Scala guide. It's comprehensive, readable and explain language concepts by exploring challenges you face in day to day work.

4) Programming Scala: Scalability = Functional Programming + Objects (Animal Guide) by Dean Wampler and Alex Payne clearly explains the advantages of Scala as a JVM language. You'll learn how to take advnantage of the wealth of Java class libraries to meet the practical needs of enterprise and Internet projects more easily. Packed with code examples, this book provides useful information on Scala's command-line tools, third-party tools, libraries, and available language-aware plugins for editors and IDEs.


5) Scala in Depth by Joshua Sureth, Haven't finished it yet but my friend told me its worth of money :)

Anonymous said...

Bruce Eckel, author of famous duo "Thinking in Java" and "Thinking in C++" has just finished with "Atomic Scala", touted as the best book to learn Scala. Since I am big fan of Bruce, having benefitted of his earlier work, I bought a copy of this book and started learning Scala. I am happy to say that this is a really great book for beginners. You will find simple exaples, excercises and new concept introduced in simplest possible way. You can even download sample chapter before buying the book from here http://www.atomicscala.com/free-sample/#.VefgNvmqpBd.

Anonymous said...

Please include Scala Puzzlers in this list, a great book to learn deep about Scala, similar to Java Puzzlers.

Post a Comment