For many programmers, discovering Ruby is a revelation. They are overjoyed by how elegantly and succinctly they can state problems in the language. But then the real world creeps in, and that joy gradually wanes as the code becomes cluttered with distracting edge case scenarios, error handling, and checks for nil.Confident Ruby is a guide to recapturing the joy of writing Ruby by employing small patterns and stylistic choices to make each method tell a coherent story. Over the course of 32 patterns, you’ll learn how to isolate uncertainty at the borders of your code; how to avoid repetitive conditionals; and how to liberate your code from the chore of nil-checking. You’ll discover the four parts of a method, and how to use those parts to construct a narrative. Following along with real-world refactoring sessions, you’ll learn how to apply these lessons to legacy code.Whether you are a novice or an experienced Ruby hacker, this book will help you become a more confident and joyful programmer.
There are specific improvements I learned for the first time by reading this. Most of what's written however is something I have already known through work. It's great to read this along with Sandi Metz' book on object-oriented programming with Ruby.
As a Rubyist you probably already know Avdi Grimm and have read something by him, be it a book or some blog posts. What I particularly like about his writing is that while tackle all the common pitfalls in everyday software development, he generally doesn't offer one-size-fits-all solutions, but is willing to explore a range of possible alternatives. "Confident Ruby" is a book you can learn a lot from, especially if you don't "just" read it, but instead use it as a base for reflecting on your own thoughts on coding and your personal habits and preferences.
I always liked Avdi's work, from his Ruby Tapas, to his blog and personal videos on handling rough time in his life, he seemed wholesome and decent human being to me and a great programmer of sort rarely met nowadays.
This book is a direct projection of his personal traits and view of how the programming should be done. And the book is really good, even though it is more of a collection of essays on how methods should work and play in the larger scale of programming a proper system and not a bigger grain work like books by Robert Martin or Donald Knuth.
Methods are an essential part of the programming, they are the smallest unit of separation in the programming system above a line of code and doing them right is a must for a system to strive and be maintainable. Avdi gets that feeling right and uses it to compose a comprehensive body of techniques, tricks and guidelines on how to perform work, handle failures, collect input and deliver results. Everything is shipped with a handful of examples for any kind of advice and a larger combination of refactoring techniques by example in the end of the book. Even though I knew some of the low-level patterns of writing methods described in the book, they were described in the way that gave me some food for the thoughts and I am sure I will get back to Confident Ruby from time to time to brush up my knowledge.
Another important theme of the book is right in the title. Confident Ruby. Programming with confidence may sound easy, but is harder than it seems with all the troubled and haphazard inputs that can come from the real world, legacy systems or even rusted parts of our own infrastructure. In order to do it right one should think of properly setting barriers and separating concepts letting system to be sure of what it is to receive from the outside. Avdi handles that great and the book lives up to its title.
This book is full of little practical nuggets that you can start applying immediately. If you have been using Ruby for a while, you would’ve come up with some of these on your own. Still, it is useful to know little gotchas with them. The analogy of ‘choose your own adventure books� is spot-on. The section on thinking about methods in terms of messages and roles is super useful. It is not one of those high-level design pattern books, rather it is a collection of patterns you can apply at the method level. Overall, this book will definitely improve your Ruby chops and make you a more confident Ruby developer.
A real joy of a book to read. Each chapter and sections is presented as a recipe for how to write more confident code � code that is clear in its intent. While quite a few of the recipes are Ruby specific, I think the core patterns presented throughout are applicable to anyone interested in Object Oriented programming or method design. I’ve been applying the approaches Avdi lays out in the book while reading it, and it’s already made a positive impact on the code I write.
There's a lot of great advice in this book. This isn't a book on learning the Ruby language, but rather how to write Ruby code that is "clear, idiomatic, and tells a straightforward story." Both intermediate and experienced Rubyists will find much to learn or identify with. I especially enjoyed the sections on Ruby's conversion protocols, which I haven't seen formally described elsewhere.
okumasi o kadar kolay olmayan bu kitaptan Ruby bilmeyenler uzak dursun bence :) Avdi kendi tarzinda cok guzel bir kitap yazmis ama yeniler icin agir bir kitap. Icerisinde cidden bakis acisinizi degistirecek bircok bilgi var. Ama dikkatli okumak lazim :)
This book is a must-read for developers that know the basic and want to learn more advance technics I enjoy reading this book, I thank the author for this gift.
This is hands down one of the best short, practical books on Ruby I have ever seen, and it was well worth the price. It's full of advice and insights that you can put to use right away, and Avdi puts things together in surprising ways sometimes. His "Exceptional Ruby" is another essential book, even though there's some overlap here. His approach to problems is unique, interesting, and thought-provoking, and I wish I had a print version of this book to keep on my desk for reference.
What a useful book to read for a Rubyist! I'm really glad I joined a second technical book club to read this book. The writing is very clear, the examples are generally not too difficult to understand, and there are rationales for when you would want to use these patterns that will help make those judgment calls. Also, the patterns are at a good level of detail--not too large where you might feel like, well I can't redesign all the objects in this legacy system I work with (like you might feel a bit after , as good as that one is too), but not too small that it's tedious stuff. Good insights here. I wish there were a way to get a physical copy of it for easier referencing.
As I heard before I read it, this book increases the joy while writing Ruby programs. Avdi sets down a catalog of alternatives for thinking of how to design and write a confident code. He demonstrates several techniques to be resonated and become regular tools in any ruby hacker's toolbox by arriving a solution which is clear, idiomatic, and tells a straightforward story. Such a great book!
This is the Ruby programming book I'm always looking for. Being a Ruby/Rails developer, I've put in countless of if and else statement just to hide all the possible errors away, but over time it's bushing the system and it's getting harder to maintain by time. After reading this book I feels like I'm going to refactor the entire project by using most of the methods explained here.
Lots of good stuff, especially for people who aren't too familiar with Ruby. If you read enough source, you'll see these patterns in the better libraries, but it's nice to have these explicitly stated and thought through.
This is the first programming book I've read that was actually useful immediately as I was reading it. I'm reminded of things it mentions pretty much every day while I work. Will be buying all of Avdi Grimm's other books, I'm so impressed.
I really like this book. This book provides a lot of small patterns (like idioms) that I can apply in my work immediately. However to remember all these, I need to re-read it two or three times.
Fantastic read for any Ruby programmer. Avdi somehow wrote the examples in this book in a way that they stuck with me better than the average programming book. Highly recommend.