Customer Reviews: Rails AntiPatterns: Best Practice Ruby on Rails Refactoring (Addison-Wesley Professional Ruby)
Your Garage botysf16 Amazon Fashion Learn more Discover it $5 Albums Fire TV Stick Patriotic Picks Shop-by-Room Amazon Cash Back Offer roadies roadies roadies  Amazon Echo  Echo Dot  Amazon Tap  Echo Dot  Amazon Tap  Amazon Echo Starting at $49.99 All-New Kindle Oasis AutoRip in CDs & Vinyl Segway miniPro STEM

Customer Reviews

4.7 out of 5 stars13
Your rating(Clear)Rate this item

There was a problem filtering reviews right now. Please try again later.

on March 17, 2011
I'll be honest, prior to reading this book I was starting to lose faith in Ruby on Rails authors. As a beginner to Rails, I've read a number of books to try and make sense of all the black magic going on behind the scenes as well as how to write great code in Rails. Many of those books were either "paint by number" tutorials where you didn't really learn anything appreciable or very complete (and hard to comprehend) reference manuals for everything there is to possibly know about Rails.

I just needed a good in between book! This book not only exposes you to the Rails Way of writing code in Ruby on Rails, it also gives many of the opposing examples which I would more than likely stumble down not knowing any better.

Not only that, but this is one of the most logically organized books I have ever had the pleasure to read. Everything flows together very nicely and is very understandable for beginners let alone more advanced users.

I would recommend this book in a heart beat (and I already have... many, many times). Great job guys! I really appreciate the effort you put into writing this book! You have restored my faith in Rails authors!
11 comment|24 people found this helpful. Was this review helpful to you?YesNoReport abuse
on June 15, 2011
All too often, the 'patterns' books only develop a greenfield example the 'right' way. This is hopelessly optimistic, especially if (as is the case for me) you're teaching undergraduates how to use design patterns; they're not going to get it right the first time. So *refactoring* code that has "grown bad" to use a good pattern is a much more frequently needed skill.

There are other books on refactoring for Ruby, like Martin's, but i like that this one focuses on design patterns and specifically on how to leverage Ruby's features to realize the patterns nicely.

My future coverage of design patterns in Berkeley's undergraduate software engineering class will be motivated by the examples in this book.
0Comment|10 people found this helpful. Was this review helpful to you?YesNoReport abuse
on December 9, 2010
This book makes a great companion to Martin Fowler's Refactoring book (or the Ruby version of it by Jay Fields). As someone who's still accumulating the theoretical 10,000 hours of experience it takes to master something (Ruby/Rails), it's nice to have guides like Chad and Tammer there to suggest improvements to my technique. Highly recommended for anyone novice or intermediate Rails developer.
0Comment|8 people found this helpful. Was this review helpful to you?YesNoReport abuse
on July 26, 2014
The ideal and essential book for intermediate level people learning rails. You've gone through the guide(s), maybe even micharl hartl's, or baserails (excellent, not so well known resource btw). Now, what? How do you build your own complex idea that have more than just has_many associations, or are clones of popular apps? What does fat model actually mean in practice? How do I loosely couple and APPLY law of demeter?

