Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The bigrewrite

452 views

Published on

The bigrewrite

Published in: Sports
  • Be the first to comment

  • Be the first to like this

The bigrewrite

  1. 1. The Big Rewrite Iulian Dogariu #CodeCampIasi 25 April 2015
  2. 2. Big rewrite or not? This is the question
  3. 3. A. I can't work with it • Missing source code • Missing protocol documentation, passwords • Missing tooling (e.g. no licence for Visual C++ 5.0) • Legal or regulatory reasons
  4. 4. B. It won't work properly • Breaks often in production • Performs poorly • Hard to deploy • No monitoring or logging
  5. 5. C. I won't work with it • Brittle code • Big ball of mud • Hidden knowledge • I don't know the language • Unused code
  6. 6. Start from scratch?
  7. 7. "Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by incremental renovation: tinkering, improving, planting flower beds." -- Joel Spolsky - "Things You Should Never Do" http://www.joelonsoftware.com/articles/fog0000000069.html
  8. 8. "Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by incremental renovation: tinkering, improving, planting flower beds." -- Joel Spolsky - "Things You Should Never Do" http://www.joelonsoftware.com/articles/fog0000000069.html
  9. 9. It's never just the code Sysops Third parties Designers Other teams Marketing Technology salesmen
  10. 10. Politics
  11. 11. I'll write a 5000 line function today
  12. 12. The fearsome Estimator with no skin in the game
  13. 13. So now we're aware of • Our inherent biases as developers • The technical ecosystem • The office politics • The uncertainties re time and scope
  14. 14. The absolute essentials
  15. 15. The absolute essentials • Infrastructure automation • Automation test suite through the UI • Business vocabulary
  16. 16. At least Try (to work with the legacy code)
  17. 17. The T word
  18. 18. Steps to introduce tests in legacy code • Find where to make the changes • Find what to test • Break dependencies (without refactoring) • Write tests • Make changes and refactor
  19. 19. That didn't work You still want to rewrite :-)
  20. 20. Swallow small bits
  21. 21. Swallow small bits • Carve an integration point (service, DB) • Rewrite only the parts that touch it • Don't try to rewrite the whole monolith at once
  22. 22. Rewrite by feature, not by module • Play to the strengths of your target language and framework • Don't replicate past implementation
  23. 23. Take your time • Insist on quality • Train the team. Build good habits • Absorb the culture of your new language/ framework • Be aware of cultural dissonances
  24. 24. If you're a startup
  25. 25. Q & A
  26. 26. Thank you! Get in touch: hello <at> iuliandogariu <dot> com @yu_li_yan Please help our nice hosts #Codecampiasi, give them feedback

×