Friday, March 19, 2010

Review: Programming Scala, by Venkat Subramaniam

Programming Scala: Tackle Multi-Core Complexity on the Java Virtual Machine (Pragmatic Programmers)Courtesy of The Pragmatic Bookshelf I was able to read "Programming Scala" by Venkat Subramaniam. If you are a Java programmer, this book is a great introduction to Scala for you. It is packed with knowledge. There was not even one chapter after reading which I could say "well, this was quite obvious, I could expect this". Book is targeted for experienced Java programmers, so author does not cover things we already know. This was great for me, my time was not wasted learning what I don't need. Instead, I was led from easier topics in Scala (like classes, typing, closures) to more difficult ones (pattern matching, actors and concurrency) at a nice pace. Most topics are explained quite clearly and understandable. There are few which I had difficulties understanding and I needed to fiddle with some code to get it. But fiddling with code is fun for programmer, isn't it? One of such topics were actors, which is a great feature in Scala and something completely new for Java programmer (unless he knows Erlang too ;)). It took me some time with IDE to understand actors, but it was also fun.

The book not only teaches how to program in Scala, but also shows tools to run these programs. Knowing that Scala doesn't necessarly need to be compiled to run and that it can be run as a script can be very useful if you need to do some simple job on your system. Author shows how to use it as a scripting language. I also liked the last chapter in which author creates Scala application using various features covered in the book. It was a good way to sum up.

The only weak point of this book are examples. Especially at the end of the book they become more and more difficult and not always clearly explained. Another disadvantage of examples is their little connection with reality. Have you ever need to count letters in blog URL? In some cases they even show bad practice like throwing general Exception. I know it's only example, but educational book should not promote bad practice even there.

Said all this, I would recommend this book to every Java programmer who wants to learn Scala. If you are not afraid to fiddle a little with code (and you should not be, you are a programmer after all;) ) it is a very good book for you and you are it's perfect target.

Last but not least, not only author, but also editors deserve praise. I have PDF edition and I can login on pragprog.com page anytime and download it. I don't have to worry that if I loose it - it's lost for good. Moreover there are .mobi and .epub formats available. I could read the book on my phone on a bus or a tram which was very convenient. And there is even more - the books are DRM free, which shows publishers not only care for readers comfort, but also trust us. I appreciate that.

1 comment:

Paweł Badeński said...

"I know it's only example, but educational book should not promote bad practice even there."

I wholeheartedly agree with that opinion. I know we talked one time with my friend that there should be two ways of handling that kind of situation. Either they should use all the correct practices or attach a huge box "For educational purposes only! May contain bad practices!" Too often do I see crap like that in real code and not that I'm not guilty of propagating it - many times have I done that in good faith only.

(Sorry for a bit of offtopic comment ;))