Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 542

Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 578

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 18

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1244

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1442

Strict Standards: Redefining already defined constructor for class wpdb in /home/melaloui/public_html/ueckerman/wp-includes/wp-db.php on line 306

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/melaloui/public_html/ueckerman/wp-includes/cache.php on line 431

Strict Standards: Declaration of Walker_Comment::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Declaration of Walker_Comment::end_el() should be compatible with Walker::end_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /home/melaloui/public_html/ueckerman/wp-includes/class.wp-dependencies.php on line 31

Strict Standards: Redefining already defined constructor for class WP_Http in /home/melaloui/public_html/ueckerman/wp-includes/http.php on line 61
ueckerman.net » Scala

Archive for the ‘Scala’ Category

Book review: Programming Scala

{Wednesday, March 10th, 2010}

I was introduced to Scala by a colleague around 4 years ago via the Lift framework. At the time I dismissed the language, preferring to focus my energies on Ruby and Ruby on Rails. 4 years later and Scala is getting some serious water-cooler time - especially since the Ruby vs Scala flame wars prompted by Twitters move from Ruby to Scala for back-end grunt. So I choose Programming Scala - Tackle Multicore Complexity one the Java Virtual Machine as the book to guide me learning the language as a relative noobie. This blog is a brief review; Pros and Cons followed by a brief summary and rating.

Pros

  • Writing style: The author keeps the language simple and the content flows nicely. My cover-to-cover read time was a near record.

Cons

  • Unusual chapter order: Introduce exception handling constructs after explaining concurrent programming and test frameworks? Exclude XML pattern matching from the pattern matching chapter? Explain reverse function calls in the midst of explaining collections? Some very strange decisions were made about the books structure.
  • Repeated explanations: The last few chapters briefly describe syntax covered in depth earlier. This gives the impression the author brain-dumped latter chapters without thought of earlier chapters.
  • Depth of content: It falls short explaining how the Scala library implements some of the language features. As it targets the experienced Java developer, the audience will find it falls short explaining how the features are realized through Java. The library apparently has some great examples of how to use the language effectively - yet these are never explained. It would also be great to appreciate why the language authors preferred syntax cryptic to the untrained eye like this:

    for(node @ {_*} <- nodes) { ... }

    or this:

    val total: Int = (Map[String, Int]() /: (rootNode \ “element”)) { (map, element) => … }

  • Idiomatic use not mentioned: No mention is made of idiomatic use of the language other than encouraging use of a few methods accepting closures. I expect more from a language guide.
  • Code examples poorly factored: Too often code examples in language guides stink. This is no exception. Don’t explain to me the value of refactoring and TDD and then proceed to present poorly structured code. Authors should encourage good form in their readers by consistently presenting good form themselves - no excuses. Show me you are an expert in what you do.
  • ‘Tackling Multicore Complexity’?: There is only one chapter on concurrency. It only goes so far as to explain the language constructs without going into details on patterns of their use. The hardest consideration of concurrency is how to test it - but there’s no mention of approaches for that. This makes the title of the book misleading. The main sales pitch falls short.
  • Summary

    It’s not a detailed language guide. It doesn’t cover functional programming in depth. It only touches on concurrency. I am now confident I understand Scala’s syntax, however, I’d be short on the confidence to apply it solving real world problems without an understanding of similar languages. Overall 5/10.