Agile Zone is brought to you in partnership with:

I'm a software architect/consultant in Boulder, Colorado. I started blogging at: http://wayne-adams.blogspot.com/, but have since started the new blog, Data Sceintist in Training which will cover the areas I am learning as part of my own "big data" training, including the Hadoop family, frameworks like OpenStack, the R programming language, column-oriented databases and the art of examining data sets for useful patterns. The original blog will be kept alive with Java-specific posts. Wayne is a DZone MVB and is not an employee of DZone and has posted 35 posts at DZone. You can read more from them at their website. View Full User Profile

Day 1 -- Ruby

03.30.2011
| 6091 views |
  • submit to reddit

When I decided to blow through "Seven Languages in Seven Weeks " in only 7 days, I had yet to read even the introduction to the book. I can tell now that Bruce might prefer that I not do it this way, and I have to admit it would truly be a focused experience to do all the suggested exercises on each language, spending only one day on each. But... I'm on a schedule, and I'm not pretending to come out of this with the level of understanding that he aims to cultivate. At least not on this first run through the book.

First, some notes about his introduction. Bruce describes up-front how he'll contrast the different languages: the typing model, programming model, language constructs, data structures, and any other features that distinguish a language. I really like this set of abstractions, and the simple fact that he lists and describes them before launching into the first language. He also says he's not going to burn space describing how to download and set up each language's environment, thus allowing him to focus on the language itself. It's nice to see a book with this much thought put into it.

The first language, Ruby, appears to be the language (of these 7) in which he is strongest. I left scientific development for business development quite a few years ago, at which point I was rather proficient with Perl (version 4, to tell you how long ago that was). Since then I've been immersed mostly in Java and C# on Windows . I've always thought that it would be cool to pick up Ruby, but have never got around to it. Finally, I'm spending one day on it. :)

Bruce starts by sharing his interview with Yukihiro Matsumoto, the creator of Ruby (nice touch), then talks about Ruby's pure-object-oriented typing model. After using Java for 14 years, it's refreshing to be able to call a method on what appears to be the numeral 4! ;-> Ruby is (mostly) strongly-typed, but also dynamically typed. He then covers function definition, collections, code blocks, classes, and mixins. And this is just by the end of the 2nd day of the week he allots to studying Ruby. This is just my opinion, of course, but it's not often I've seen someone so proficient at introducing relevant features of a language in an order that is so intuitive -- and useful -- to an experienced developer looking to evaluate a new language.

Day 3 of the Ruby chapter talks about Ruby support for metaprogramming, including open classes and modules. Here is where you can start to see Bruce's depth of knowledge about Ruby. He concludes the Ruby discussion with sections on the strengths and weaknesses of Ruby vs other languages.

In the interest of finishing in one day, I sped over most of the hands-on training. Following along and doing the suggested exercises would indeed fill a whole week, comfortably. I like this chapter so much that when the day comes for me to finally really pick up Ruby, I'm sure I'll actually start with this chapter.

From http://wayne-adams.blogspot.com/2011/03/day-1-ruby.html

Published at DZone with permission of Wayne Adams, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags: