How to rewrite, a bit at a time - Pipeline Conference 2018

How to rewrite, a bit at a time - Pipeline Conference 2018

There’s nothing more frustrating than not being able to deliver new features because of unnecessarily complicated code. A fast deployment pipeline is of no use if the code itself is too hard and slow to change.

You may decide it’s time to throw it all away and start over… and what began full of optimism, drags on for months and years, adding even more complexity and various levels of legacy.

It doesn’t have to be this way! In this presentation, you’ll hear a first-hand experience of how to approach technical debt in an iterative way. This talk will teach you lessons on how to start, and most importantly, finish a big rewrite project.

You will learn how to approach the conversation with the “business”, avoid the most common pitfalls when changing the architecture of a complex codebase, and ensure the rewrite brings value from the start till the very happy end.

4d1993f91aa4f2efccf08051205e3bad?s=128

Sabrina Leandro

March 20, 2018
Tweet

Transcript

  1. How to rewrite, a bit at a time Sabrina Leandro

    @saleandro Pipeline Conference 2018
  2. Rewrites at Songkick

  3. Rewrites at Songkick 1. Songkick.com 2. Tickets store 3. Internal

    tools
  4. BIG REWRITE STRIKES AGAIN

  5. • The problem • How to start a rewrite project

    • How to run it • How to finish it • How to not need it again! This talk
  6. Stop me if you think you’ve heard this one before

    The problem
  7. 10101 11001

  8. 10101 11001 1010111001101 0111001100111 0011100111001 1001110011100 1110001010111 0011100111001

  9. Software Entropy 10101 11001 1010111001101 0111001100111 0011100111001 1001110011100 1110001010111 0011100111001

  10. Complex abstractions Lots of features Too many slow tests Little

    to no tests No clear abstractions Lots of features
  11. Complex abstractions Lots of features Too many slow tests Little

    to no tests No clear abstractions Lots of features Tickets store & Internal tools
  12. Complex abstractions Lots of features Too many slow tests Little

    to no tests No clear abstractions Lots of features Songkick.com Tickets store & Internal tools
  13. None
  14. How to start it

  15. •Is it the right time? •Is it the right reason?

  16. Is it the right time? Discovery vs Delivery

  17. Is it the right time? Yes, if the product has

    a clear business value today.
  18. Is it the right reason? What difference does it make?

  19. Is it the right reason? Yes, if there’s one clear

    business case.
  20. PLEASE PLEASE PLEASE Let me get what I want

  21. How to sell it Have one clear business case

  22. How to sell it Show what a great new world

    it will be!
  23. How to sell it Find allies outside of your team

  24. Make the pain visible How to sell it

  25. How to sell it Do Repeat Yourself

  26. How to sell it Do Repeat Yourself Do Repeat Yourself

  27. How to run it

  28. Technical vision and strategy Now The future!

  29. Technical vision and strategy Now The future! Steps to get

    there ???
  30. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application
  31. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application
  32. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application Legacy application
  33. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New Legacy application
  34. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New Legacy application Legacy application
  35. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New Legacy application Legacy application New application
  36. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New New application Legacy application Legacy application New application
  37. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New New application Legacy application Legacy application RIP Legacy application New application
  38. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New New application VALUE Legacy application Legacy application RIP Legacy application New application
  39. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New Legacy application Legacy application New application
  40. Now Bright future! Team 2: Building new application Rewrite from

    scratch Legacy application Team 1: Maintaining legacy application New Legacy application Legacy application New application Legacy application
  41. “Rewrite from scratch: Waterfall process of rewrites

  42. The strangler application

  43. Team 1: Maintaining legacy and building new application Now Bright

    future! Rewrite using strangler
  44. Team 1: Maintaining legacy and building new application Now Bright

    future! Rewrite using strangler
  45. Team 1: Maintaining legacy and building new application Now Bright

    future! Rewrite using strangler
  46. Team 1: Maintaining legacy and building new application Now Bright

    future! Rewrite using strangler
  47. Team 1: Maintaining legacy and building new application Now Bright

    future! Rewrite using strangler
  48. Team 1: Maintaining legacy and building new application Now Bright

    future! Rewrite using strangler
  49. Team 1: Maintaining legacy and building new application New applicati

    Now Bright future! Rewrite using strangler
  50. Team 1: Maintaining legacy and building new application New applicati

    Now Bright future! Rewrite using strangler
  51. Team 1: Maintaining legacy and building new application New applicati

    Now Bright future! Rewrite using strangler
  52. Team 1: Maintaining legacy and building new application New applicati

    Now Bright future! Rewrite using strangler
  53. Team 1: Maintaining legacy and building new application New applicati

    VALUE! Now Bright future! Rewrite using strangler
  54. /orders /customers

  55. /orders /customers new/customers

  56. /orders /customers

  57. /orders /customers Build Validate Replace Delete Repeat

  58. “ Deleting is faster than rewriting

  59. Bones Muscle Fat Cut features to move faster

  60. “ If we were starting over, what would we build

    today, knowing what we know now?
  61. During the project

  62. How to run it Do one thing at a time

  63. 1.Find the biggest blocker 2.Remove it completely 3.Repeat How to

    run it Warning: Step 2 might involve more than coding
  64. How to run it Celebrate your successes!

  65. None
  66. None
  67. None
  68. None
  69. That joke isn’t funny anymore… How to run it Do

    Repeat Yourself, again
  70. How to finish it

  71. How to finish it I started something I couldn’t finish

  72. How to finish it These things 
 take time

  73. How to not need it again

  74. 10101 11001 1010111001101 0111001100111 0011100111001 1001110011100 1110001010111 Time… Software Entropy

  75. How to not need it again Make the cost visible

  76. None
  77. DELETE

  78. DELETE CODE

  79. DELETE CODE FEATURES

  80. DELETE CODE FEATURES PRODUCTS

  81. “ If we were starting over, what would we build

    today, knowing what we know now?
  82. Make it part of your day-to-day How to not need

    it again
  83. “ A refactor a day keeps the rewrite away!

  84. How to not need it again A little bit and

    often
  85. How to not need it again Get used to inconsistencies

  86. Technical migrations Continuously deliver value Delete what’s not valuable One

    business goal
  87. Sustainable Software Make maintenance cost visible Learn and collaborate Refactor

    a little bit and often
  88. Thanks! Sabrina, take a bow… sabrina@saleandro.com @saleandro

  89. Bigmouth Strikes Again This Charming Man Stop Me If You

    Think You’ve Heard This One Before What Difference Does It Make? Please, Please, Please, Let Me Get What I Want That Joke Isn’t Funny Anymore I Started Something I Couldn’t Finish These Things Take Time Sheila Take A Bow Thanks! Sabrina, take a bow… sabrina@saleandro.com @saleandro
  90. Songkick.com rewrite • https://devblog.songkick.com/the-path-to-soa-d986a18d4a8b • https://devblog.songkick.com/our-object-based-rails-frontend-3e2ddc048d12 • https://www.youtube.com/watch?v=-VEf8j6aGMk • https://www.martinfowler.com/bliki/StranglerApplication.html

    Celebrate your successes • https://medium.com/@Songkick/gamify-your-product-team-to-power- level-9000-261e9fceaa22 Hoarders metaphor / Liveable code • https://twitter.com/sarahmei/status/783115752794492928 • https://www.youtube.com/watch?v=mz3l_oEA2cU • https://twitter.com/kentbeck/status/856537528886673408 Product discovery and product delivery • http://jpattonassociates.com/dual-track-development/ • https://martinfowler.com/bliki/DesignStaminaHypothesis.html • https://www.facebook.com/notes/kent-beck/teams-in-3x/1244519748914220/ References
  91. References Make the cost visible • http://codemanship.co.uk/parlezuml/blog/?postid=1433 • http://blogs.msdn.com/b/elee/archive/2009/03/11/source-code-is-a-liability-not-an- asset.aspx

    Make it part of your day-to-day • https://martinfowler.com/bliki/OpportunisticRefactoring.html • http://ronjeffries.com/xprog/articles/refactoring-not-on-the-backlog/ • http://firstround.com/review/forget-technical-debt-heres-how-to-build-technical- wealth/ • https://www.infoq.com/presentations/microservices-replaceability-consistency • https://www.sandimetz.com/blog/2017/6/1/the-half-life-of-code • https://www.infoq.com/presentations/remove-unneeded-code Playlist :) • https://open.spotify.com/user/saleandro/playlist/6i3RVHtys4djlYlLLGZc26