I have used several different programming languages in my career as a programmer and I had to learn Ruby for my job so a colleague recommended this book and I read it front to back. I’ll start by describing some of the shortcomings, since they lead to some exasperation that I think could have been avoided if I had been aware of them first. The first few chapters have exercises which are helpful to demonstrate and reinforce what you’ve been learning. But I had some problems with some of the exercises. One problem was that sometimes the solutions to the exercises were in the downloadable code available at the publisher’s website, but sometimes the solutions are not available. While there are not a lot of exercises overall, this was a source of frustration. Another source of frustration with the exercises is that there are several exercises where the solution involves a concept or tool that has not yet been introduced in the text. I know this because there was at least one exercise where the authors provided a solution and I could see that they used something that hadn’t been covered in the text yet. I think there was at least one other exercise that used a future concept but I’m not positive because it was one of the exercises they did not provide the solution for.
The code in the text, as well as the code in the downloadable code from the publisher, has bugs in it. This was really frustrating to deal with because as a beginner it can be very hard to understand what is going on when you copy and paste some code and it won’t run. You wonder, do I have a different (i.e. wrong) development environment? Did I install Ruby wrong? How can I as a beginner debug a strange programming language I’m just learning? This seemed to happen to me a lot and I stumbled upon the publishers website for this book where they let readers discuss it and it appears many others have experienced these issues. Some readers were kind enough to offer corrections there and I recommend following the discussion on that website if you want to avoid the frustrations of running some of the code with bugs. At least you can refer to that online forum to know that it is not just you having these problems.
I think it’s kind of mind-boggling that this is the 3rd edition of the book and they haven’t corrected so many errors, especially bugs in the code. (The actual text seems to be very well proofread, it’s mainly the code where there are problems.)
I don’t want to make it sound like there is an error on every page - there isn’t, it’s just that when you are a student trying to learn a new programming language it’s very frustrating to be given code with the impression that you can just copy and paste it and it will run fine and it in fact will not run fine. Also being given exercises that you can’t conceivably complete until you learn how to apply concepts that haven’t even been introduced yet is very frustrating. A little before half way through the book the authors did seem to mostly give up on giving the reader exercises which, while I missed having an opportunity to demonstrate my new knowledge, was honestly kind of a relief.
I did find the authors’ habit of sort of getting into the weeds annoying too, but others may appreciate this. They are less interested in providing practical hands-on knowledge and experience and more interested in explaining Ruby under the hood and pointing out some of its broad capabilities. For example, when discussing dates they showed how to determine what a date according to our current calendar would have been prior to the calendar reform of 1752 in England. It’s great that Ruby can help you pull it off, but I don’t know who is going to make use of this and I’m not sure it really has a place in what is essentially a textbook for beginning Ruby.
What’s good about this book is that it is very thorough, maybe even too thorough. The authors walk you through many, many different areas of Ruby, from setting up Ruby on your system right through to many advanced concepts. It starts out with the basics like objects, classes, and modules, then moves on to very useful subjects like regular expressions and conditionals. In the last few chapters the authors make comments like, ‘you probably only need a reading knowledge of this concept’, or, ‘you probably won’t ever want to do this, but this is how to do this’. For some, this will be evidence that this is a very comprehensive introduction to Ruby, for others, this will be evidence that the editors should have intervened to remove some of this extraneous material. As for me, I’m glad it’s there but I’m not sure how useful it will be to me or other readers.
Overall I think this is a good introduction to Ruby. It’s very comprehensive and the many different areas of Ruby that it covers are well-organized into a complete course on Ruby. While I did find a lot to dislike about the book and wish the code had fewer bugs I think that a reader picking up this book with the knowledge that there are those problems might not have as frustrating an experience as I had. This book should leave you with a good understanding of Ruby overall.