Understanding IRB’s usefulness
In Chapter 3, we briefly saw the IRB shell, and I hope you noticed some of the similarities between IRB and our debugging tools. Basically, what these gems do is enhance IRB so that we can view variables in memory, move around execution points, and work in a “frozen” state of our program. At the end of the day, you will be able to choose which one of these tools is more convenient for your everyday use. I could steer you toward one, or you could simply use the built-in IRB. One technique I saw a fellow developer use was that he wrote most of his code in IRB, and once the code ran without problems, he would just copy the code from IRB into an IDE to save his work. This saved him a lot of time that he would have otherwise used on testing. Another coworker used a very popular IDE called RubyMine. This tool allows us to add breaking points at the touch of a button (among many other features). Additionally, one downside of using debuggers...