$30 off During Our Annual Pro Sale. View Details »

The Dilemma of Simplicity

The Dilemma of Simplicity

Over the years we've learned to pay attention to the importance of a number of highly desirable qualities in software: readability, maintainability, adaptation to change. We've accepted these values as good and actively pursue them yet we consistently ignore what is probably the best method of achieving these qualities, it's staring us right in the face now.

Slowly but steadily the philosophy of embracing simplicity in software design by carefully calculating and minimizing unnecessary complexity is gaining traction in our community, and for a good reason: it organically pushes us to the best software practices we all know and love, it both embraces all the core principles the ruby community has developed over the years while rejecting many of the common practices we carry based on inertia but which directly contradict these values.

In this talk I explore my journey on this shift in perspective from certain fragments of our community and how thinking about simplicity as one of our core values can push us to be better developers while producing better quality of software. We don't need our crutches anymore, let's drop them together!

Pablo Astigarraga

April 26, 2014
Tweet

More Decks by Pablo Astigarraga

Other Decks in Programming

Transcript

  1. Dilemma
    Simplicity.
    The of

    View Slide

  2. @poteland
    !
    "

    View Slide

  3. View Slide

  4. Thanks
    AP.Rb!

    View Slide

  5. Sorry!

    View Slide

  6. View Slide

  7. Simplicity

    View Slide

  8. Act I
    of needs and solutions

    View Slide

  9. Quality

    View Slide

  10. User Experience

    View Slide

  11. Reliability

    View Slide

  12. Security

    View Slide

  13. Maintainability

    View Slide

  14. Performance

    View Slide

  15. They
    Matter

    View Slide

  16. Act II
    of hype and definitions

    View Slide

  17. Buzzword

    View Slide

  18. Definition

    View Slide

  19. View Slide

  20. Definition

    View Slide

  21. Not Trivial
    :\

    View Slide

  22. @tiodante

    View Slide

  23. Perception

    View Slide

  24. class SessionsController < ApplicationController!
    def new!
    ! ! !
    render :new!
    end!
    end!
    @model = FictionalModel.last

    View Slide

  25. View Slide

  26. View Slide

  27. Perception
    (again)

    View Slide

  28. class SessionsController < ApplicationController!
    def new!
    ! ! !
    render :new!
    end!
    end!
    @model = FictionalModel.last

    View Slide

  29. `rake middleware`

    View Slide

  30. class SessionsController < ApplicationController!
    def new!
    ! ! !
    render :new!
    end!
    end!
    @model = FictionalModel.last

    View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. class SessionsController < ApplicationController!
    def new!
    ! ! !
    render :new!
    end!
    end!
    @model = FictionalModel.last

    View Slide

  38. View Slide

  39. Hidden
    complexity.

    View Slide

  40. What if it
    breaks?

    View Slide

  41. (╯°□°)╯︵ sʃıɐᴚ

    View Slide

  42. Rewrite it in
    Node!

    View Slide

  43. Still need a
    definition :(

    View Slide

  44. CHEAT.

    View Slide

  45. ★。★。★。★

    ☆ 。☆。☆

    ★。\|/。★

    ¯\_(ツ)_/¯

    ★。/|\。★

    ☆ 。☆。☆

    ★。★。★。★

    View Slide

  46. When does
    complexity
    matter?

    View Slide

  47. confront
    When you
    it.

    View Slide

  48. Unix.

    View Slide

  49. “Something
    that can be
    understood
    quickly”

    View Slide

  50. Smaller
    Stack

    View Slide

  51. Act III
    of life and choices.

    View Slide

  52. How does this
    change
    anything?

    View Slide

  53. What about
    the ISSUES?

    View Slide

  54. User Experience
    uri = URI('http://example.com/index.html')!
    params = { :limit => 10, :page => 3 }!
    uri.query = URI.encode_www_form(params)!
    !
    res = Net::HTTP.get_response(uri)!
    !
    puts res.body if res.is_a (Net::HTTPSuccess)

    View Slide

  55. User Experience
    payload = {'key1': 'value1', 'key2': 'value2'}!
    !
    r = requests.get(!
    “http://httpbin.org/get",!
    params=payload!
    )!
    !
    r.status_code

    View Slide

  56. Intuitive

    View Slide

  57. Understandable

    View Slide

  58. Python

    View Slide

  59. Reliability

    View Slide

  60. 100 features
    =
    1 bug

    View Slide

  61. More features
    =
    More bugs

    View Slide

  62. Less features
    =
    Less bugs

    View Slide

  63. Bugs are
    unavoidable

    View Slide

  64. Simple stack
    =
    Easier to fix.

    View Slide

  65. Simple
    =
    (more) reliable.

    View Slide

  66. Security

    View Slide

  67. More features
    =
    More bugs

    View Slide

  68. More features
    =
    More vulnerabilities

    View Slide

  69. Rails.

    View Slide

  70. Maintainability

    View Slide

  71. Understand
    Rewrite

    View Slide

  72. Simple to
    understand?

    View Slide

  73. Simple to
    maintain.

    View Slide

  74. Performance

    View Slide

  75. Stuff = Time

    View Slide

  76. More Stuff
    =
    More Time

    View Slide

  77. Simpler to find
    bottlenecks.

    View Slide

  78. Symptoms of
    Complexity.

    View Slide

  79. Don’t focus
    on the
    symptoms.

    View Slide

  80. Reduce
    complexity.

    View Slide

  81. Strive for
    simplicity.

    View Slide

  82. Everything
    else will
    follow.

    View Slide

  83. Epilogue
    of winning a losing battle

    View Slide

  84. @soveran

    View Slide

  85. Features
    =
    Complexity

    View Slide

  86. Tradeoffs

    View Slide

  87. Make
    conscious
    choices.

    View Slide

  88. Thank you!

    View Slide

  89. View Slide

  90. Questions!

    View Slide

  91. Resources

    View Slide