This book is not just about what not to do, or refractoring things to that it's extra "rails-y". The reason it's so valuable for intermediate developers is because by seeing the recommended ways to implement, and organize your code, against anti-patterns (aka bad practices that don't fully utilize what rails designed to make neat and concise), you get to LEARN the rails methods and features that don't even show up in all of the beginner rails tutorials in out there, and you get to learn exactly how to USE methods and features that rails has to offer without going into ultra low level ruby that leave you scratching your head, and frustrated.

Just like how object oriented design philosophy tells you to use interfaces to not care about the detailed implementation of distant objects, so too should teaching something relatively complicated and confusing like a framework teach you how and what to use its methods and features without bogging you down with every single detail about the method, or approaching it from such a highly academic, and non-practical way. This book does just that. It gives you a bad example, explains the most useful and practical way of improving it, shows you the new example (even multiple examples as it increments the improvements by illustrating one concept at a time), and you end up with the knowledge to APPLY those principles concretely to your own app you might be building. APIs, the guides, even apidock doesn't do this that well. As good as stack overflow is, it's quite difficult to get to know rails well as an intermediate level learner of rails, since SO's answers are often not organized, go into too much or too little detail, can be targeted at advance level developers, as well as you not knowing what you should study next.

Sandi Metz's design patterns in ruby book is extremely well written, and rated extremely highly. You will see the similar styles, intentions of conveying thorough, but concise knowledge of practices, and also find it very useful. while object oriented programing in ruby is important, and very good, you will end up not knowing how to implement it, as it is rather distant from rails. This book is what you should read before Sandi's book, where it's in a similar style, but very applicable and very actionable to rails, and your project(s) that you may be building for a portfolio to land that junior rails developer job.

I'm very surprised this book doesn't have that many reviews. I think it is truly one of the essential books in the track for someone who wants to become a senior developer from zero programming familiarity. This book fills an essential gap in the spectrum of difficulty and progress.

P.S. to those who say this book contains too many useless, and obvious bad design patterns: where did you learn these concepts before? I couldn't find many good resources. Even if they're out there, curation is quite a valuable thing. Any review like that should be cognizant of the level of experience imo. Perhaps this book is not as good for seasoned rails developers. But it is truly one of the best and rare resources that fills a ladder rung in the path from beginnerhood to expertise. Again. I'd love to know where other rails developers learned the patterns and practices if not from this book. While working in a company with experienced developers? Well, not everyone has that kind of access to resources. To some, it's a catch-22, where you need to build a portfolio to get a job to get mentored. Disregarding all of that, it's still useful to not to have to rely on person-to-person training, or have to rely on reading the source code. Some people truly are great at code, and can read source code from ground-up as a primary learning method. Some are already seasoned in ruby and rails enough to read it as well. I think seasoned developers are too ignorant of this reality. Others have different learning styles. Some teaching methods are simply statistically faster, easier, and more effective. And for sure that method is not reading the source code.

Disclaimer: I have NO ties or conflicts of interest with any of the resources mentioned in this review.
0Comment|4 people found this helpful. Was this review helpful to you?YesNoReport abuse
on February 16, 2014
I'm currently teaching myself Rails development largely via Ryan Bates' RailsCasts and endless StackOverflow comments. While this is rather effective at getting apps up and running quickly, I'm often left with code that I don't fully understand, and which I suspect is not written as well as it could be. This book was a pleasure to read, and it had an immediate impact on my work. The examples of what not to do, why not to do it, and how to fix it are very well laid-out, easy to follow, and surprisingly nonjudgmental. Definitely five stars!
0Comment|2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on February 3, 2011
While the book certainly seems geared toward the novice/intermediate Rails developer, I still loved it even after building Rails apps for several years. The advice was divided for me among three categories - stuff that I already know and do on a regular basis, stuff that I know but *don't* do as often as I should, and practices that were new to me. Admittedly, there isn't a ton of info in the book that falls into the latter category, but it is in there, and it's stuff you won't find in any other book. It would be worth reading even for just those nuggets.

What took me by surprise, though, was how much of the book reinforced concepts I was already partially familiar with but haven't been disciplined enough to practice regularly, and practices that I follow regularly but didn't fully grasp why. This book lays it all out, and with real world examples. Everything I read in the book I can apply to the projects I work on everyday. Whether you're new to Rails or an old hat, this book *will* help you write better Rails applications. Read it, think about it, and apply it.
0Comment|2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on January 3, 2011
Every section of every chapter of this book provides practical refactoring advice, and for every section I've found myself putting the book down in order to dig into my current project and apply concepts presented.

The book covers common errors seen in all aspects of a rails project: models, controllers, views, helpers, services, routes, authentication, using third party libraries, testing, performance, scaling, deploying, and exception handling.

This is not a book for learning how to write rails applications. I believe it is a book that would be best suited to someone who has at least some previous experience with rails applications. It's very useful to have made the mistakes that are covered, to have had to fix bugs, maintain, and extend code that contains these code smells, and to have made the choices that lead to the various antipatterns described.

Without that pain, I don't think you'll get much in the way of epiphanies.
11 comment|8 people found this helpful. Was this review helpful to you?YesNoReport abuse
on June 13, 2013
This book each rails dev should read more than once, it so well written and examples are really good. It contains day to day problems which Rails developers are facing and making bad practice decisions.

I must say, I highly recommend each beginner to buy this book along with any beginner level book
0Comment|One person found this helpful. Was this review helpful to you?YesNoReport abuse
on May 31, 2011
This book rules. There are so many good suggestions and I would say almost every Rails developer has encountered these messy situations before and scratched their head wondering what the best approach is to tackling it.

The book does get a little lost at points, especially in the Controller and Views section. Walking through how to use the Clearance and Authlogic gems seemed to be a bit tangential.

All in all, well worth reading, and perfect for those who have outgrown the glut of introductory level books but are still figuring out best practices.
0Comment|One person found this helpful. Was this review helpful to you?YesNoReport abuse
on August 25, 2011
I am not a ROR expert by any stretch (I have been coding on it for about 10 months) however I was able to digest this book in about 2 hours and this few months back. The explanations are extremely clear, some of the lessons are sounds others are pretty obvious. For example I found the chapter on Views (ch. 3) and the one on Controllers (ch. 4) quite useful, while ch. from 6 to 8 not so much.

Overall a very useful book for novice, almost a must-have I would say. Not so much for more advanced programmers.

My suggestion is check the book out before you buy it.
0Comment|7 people found this helpful. Was this review helpful to you?YesNoReport abuse