I just finished reading Confident Ruby by Avdi Grimm.
I’ve been writing a gem that contains a class that initializes with a very specific argument — an array of twelve strings, each of them having their own specific requirements. It’s the kind of stuff that is very easy to get wrong, as well. I had quickly perused the book before, so I had an idea of the subject matter. I wanted to handle edge cases and incorrect parameters quickly and cleanly, one of many things addressed by the book. It seemed like the perfect time to read it in depth.
I’m glad I did. The code in that class is much shorter and clearer than it would have been otherwise. The book does a much better job than most at addressing the “why” and not just the “how”. Overall, I’d highly recommend it.