Climb higher levels of Scala with an experienced mentor,
This review is from: Scala in Action (Paperback)
416 pages can have an impact on your life - regardless of what book you're reading. When it is to learn a new programming language, you'd be better off spending these pages in a pleasant and comfortable way. I think the book "Scala in Action" by Nilanjan Raychaudhuri (Manning), can be a vivid example thereof. I recommend reading the book, but only as the second or third book about Scala as it may be too practical or too tools-packed at times, that can lead to confusion for people new to Java tools and frameworks. I think it's not very rarely when one can drift away from the main track - to learn Scala, esp. at the end of the book.
The book is however very good at leading a reader throughout Scala by many examples to eventually become one - hence the title "Scala in Action".
The book starts with the quotation from James Gosling, the creator of Java, who once said: "If I were to pick a language to use today other than Java, it would be Scala". It sets the course for the entire book that's certainly not about Java (which should come as no surprise given the title), but Scala and aims at convincing you to use Scala as your next language (should you need one).
The cover says "Covers Scala 2.10" and I remember that was my first thought about the book - how much of Scala 2.10 can I read about in this book? Would the new features of Scala 2.10 be somehow explained in details? Scala 2.10 was covered...partially. It's not certainly a book to cover the latest and greatest of Scala 2.10, but Scala in general, regardless of the version you use. When you attempt to match "New features in the 2.10 series" to what the book offers you may get a bit surprised how little the book covers - no value classes, no implicit classes, no dynamic and applyDynamic, Akka Actors are still a dependency in sbt of the projects in the book, and finally no macros. The book was indeed "updated to reflect the newest changes in Scala version 2.10" (page xvii), but lacks many of them not to mention their thorough explanation. While 2.10 found its place in Chapter 3, Summary mentioned just 2.8. Section 4.7 also uses 2.8 to refer to the new Scala release. It may be confusing for newcomers when they attempt to "repeat" the book in a development environment.
Reading of the book was quite often mind-boggling and took extra steps to ensure I did not get lost while moving from basic (OOP in Scala) to more advanced topics. The book was my third book in a row about Scala (after "Atomic Scala" and "Scala for the Impatient") and yet I found the reading challenging because of the knowledge I had not learnt before. The book was more advanced than the other two books and required more patience and thinking to absorb the wisdom. There're very few pages that were left out without any section or sentence highlighted for later use.
You don't have to read the book chapter by chapter, but the author made sure that it might help if you follow the pattern. I did and only now can I consider re-reading the chapters in no particular order. I'm a big proponent of reading books from cover to cover, and it worked so well in this book. There were few moments where I was confused when I had to read about a topic again, esp. Akka actors in Chapters 7 and 11, but the material ultimately turned out different (and confusion vanished pretty soon).
As Chad Fowler said in Foreword: "Reading the book is like having an experienced mentor accompany you every step of the way". No doubt, he's right! I myself had a great time learning Scala with this book and lost no minute while reading it.
The book's aim is to learn you Scala and how to use the language to develop real-world applications. Previous experience with Java is not required, but since many of the Java frameworks - Spring Framework, Hibernate, Maven, JUnit - are used, it does help here and there.
It seemed as if the author had still remembered his past days when he was learning Scala as there're times during the reading when I asked a question and the answer came just right after I turned the page.
Figures, side notes, hints, references to external articles and blog entries, tables, and many other layout-improving decisions made the reading very pleasant. After all, that's what makes Manning stand out in the publishing crowd. Be prepared to visit GitHub for a complete experience, code-wise.
There're many personal advices and observations. The author often uses "I used..." or "I tend to..." in the book so one can learn from his experience.
Here come more tailored descriptions of every chapter.
Chapter 1 is very short and informatory. It may very well be used as a pitch about why Scala (but I doubt there're buildings as high to let you use it in an elevator).
Chapter 2 sets the pace for the other chapters so you can easily write Scala programs in Scala REPL as you read the book. The Scala version the author uses is 2.10.0 as the REPL says. The chapter was pretty long and required a lot of patience to read. It's meant for Scala beginners who want to find out how to get started developing basic applications in Scala.
In Chapter 3 the author presented user stories as a vehicle to develop a MongoDB driver. The writing style changed and so did the reading. It was quite interesting experience. I found there lots of useful content. It may very well serve as a useful refresher for more advanced Scala programmers and excellent introduction into Scala for less experiences as they could be guided by the example.
Chapter 4 was really heavy and interesting. I wish it'd been longer.
No comments about Chapters 5-7 as I seemed to have been completely immersed in absorbing the knowledge and had no time to write summaries.
Chapter 8 was the most informatory and helpful for me to extend my knowledge of Scala. It was not how to use Scala with tools and frameworks in mind, but how type-safety (and hence the compiler) can help build modular systems. It was very heavy knowledge-wise with material I won't likely understand soon. It was very advanced and thorough. I wish the author had spent more time and devoted more space to cover the nuances of working with type system in Scala with more examples. I highly recommend the chapter.
Chapter 9 was an interesting reading. It's a bit too short, but since the topic itself is quite large, one chapter would always be too short, regardless of the number of pages. The flow was pleasant and steady. Actors and futures included.
Chapter 10 was a mixture of libraries and features of Scala, esp. for dependency injection. Succinct and comprehensive.
It's not very rarely when the author tries to explain a term and it does it in a way that's more confusing than helpful, e.g. algebraic data types or variance. These parts certainly beg for a heavy rewrite.
As a final remark - have you ever heard about Clean, the language? The author did and had a word about it (page 124). I'm always glad to be told about other exotic languages as I seem to be getting more interested in programming languages lately.
Thanks Nilanjan for a very informatory reading! I'm looking forward to reading the 2nd edition of the book. Don't let me wait long, please.