Review of 'Toy Robot' by Ryan Bigg
Published on 02 Feb 2017
by Alexander Garber
Toy Robot by Ryan Bigg (@ryanbigg) is an excellent walkthrough for a budding Rubyist, especially one that has worked through Learn Ruby the Hard Way. (As I have!)
Bigg is a veteran Ruby developer and prominent member of the Ruby and Rails community in Melbourne, Australia. His blog is a valuable resource for both novices and experts. The book weighs in at just over 100 pages and strikes a balance between technical jargon and clear, simple prose. His descriptions of the rationale for his approach shed light on the code blocks in the book, and are very helpful to a novice like me.
The book describes itself as "A Walkthrough for The Toy Robot", which is misleadingly accurate, for the term "walkthrough" conjures up images of a many happy hours spent on old-school click-and-point adventure games. (King's Quest comes to mind)
This is not a "walkthrough" in that sense. Rather than simply prescribe the steps for building a Ruby solution to the toy robot problem, Bigg's book takes the reader on a full test-driven-development journey of writing tests, making them fail, making them work, and making them fail again, until every class, module, method, and function has been thoroughly vetted.
The book demands that you see for yourself how to outline the problem, write tests for each-and-every detail of the software and allow testing (and especially test failures) to guide you through the process.
Having spent 18 tight pomodoros (20-minute blocks), i.e. six hours on this book, I cannot now duplicate every detail of the book's solution to the problem, but whereas before it was insurmountable, it is now assailable. My solution would not be as tight, but it would get there. The lion's share of my learning came not from memorising what the book does, but rather from poring over the output of the failed tests to understand what went wrong, and sometimes why my test failures were different from the book's.
For this reason, I strongly recommend that you NOT copy and paste, but rather type out every line of code for yourself, and run all the tests to see the results. I promise you will come to see the HOW and WHY of Bigg's elegant solution to the toy robot problem.
The book is available in PDF, EPUB, and Mobi formats and is available for as little as $5, although I hope you will find it in your heart to spend at least $10 in recognition of this author's fine work.
Rating: 5/5