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

Improving Your Architecture with Forensic Analysis

Improving Your Architecture with Forensic Analysis

Try it out Now in Your Project!

npm i @softarc/detective –D
npx detective

---
Feedback:
https://github.com/angular-architects/detective/issues

Manfred Steyer

September 27, 2024
Tweet

More Decks by Manfred Steyer

Other Decks in Programming

Transcript

  1. Architecture & Code Reviews Code Review Best Practices Architectural Goals

    Consequences/ Trade-offs Recomentations Joint Walkthrough Developer Interviews More general: Stakeholder Interviews
  2. Goodhart‘s Law: „When a measure becomes a target, it ceases

    to be a good measure.“ -- Charles A. E. Goodhart
  3. What‘s Important for Architects? Minimal Dependencies Vertical 1 Vertical 2

    Vertical 3 Feature UI Data Conway‘s Law Feature UI Data Feature UI Data
  4. What‘s Important for Architects? Low Coupling Vertical 1 Vertical 2

    Vertical 3 Conway‘s Law High Cohesion High Cohesion High Cohesion Single Responsibility? Most Changes: Within ONE Verical Reduce Cognitive Load!
  5. Agenda • Ideas behind Forensic Analysis • Tools for Forensic

    Analysis • Limitations of Forensic Analysis • DEMO
  6. About me… Manfred Steyer, ANGULARarchitects.io (Remote) Angular Workshops and Consulting

    Google Developer Expert for Angular Blog, Books, Articles, and Talks about Angular Manfred Steyer
  7. Hot Spots [Adam Tornhill: Your Code as a Crime Scene,

    2nd edition, 2024] Hotspot High Code Churn + Complex Hotspot Index Count Changes * Complexity Important Focus on specific time frame Tools used here CodeScene
  8. Hot Spots [Adam Tornhill: Your Code as a Crime Scene,

    2nd edition, 2024] Possible Reasons Too many responsibilities? No clear modularization? Error-prone implementation? Too little domain knowledge?
  9. Team/Code-Alignment Vertical 1 Vertical 2 Possible Reasons Verticals work against

    Conway‘s Law Devs ignore the official team structure
  10. Code Scene • By Adam Tornhill • Free for Open

    Source Projects • Lot‘s of analysis methods • Awesome visualization • Several Programming Languages • Code & Architecture Level • https://codescene.com/
  11. Detective • Our take on Forensic Analysis • Open Source

    • Limited to a few methods • Architecture Level • Primarily TypeScript • Focus: Help for Reviews • Appetizer for CodeScene!
  12. Awesome, but not a replacement for … Code Review Best

    Practices Architectural Goals Consequences/ Trade-offs Recomentations Joint Walkthrough Developer Interviews More general: Stakeholder Interviews
  13. However, a tempting addition … Code Review Best Practices Architectural

    Goals Consequences/ Trade-offs Recomentations Joint Walkthrough Developer Interviews More general: Stakeholder Interviews (Forensic) Analysis Better Questions
  14. Conclusion • Metrics: Grain of Salt • Metrics should not

    become a target! • Low Coupling, High Cohesion, Conway’s Law
  15. Conclusion • Hot Spots = High Change Rate + High

    Complexity • Change Coupling • Team/Code Alignment
  16. Try it out Now in Your Project! npm i @softarc/detective

    –D npx detective https://github.com/angular-architects/detective/issues … and provide feedback:
  17. Contact and Downloads [web] ANGULARarchitects.io [twitter] ManfredSteyer d Slides &

    Examples Remote and In-House http://softwarearchitekt.at/workshops