083 RR Decomposing Fat Models with Bryan Helmkamp

    0
    107

    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

    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

    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.!)