Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Rich, Flowers, and Piles of Sh%#t - And What To Do About It

The Rich, Flowers, and Piles of Sh%#t - And What To Do About It

tl;dr: the single responsibility pattern is a good idea.

A lightning talk discussion of the problem of preferential attachment in software development. Presented at the Boulder Ruby group.

shagemann

April 16, 2014
Tweet

More Decks by shagemann

Other Decks in Technology

Transcript

  1. THE RICH, FLOWERS, PILES OF S%#T


    AND WHAT TO DO ABOUT IT
    Stephan Hagemann

    View Slide

  2. View Slide

  3. View Slide

  4. View Slide

  5. https://en.wikipedia.org/wiki/Preferential_attachment

    View Slide

  6. …any of a class of processes in
    which some quantity, typically some
    form of wealth or credit, is
    distributed among a number of
    individuals or objects according to
    how much they already have, so
    that those who are already
    wealthy receive more than those
    who are not.

    View Slide

  7. …so that those who are
    already wealthy receive more
    than those who are not.

    View Slide

  8. View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. LARGE RAILS CODEBASES
    • browsercms

    • calagator

    • canvas-lms

    • citizenry

    • diaspora

    • engine

    • fat_free_crm

    • fulcrum

    • loc_counts

    • onebody
    • opencongress

    • opengovernment

    • portlandcrime

    • railscollab

    • rubygems.org

    • skyline

    • snorby

    • spot-us
    • spree

    • teambox

    • tracks

    View Slide

  14. find app/models lib -iname "*.rb" -type f -exec wc -l {} \;

    |

    sort -r

    |

    awk '{print $1}'

    View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. –Stephan Hagemann
    “So, what do you do about it?”

    View Slide

  19. BILL?

    View Slide

  20. BILL!
    720000 kids

    View Slide

  21. FLOWERS?

    View Slide

  22. FLOWERS!

    View Slide

  23. YOUR CODE?

    View Slide

  24. YOUR CODE!

    View Slide

  25. START HERE:
    S ingle Responsibility Principle

    O
    L
    I
    D

    View Slide