Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Confident Ruby

Rate this book
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.

296 pages, ebook

First published June 5, 2012

53 people are currently reading
489 people want to read

About the author

Avdi Grimm

4Ìýbooks253Ìýfollowers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
191 (51%)
4 stars
146 (39%)
3 stars
31 (8%)
2 stars
2 (<1%)
1 star
1 (<1%)
Displaying 1 - 27 of 27 reviews
Profile Image for Katherine.
149 reviews
October 18, 2014
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.
Profile Image for Michael.
162 reviews73 followers
September 1, 2014
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.
Profile Image for Artur.
238 reviews
April 20, 2020
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.
Profile Image for Nitish Parkar.
45 reviews1 follower
December 20, 2020
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.
Profile Image for Brett Chalupa.
144 reviews3 followers
Read
December 18, 2019
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.
Profile Image for Ryan.
13 reviews
January 27, 2019
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.
Profile Image for Ender Ahmet.
94 reviews22 followers
July 28, 2020
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 :)
Profile Image for Sai.
97 reviews12 followers
January 2, 2017
Lots of Ruby tips and tricks by the guy who runs OO class with Sandi Metz. Worth reviewing every once in a while
Profile Image for Alex Fürstenau.
190 reviews14 followers
October 13, 2019
Great read. Showed a lot of interesting ways on how to use Ruby in different circumstances.
1 review
May 5, 2020
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.

Profile Image for Jeremy.
58 reviews1 follower
September 17, 2018
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.
Profile Image for Katherine.
882 reviews42 followers
June 29, 2015
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.
Profile Image for Karim El-Husseiny.
6 reviews4 followers
August 29, 2015
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!
Profile Image for Waiyan.
23 reviews
May 18, 2016
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.
Profile Image for Alpha.
449 reviews10 followers
September 18, 2013
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.
Profile Image for Florencia.
46 reviews9 followers
July 30, 2016
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.
1 review
April 8, 2014
Very good examples in book. Good starting point to finally understand Ruby magic.
Profile Image for Andy Wang.
10 reviews
June 22, 2014
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.
49 reviews10 followers
August 28, 2014
Bag of techniques to make your Ruby code suck a bit less
Profile Image for Melanie.
14 reviews
January 22, 2015
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.
Profile Image for Serene.
42 reviews
February 9, 2016
Super accessible and actionable information, with the added bonus of clearly being written with non-academic code examples.
37 reviews
April 29, 2016
a very good collection of patterns and techniques for making code easier to maintain.
Displaying 1 - 27 of 27 reviews

Can't find what you're looking for?

Get help and learn more about the design.