Don’t learn Ruby the hard way

I’ll preface this by saying that I greatly appreciate the hard work that went into this book. From what I understand it was translated by a volunteer from the original Learn Python the Hard Way, and as well as being available for sale in various eBook formats, it’s also available for free on the website.

I have been learning Ruby through reading Eloquent Ruby, taking the Codecademy Ruby course, doing the ‘Learn Ruby the Hard Way’ exercises, and tinkering with my own projects.

  • Eloquent Ruby has been great at teaching me best practices, common pitfalls, and general good foundation knowledge
  • Codecademy I’ve found a little too easy, but I have enjoyed the exercises for the very prompt feedback and practical exercises
  • My own projects have obviously been the most interesting to me, but wouldn’t have been of that much use on their own since I would have probably Googled any problem I became stuck on and simply copied the highest rated answer. The end result would be poorly put together code that technically worked, but was unmaintainable

This leaves ‘Learn Ruby the Hard Way’. At a glance, it appears like a great way to learn – a code sample, an explanation, and finally a few exercises to extend the sample. Unfortunately, most of the exercises are about discussion and reflection of the prior sample (e.g. “Start at the bottom and read each line backwards, saying all the important characters”) and too few about actual programming.

However, some exercises I certainly felt were useful (e.g. exercise 26) so I have decided to complete the series and simply skip the remainder where I feel my time would be better spent learning from another resource.

As a final point I wanted to highlight, I’m not sure if this is the suggested approach for Ruby, but I couldn’t help but cringe when I read the following remark in exercise 36 (Designing and Debugging):

Tips For Debugging
Do not use a “debugger”. A debugger is like doing a full-body scan on a sick person. You do not get any specific useful information, and you find a whole lot of information that doesn’t help and is just confusing. The best way to debug a program is to use puts or p to print out the values of variables at points in the program to see where they go wrong.

Leave a Reply

Your email address will not be published. Required fields are marked *

*