083 RR Decomposing Fat Models with Bryan Helmkamp




The Ruby Rogues show

Summary: Panel Bryan Helmkamp (twitter github codeclimate.com) Josh Susser (twitter github blog) David Brady (twitter github blog ADDcasts) Avdi Grimm (twitter github blog book) Katrina Owen (twitter github blog) Charles Max Wood (twitter github Teach Me To Code) Discussion 02:01 - Best of Parley Code Quality by jnanney 02:23 - Code School’s Ruby Bits 1 Course FREE! 04:21 - 041 RR Code Metrics with Bryan Helmkamp 04:40 - Code Climate Blog Twitter 06:21 - 7 Patterns to Refactor Fat ActiveRecord Models 10:05 - Don’t Extract Mixins from Fat Models Use composition, not inheritance Mixins to patch together objects which are working together through composition 15:49 - Recognizing an object that is hiding in a big class Code Climate scores Look for methods that have repeated words 17:41 - Value Objects Helper Methods 25:21 - Why Ruby Class Methods Resist Refactoring Global variables When is it good to use class methods? 37:26 - Skinny Controllers; Fat Models 39:32 - Your Objects, the Unix Way by John Pignata Open/Close Principle Decorators Picks The Happiness Project by Gretchen Rubin (David) How To Win Friends and Influence People by Dale Carnegie (David) 24 Pull Requests (Katrina) Pan Frying: Testing for Proper Pan Heat (Rouxbe Cooking School) (Katrina) Fashion It So (Josh) Very Scary Solstice Carols (Josh) Blue Microphones: Snowball (Avdi) 7 Dwarves (Avdi) Oversized Low-Profile Creeper (Chuck) Floor Jack with Rapid Pump, 2.5 Ton (Chuck) brakeman (Bryan) GORUCO (Bryan) Next Week Zach Holman of Github Book Club The next Ruby Rogues Book Club Pick will be Practical Object-Oriented Design in Ruby: An Agile Primer by Sandi Metz. We will be interviewing Sandi on January 2, 2013, with the episode airing January 9, 2013. The publisher, Pearson/Addison-Wesley is offering a discount via InformIT.com. First create a user account: www.informit.com/join SAVE 40% When You Buy 2: www.informit.com/ruby Add books of choice to Shopping Cart, then enter the code SAVEONRUBY during Checkout (Includes FREE SHIPPING within the U.S.!) Transcript CHUCK: Let’s get your best evil laugh. BRYAN: [evil laugh] JOSH: OK that’s going into the show opener. [laughter] DAVID: Show opener? That's going as my ringtone! [laughter] BRYAN: It’s already my ringtone. [laughter] JOSH: I wanna like… something… there's going to be something on Code Climate that when it throws a red flag, [chuckles] it does that. CHUCK: Oh there you go. [Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net] [This episode is sponsored by JetBrains, makers of RubyMine. If you like having an IDE that provides great inline debugging tools, built-in version control, and intelligent code insight and refactorings, check out RubyMine by going to jetbrains.com/ruby] [This podcast is sponsored by New Relic. To track and optimize your application performance, go to rubyrogues.com/newrelic] CHUCK: Hey everybody and welcome to episode 83 of the Ruby Rogues Podcast! This week on our panel, we have Josh Susser. JOSH: Hey everyone! CHUCK: David Brady. DAVID: In the unlikely event of a water landing, your headphones can be used as a floatation device. CHUCK: Avdi Grimm. AVDI: Hey from Pennsylvania! CHUCK: Katrina Owen. KATRINA: Hello! CHUCK: I'm Charles Max Wood from devchat.tv and this week, have a special guest – it’s Bryan Helmkamp. BRYAN: Hi everyone! DAVID: We are missing someone today. CHUCK: Really? JOSH: Yeah. Where is James? AVDI: Haven’t seen him. DAVID: James can’t be here today because he’s tutoring the pope in the scientific method. CHUCK: All right. JOSH: We’ll go with that. DAVID: Yeah. CHUCK: All right. So we have a couple of announcements before we get going. The first one I'm going to let Katrina give us the Best of Parley.