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

Build to Last

blowmage
October 10, 2015

Build to Last

How to design rails apps to avoid a rewrite in 5 years.

blowmage

October 10, 2015
Tweet

More Decks by blowmage

Other Decks in Programming

Transcript

  1. Build to last
    Build to last
    How to design rails apps to
    avoid a rewrite in 5 years

    View Slide

  2. O HAI

    View Slide

  3. Super excited!

    View Slide

  4. first post!

    View Slide

  5. larubyconf noobs?

    View Slide

  6. rubyconf noobs?

    View Slide

  7. ruby/rails noobs?

    View Slide

  8. programming noobs?

    View Slide

  9. Welcome!

    View Slide

  10. “the problem”

    View Slide

  11. “the pain”

    View Slide

  12. “the rewrite”

    View Slide

  13. “the question”

    View Slide

  14. “the answer”

    View Slide

  15. You’re doing it wrong

    View Slide

  16. You’re thinking about it wrong

    View Slide

  17. What is software?

    View Slide

  18. “instructions for
    a computer to follow”

    View Slide

  19. View Slide

  20. https://mitpress.mit.edu/sicp/

    View Slide

  21. “Our design of this introductory
    computer-science subject reflects two
    major concerns…”

    View Slide

  22. “First, we want to establish the idea that a computer
    language is not just a way of getting a computer to
    perform operations but rather that it is a novel formal
    medium for expressing ideas about methodology…”

    View Slide

  23. “Thus, programs must be written for
    people to read, and only incidentally for
    machines to execute…”

    View Slide

  24. “Second, we believe that the essential material to be
    addressed by a subject at this level is not the syntax
    of particular programming-language constructs, nor
    clever algorithms for computing particular functions
    efficiently, nor even the mathematical analysis of
    algorithms and the foundations of computing…”

    View Slide

  25. “…but rather the techniques used to
    control the intellectual complexity of
    large software systems.”

    View Slide

  26. intellectual complexity

    View Slide

  27. “Underlying our approach to this subject
    is our conviction that “computer science”
    is not a science and that its significance
    has little to do with computers…”

    View Slide

  28. “The computer revolution is a revolution
    in the way we think and in the way we
    express what we think.”

    View Slide

  29. we think about software wrong

    View Slide

  30. we express what we think
    about software wrong

    View Slide

  31. Big Ball of Mud

    View Slide

  32. “A big ball of mud is a casually,
    even haphazardly, structured
    system…”

    View Slide

  33. Its organization, if one can call it
    that, is dictated more by
    expediency than design.”

    View Slide

  34. http://www.laputan.org/mud/

    View Slide

  35. The Big Ball of Mud says:
    “You are not smart.”

    View Slide

  36. But you are smart!

    View Slide

  37. Techical Debt

    View Slide

  38. View Slide

  39. https://youtu.be/pqeJFYwnkjE

    View Slide

  40. Communicate ideas
    (intellectual complexity)
    in a better way

    View Slide

  41. Intent

    View Slide

  42. (sekrit sauce)

    View Slide

  43. View Slide

  44. Anthropomorphization

    View Slide

  45. Counterintuitive

    View Slide

  46. Metaphor

    View Slide

  47. Code neighborhoods

    View Slide

  48. View Slide

  49. View Slide

  50. View Slide

  51. View Slide

  52. View Slide

  53. View Slide

  54. Domain

    View Slide

  55. View Slide

  56. View Slide

  57. View Slide

  58. Permissions

    View Slide

  59. View Slide

  60. View Slide

  61. View Slide

  62. View Slide

  63. View Slide

  64. View Slide

  65. Tests

    View Slide

  66. View Slide

  67. View Slide

  68. View Slide

  69. Testing is fun!

    View Slide

  70. Testing is easy!

    View Slide

  71. (Once you get the hang of it.)

    View Slide

  72. Testing is how you avoid a rewrite

    View Slide

  73. View Slide

  74. View Slide

  75. View Slide

  76. View Slide

  77. “Often people, especially computer engineers,
    focus on the machines. They think, "By doing
    this, the machine will run faster. By doing this,
    the machine will run more effectively. By doing
    this, the machine will something something
    something." They are focusing on machines…”

    View Slide

  78. “But in fact we need to focus on humans, on
    how humans care about doing programming
    or operating the application of the machines.
    We are the masters. They are the slaves.”
    Yukihiro Matsumoto

    View Slide

  79. Be a wise master

    View Slide

  80. Mike Moore

    View Slide

  81. Mike Moore
    blowmage

    View Slide

  82. Mike Moore
    blowmage
    Stickers!

    View Slide