Believe it or not, Ruby is 21 years old and one of the hottest programming languages out there. Not only because of its features, but also because it has a quite vibrant and active community supporting it. This resulted in many projects being developed in Ruby: Redmine, Puppet… Learning Ruby, even if just the basics (you don’t want to write Puppet Facts in Python, do you?), is becoming an essential skill required in the power-tools belt of any developer or DevOps out there. This popularity is reflected by a lot of documentation available. We curious people also have quite a rich selection of titles to pick from in case we prefer a book. Beginning Ruby: From Novice to Professional is an introductiory text that is meant to get anyone started with the language and its core features.
Released back in 2009, this second version covers Ruby 1.9, which is now kinda outdated. It is meant to teach beginners the basics of the language, so that most of the concepts, which include the core data types and object oriented programming, are still valid and valuable.
It is quite a big book, which could be roughly split into three parts: the first focuses on the Ruby philosophy and history. The reader is introduced to the basic concepts of OOP and their role in Ruby. We are also shown how to install Ruby and how get started with the interactive terminal. No word is said about RVM, though, which is now the de facto Ruby version management system. The second part of the book dives, instead, into the core of the language: everything is an object, so do expect classes, inheritance, encapsulation and all that comes with it. The basic data types are also presented and used through Hello World! like examples. Finally, the last part of this title is dedicated to more “advanced” topics, such as Ruby on Rails and distributing gems. Here the author gives the readers a quick taste of what Ruby can do, without really going deep into any of those subjects.
While the topics chosen by the author are pretty much appropriated for an introductory text, the book is, overall, hard to read and, mostly follow. The concepts are explained in a very sparse way, which doesn’t really help someone new to get the big picture. As an example, when the author discusses encapsulation, it first introduces the public and private access modifiers then, later on, in a different paragraph, comes out with ah by the way, there is a third way to hide data to the outside. I must admit that, if I did not know OOP already, I would have been lost. Another thing that definitely caught my attention was the chapter discussing projects and how Ruby searches through different paths for modules. Very little is shown and no real module is created and/or distributed. While not being a Rubyst myself, I severely doubt manually pushing entries into the PATHs array is the way to go.
Throughout the whole book, the examples are way too short and easy. While it is true that this is a book for beginners, they never go beyond the Hello World!‘s complexity. The reader never sees the true capabilities of Ruby in action.
Overall I am not happy with this book. This is the very first Ruby book I read so that I don’t have anything to compare it with. Still, I think this is not the right choice to get started, not only because it is very outdated, but also because it doesn’t take the reader hand by hand. The information is not complete and the reader is abruptly moved from concept to concept.
As usual, you can find more reviews on my personal blog: books.lostinmalloc.com. Feel free to pass by and share your thoughts!