why do we rewrite software
play

Why do we rewrite software? SumUp. A better way to get paid 1 2 - PowerPoint PPT Presentation

Why do we rewrite software? SumUp. A better way to get paid 1 2 Why do we usually Inexperience Its fun rewrite code? 3 4 Better solution Technical available Debt SumUp. A better way to get paid Code that negatively Old libraries?


  1. Why do we rewrite software? SumUp. A better way to get paid

  2. 1 2 Why do we usually Inexperience It’s fun rewrite code? 3 4 Better solution Technical available Debt SumUp. A better way to get paid

  3. Code that negatively Old libraries? and repeatedly affects the Code I didn’t write? speed or quality of delivery Technical debt Code I wrote before I knew Features that no one uses what I was doing? SumUp. A better way to get paid

  4. Technical debt 😱 Speed of adding new features Time SumUp. A better way to get paid

  5. Recurring technical debt 😱 Speed *refactor* of adding new features Time SumUp. A better way to get paid

  6. Second system effect The tendency of small, elegant, and successful systems to be succeeded by over-engineered, bloated systems due to inflated expectations and overconfidence. “The Mythical Man Month: Essays on Software Engineering” - Frederick P. Brooks Jr. SumUp. A better way to get paid

  7. “Legacy code” often di fg ers from its suggested “ alternative by actually working and scaling . ” - Bjarne Stroustrup, Inventor of C++ SumUp. A better way to get paid

  8. Is this my destiny? e t i r w e R https://www.vectorstock.com/royalty-free-vector/ouroboros-snake-eating-its-own-tail-eternity-or-vector-12076546 SumUp. A better way to get paid

  9. HARD FACT The real cost of software is not the initial development, but maintenance over time SumUp. A better way to get paid

  10. THE QUESTION IS NOT Why do we rewrite software? SumUp. A better way to get paid

  11. How can we make our systems more resilient to inevitable change ? SumUp. A better way to get paid

  12. 😱 Speed of adding new features Time SumUp. A better way to get paid

  13. 🙄 Speed of adding new features Time SumUp. A better way to get paid

  14. How do we reach this nirvana? “Good architecture” 🙅 SumUp. A better way to get paid

  15. Feels detached from daily Hard to spell problems No clear definition What does a software Sounds elite architect even do? “Architecture” has become a dirty word SumUp. A better way to get paid

  16. Architecture as enabling constraints Constraints about how we use data and code that help us move faster over time SumUp. A better way to get paid

  17. Enabling constraints in real life 🚙 SumUp. A better way to get paid

  18. Enabling constraints in Programming paradigms Paradigm Constraint & Enablement From function pointers to classes → OOP Independently deployable subcomponents Functional From mutable to immutable data → Eliminate race conditions and concurrency problems SumUp. A better way to get paid

  19. Enabling constraints in Frontend development Paradigm Constraint & Enablement var → const No more reassignment → Predictable data jQuery → React No more DOM manipulation → Predictable UI CSS → CSS-in-JS No more naming / side-effects → Safety and fewer global clashes SumUp. A better way to get paid

  20. We are constraining ourselves all the time SumUp. A better way to get paid

  21. We trade constraints for safety and speed SumUp. A better way to get paid

  22. N O T E X H A U S T I V E 3 constraints you can use today for more resilient frontend architecture SumUp. A better way to get paid

  23. Constraints for more resilient frontend architecture 3 1 2 Constraint Enables SumUp. A better way to get paid

  24. Constraints for more resilient frontend architecture 3 1 2 Source code dependencies Constraint must point inward Enables SumUp. A better way to get paid

  25. A few ways of organizing our dependencies Layered Big Ball of Mud Modular SumUp. A better way to get paid

  26. What’s the difference? Constraint Big Ball of Mud Layered Source code dependencies must point inwards SumUp. A better way to get paid

  27. Constraint Big Ball of Mud Layered Source code dependencies must point inwards *changed* SumUp. A better way to get paid

  28. Huge or unknown regression scope Cross-team conflicts Constraint Big Ball of Mud Layered Source code dependencies must point inwards *changed* SumUp. A better way to get paid

  29. Constraint Ball of Mud Layered Source code dependencies must point inwards *changed* *changed* SumUp. A better way to get paid

  30. Limited regression scope (Usually) does not affect other teams Constraint Ball of Mud Layered Source code dependencies must point inwards *changed* *changed* SumUp. A better way to get paid

  31. Key difference between a ball of mud and a well-organized monolith is dependency organization SumUp. A better way to get paid

  32. Constraint Source code dependencies must point inwards SumUp. A better way to get paid

  33. Constraint Source code dependencies must point inwards Router API / Data For each page, UI Layer the rest of the application does not even exist Business logic Page 1 Page 2 SumUp. A better way to get paid

  34. Constraints for more resilient frontend architecture 3 1 2 Source code dependencies Constraint must point inward Easier to isolate Enables impact of changes SumUp. A better way to get paid

  35. What about shared components ? Design system 🎩 -or- copy-paste ✂ SumUp. A better way to get paid

  36. Constraints for more resilient frontend architecture 3 1 2 Source code dependencies Be conservative Constraint must point inward about code reuse Easier to isolate Enables impact of changes SumUp. A better way to get paid

  37. WE ♥ DRY SumUp. A better way to get paid

  38. The result is often brittle and side-effect ridden code in the name of code reuse SumUp. A better way to get paid

  39. Impact of time on shared code SumUp. A better way to get paid

  40. Impact of time on shared code if , context, branches… SumUp. A better way to get paid

  41. DECOUPLED > DRY Code reuse is not a goal in and of itself SumUp. A better way to get paid

  42. Sometimes you just need two glasses! SumUp. A better way to get paid

  43. Constraints for more resilient frontend architecture 3 1 2 Source code dependencies Be conservative Constraint must point inward about code reuse Easier to isolate Avoid coupling Enables impact of changes code that diverges over time SumUp. A better way to get paid

  44. Constraints for more resilient frontend architecture 3 1 2 Source code dependencies Be conservative Enforce your Constraint must point inward about code reuse boundaries Easier to isolate Avoid coupling Enables impact of changes code that diverges over time SumUp. A better way to get paid

  45. Router Page Other Page Business logic Subcomponent import Business logic SumUp. A better way to get paid

  46. Router Page Other Page Business logic Subcomponent import Business logic ✂ SumUp. A better way to get paid

  47. Router Page Other Page Business logic Subcomponent Business logic SumUp. A better way to get paid

  48. Router Page Other Page Business logic Subcomponent Business logic SumUp. A better way to get paid

  49. Forbidden dependency tests BUILD FAILING SumUp. A better way to get paid

  50. Forbidden dependency tests .dependency-cruiser.json { "forbidden": [{ "name": "Your Page", "comment": "Should not depend on other pages", "severity": "error", "from": { "pathNot": "^pages/YourPage" }, "to": { "path": "^pages/YourPage" } }] } npm install --save-dev dependency-cruiser SumUp. A better way to get paid

  51. Constraints for more resilient frontend architecture 3 1 2 Source code dependencies Be conservative Enforce your Constraint must point inward about code reuse boundaries Easier to isolate Avoid coupling Preserve your Enables impact of changes code that diverges architecture over time over time SumUp. A better way to get paid

  52. The real cost of software is maintenance over time, because change is inevitable 👀 💱 What we’ve learned 🚙 We can make small changes to Architecture is about make our projects more applying enabling constraints resilient (1. Think directionally , to how we use code and data 2. Be conservative on reuse, 3. Enforce our boundaries) SumUp. A better way to get paid

  53. 👀 Every time you write a function (or don’t), create a new module (or don’t), you’re making an architecture decision SumUp. A better way to get paid

  54. 🚙 You don’t have to derive architecture from first principles SumUp. A better way to get paid

  55. 👌 Thank you! @monicalent

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend