Polished Ruby Programming – I thought I knew ruby until I read this book

Polished Ruby Programming: Build better software with more intuitive, maintainable, scalable, and high-performance Ruby code.

I’ve worked with a few languages over the last few years, and many people hear me saying “if you see my code and you can’t figure out who wrote it, that’s good work from me”.

Every time I’m coding something, I try to find out what’s the language way to do it. For example, what’s Rubys way to do it?. To be clear on this, if you apply most of the best practices about programing you will have 8 of 10 of what you need.

This book is about that 2 of 10, even I believe is 5 of 10 after checking most of it. It shows how Ruby works and the bits you need to have in mind when code is created. How to take advantage of ruby and many decisions when Ruby was designed.

Why you should care about this?

Performance: Ruby is very flexible, and you have more than one way to do something, but knowing some of the internals of the language will improve your results.

Maintainability: knowing how or when to use one option or another, will keep your code clean and easy to read/change. If you know when to use a Hash over an array, you will understand how that piece of code was designed, even if it’s a class to encapsulate something in particular.

Trade-offs: each decision has an impact, and knowing a trade-off when you decide to do something, is the best way to think in advance about your solution.

If you’re looking to improve Ruby’s skills, this is an excellent book.