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

Legacy Improvement - Done Right

Legacy Improvement - Done Right

As software developers, we spend most our time maintaining existing systems – under time and budget pressure. Building new business functionality tends to get more difficult, expensive and risky over time due to increasing size, growing complexity and lack of overview. Although we complain about technical debt, lack of innovation and the architectural deficits of historically _grown_ software, we often patch, fix or hack symptoms instead of curing the root causes of these problems. In this talk you’ll get an overview of the systematically improving or modernizing your system. The approach shown here is based upon the established idea of identifying the specific problems first, before changing or modifying a system. We will take a closer look at different areas of investigation, such as architecture, code, technology, quality requirements, application data plus development and rollout processes, in an iterative breadth-first analysis. For each area of investigation I give examples and show methodical tools for effective and practical use. Afterwards you’ll get an overview of strategical and tactical approaches to specific improvements, based upon the problems and risks found during analysis. The presentation is aimed at software development teams, architects, product owners and technical management. Everything I present in this talk has been proven in software and system projects and reviews I conducted over the last couple of years in various industries – so expect some (anonymized) practical examples!

Dr. Gernot Starke

October 14, 2021
Tweet

More Decks by Dr. Gernot Starke

Other Decks in Programming

Transcript

  1. Software Improvement
    Done Right
    Dr. Gernot Starke

    View full-size slide

  2. Dr. Gernot Starke
    INNOQ Fellow
    üArchitecture-Improver
    üCoach, Trainer
    ü arc42, aim42
    ü iSAQB

    View full-size slide

  3. There should be only
    ONE
    reason to change:

    View full-size slide

  4. Change
    to add value...

    View full-size slide

  5. • actionism
    • cargo cult
    • longing to try technology XY
    No:

    View full-size slide

  6. Add value by
    removing problems

    View full-size slide

  7. Complicated systems
    https://flic.kr/p/7XAjXu

    View full-size slide

  8. Problems in
    complicated system
    (0)
    • taste
    • price
    • appearance
    • location (of restaurant)
    https://flic.kr/p/6xuSMU

    View full-size slide

  9. Problems in
    complicated system
    (1)
    • taste
    • temperature
    • consistency
    • popularity
    • purchase price

    View full-size slide

  10. Problems in
    complicated system
    (2)
    Nutritional value:
    carbs, protein, fat, vitamins
    drugs,
    contamination,
    poison,
    radioactivity
    https://flic.kr/p/bDGDMY

    View full-size slide

  11. Problems in
    complicated system
    (3)
    Logistics &
    storage of ingredients
    https://flic.kr/p/pnVsxu

    View full-size slide

  12. Kids...
    • really nice!
    • narrow focus
    • limited field of vision
    • driven by short-term desires

    View full-size slide

  13. Pro Beginner
    •overview by
    methodical assessment
    •objective priorities
    •balance between
    strategy and tactic

    View full-size slide

  14. Pro
    •overview by
    methodical assessment
    •objective priorities
    •balance between
    strategy and tactic
    e
    valuate
    analyze
    improve

    View full-size slide

  15. architecture
    improvement
    method
    https://aim42.org

    View full-size slide

  16. Breadth-first search
    Stakeholder Context Quality Architecture Code Runtime Data Tests Processes Infrastructure Security ....

    View full-size slide

  17. Access
    All
    Areas
    Postbank Dortmund Postfach
    44132 Dortmund

    View full-size slide

  18. Breadth-first search
    1. Stakeholder
    2. (Overall) structure
    3. Code details
    4. Cohesion
    5. Context
    6. Qualities
    7. Development process
    8. Persistence
    9. Technology
    10. Infrastructure
    examples...
    examples...

    View full-size slide

  19. Stakeholder know
    many problems
    (+ solutions).

    View full-size slide

  20. Overall structure
    Does component structure
    fit to problem?
    Too many dependencies?

    View full-size slide

  21. Level-1: Component Disorder
    Sales Frontend
    Private + Corporate
    Configurator Shell
    Client
    Contracts
    UDS
    (User Data Service)
    Order &
    Fullfillment
    Vouchers
    &
    Rebates
    eGov
    Shop
    Sales &
    Contracts
    Archive
    External
    Partners
    Price
    Management
    Data
    Warehouse
    Marketing &
    Sales
    Campaigns
    Atlas
    Customs &
    Logistics
    Pricing
    Engine
    Sales
    Backend
    Private+Corp
    Hodor
    Optical
    Archive
    Post-Sales
    Services
    Security
    Extensions
    Legend:
    Java
    PHP
    Python
    C/C++
    Hask
    ell
    Cobol
    PL/
    SQL
    Flash
    HTML/
    JS
    Sales
    Backend
    eGovernment

    View full-size slide

  22. Code details
    Hotspots and other smells...

    View full-size slide

  23. Metrics
    • coupling / dependencies
    • code complexity
    • performance
    • …
    good

    View full-size slide

  24. Metrics
    • coupling / dependencies
    • code complexity
    • performance
    • …
    • errors per component
    • Know-How per component
    • change frequency
    • …
    good better

    View full-size slide

  25. Telco:
    • Management measures (Java-)
    system with red/yellow/green
    (CAST Application Intelligence Platform)
    • >70% implemented in XSLT,
    • not measured by CAST

    View full-size slide

  26. complex code that‘s modified often.
    Find Hotspots

    View full-size slide

  27. Context
    External interfaces

    View full-size slide

  28. VENOM
    External Interface Hell
    „Standard“
    supplier
    Suppler
    API
    „Custom“
    supplier
    >200 >200
    point2point
    interfaces
    „Standard“
    craftsmen
    „Custom“
    craftsmen Craftsmen
    API
    ~35

    View full-size slide

  29. Cohesion
    (does it belong together?)

    View full-size slide

  30. (bad) Cohesion
    UDS
    (User Data Service)
    Order &
    Fullfillment
    Vouchers
    &
    Rebates
    Sales &
    Contracts
    Archive
    Price
    Management
    Marketing &
    Sales
    Campaigns
    Atlas
    Customs &
    Logistics
    Pricing
    Engine
    Sales
    Backend
    Private+Corp
    Sales
    Backend
    eGovernment
    determines
    prices
    calculations & data
    ALSO relevant
    for pricing

    View full-size slide

  31. Analyse application
    data / data structures
    Databases, data-structures,
    distribution, replication, etc

    View full-size slide

  32. Clean Code + Bad Persistence
    ... (500)
    ... (300)
    ... (400)
    ... (400)
    ... (400)
    relational DB,
    „done wrong“

    View full-size slide

  33. Technology
    Appropriate?
    Outdated?
    Mis-used?

    View full-size slide

  34. https://www.youtube.com/watch?v=xL4
    0UN5p6IY
    #3

    View full-size slide

  35. https://www.youtube.com/watch?v=xL4
    0UN5p6IY

    View full-size slide

  36. Example: Use of Rule-Engine
    • Review identifies deviation from standard
    (concerning loading strategy of Working-Memory)

    • (Standard) assumption:
    few but huge data sets
    • Reality: many but very small data sets

    View full-size slide

  37. breadth first search
    Metrics
    Structure
    Application
    Data
    Quality
    Security
    Processes
    Code
    Technology
    etc.

    View full-size slide

  38. Pro
    •overview by
    methodical assessment
    •objective priorities
    •balance between
    strategy and tactic
    aim42

    View full-size slide

  39. Our status:
    LARGE number of problems

    View full-size slide

  40. Breadth-first search
    Stakeholder Kontext Qualität Architektur Code Laufzeit Daten Tests Prozesse Infrastruktur Security ....
    H
    ?
    H
    H M
    M
    ?
    M
    H
    H
    H M
    ? ?
    ?
    M
    M
    M
    M
    H
    M
    M
    ?
    H
    H
    M
    M
    H
    H
    M M
    ?
    H
    M
    M
    M
    M
    H
    H
    Priorities needed!

    View full-size slide

  41. Pro
    •overview by
    methodical assessment
    •objective priorities
    •balance between
    strategy and tactic
    aim42

    View full-size slide

  42. Proposal:
    Map problems to money

    View full-size slide

  43. prioritize / estimate problems
    roughly
    estimate...
    trivial
    problems

    View full-size slide

  44. Issue
    Cost
    Improvement
    Cost
    >
    Only change something if
    problem is more expensive
    than its solution

    View full-size slide

  45. Estimation: Fundamentals...
    Term Description
    Subject What do we estimate
    Unit Time, money, effort, pain
    (cost) factor What influences the subject?
    Assumptions What do we estimate/guess
    about these factors
    Observation Metrics, counts etc. of single factors
    Probability How sure are we of these numbers?

    View full-size slide

  46. Pro
    •overview by
    methodical assessment
    •objective priorities
    •balance between
    strategy and tactic
    aim42

    View full-size slide

  47. Verbesserung mit
    Tagesgeschäft
    day-to-day development
    Practices
    Practices
    time
    Approaches
    Practices
    Practices
    Practices
    Practices
    Scheduling Improvements

    View full-size slide

  48. Categories of long-term improvements...
    Throw away
    & rebuild
    reduce
    size
    Improve
    some parts
    improve internal
    structure &
    cohesion
    «category»
    Long-Term
    Improvement
    Approach
    «category»
    Rewrite
    «category»
    Restructure
    «category»
    Data Migration
    «category»
    Brainsize
    «category»
    Improve
    Modularization
    «category»
    Supporting
    Patterns
    Improve
    processes or
    technology

    View full-size slide

  49. Change by Extraction
    2
    1
    Client
    Flawed
    (incohesive)
    System
    Client
    „other“ other
    features
    Client Flawed
    System
    Client
    „other“
    other
    features
    Better
    other features
    Client
    (reduced)
    Flawed
    System
    Client
    „other“

    View full-size slide

  50. Change by Split
    1
    2
    3
    Client
    Type 1
    Flawed
    System
    Client
    Type 2
    Client
    Type 1
    Flawed
    System
    Client
    Type 2
    Flawed
    System
    Client
    Type 1
    Reduced to
    Type 1
    Client
    Type 2
    Reduced to
    Type 2
    New Type 1
    System
    Client
    Type 1
    Client
    Type 2
    New Type 2
    System

    View full-size slide

  51. Change by Switch („Strangulizer“)
    Original by Paul Hammant:
    http://paulhammant.com/2013/07/14/legacy-application-strangulation-case-studies/

    View full-size slide

  52. Decorating Collaborator
    Client
    Code
    Flawed
    Supplier
    «use»
    Client
    Code
    Flawed
    Supplier
    „Proxy“
    «use»
    «delegate»
    1.
    2.
    New
    functionality
    Client
    Code
    Flawed
    Supplier
    „Proxy“
    «use»
    «delegate»
    «decoration»
    1.
    2.
    3.

    View full-size slide

  53. Beware of the database...
    it‘s usually harder to improve
    than the code

    View full-size slide

  54. Summary
    e
    valuate
    analyze
    improve
    https://aim42.org
    1. Identify problems
    2. Prioritize
    3. Change
    aim42

    View full-size slide

  55. Thanx.
    Gernot Starke
    [email protected]
    Twitter: @gernotstarke
    www.innoq.com

    View full-size slide

  56. Headline
    Cum sociis natoque penatibus et
    magnis dis parturient montes.
    14.000
    Requests pro
    Sekunde

    View full-size slide

  57. Headline
    Cum sociis natoque penatibus et
    magnis dis parturient montes.
    14.000
    Requests pro
    Sekunde

    View full-size slide

  58. Separate
    separate
    things
    Join things
    that belong
    together

    View full-size slide

  59. Unser Kernteam
    FRONTEND
    PRODUKTENTWICKLUNG
    FRONTEND
    PRODUKTENTWICKLUNG
    FRONTEND
    PRODUKTENTWICKLUNG
    FRONTEND
    PRODUKTENTWICKLUNG
    Heribert Innoq
    Proxy-Pro
    Heribert Innoq
    Proxy-Pro
    Heribert Innoq
    Proxy-Pro
    Heribert Innoq
    Proxy-Pro

    View full-size slide

  60. Text Text Text Text Text Text

    View full-size slide