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

Methodical Improvement of Software Sytems

Methodical Improvement of Software Sytems

ECSA-2014 Tutorial on Software Improvement, by Alex Heusingfeld (@goldstift) and Gernot Starke (@gernotstarke).

Dr. Gernot Starke

August 26, 2014
Tweet

More Decks by Dr. Gernot Starke

Other Decks in Programming

Transcript

  1. These: Verbesserung ist mehr als Refactoring „Große“ Umbauten bedeuten (oft):

    • Umbau DB-Struktur, Datenmigration • Austausch von Software-Infrastruktur (z.B. Frameworks) • umfangreiche Änderung interner Abläufe • massive Änderung interner Schnittstellen
  2. „Analysis“ Overview analyze evaluate improve Qualitative Analysis Context Analysis Stakeholder

    Analysis Stakeholder Interview prepares validates external stakeholder Quantitative Analysis finds risks and non-risks gives overview fundamental crosscutting Legend: collect issues collect improvement opportunities Development Process Analysis part of find input for
  3. analyze evaluate improve „Analysis“ Details Qualitative Analysis ATAM Context Analysis

    Issue Tracker Analysis Data Analysis Documentation Analysis Runtime Analysis Stakeholder Analysis Stakeholder Interview prepares Requirements Analysis foundation for part of validates external stakeholder Quantitative Analysis finds risks and non-risks identify risk areas Questionnaire prepares gives overview Software Archeology supported by measure at runtime Static Code Analysis measure code supports fundamental crosscutting Legend: collect issues collect improvement opportunities part of Development Process Analysis part of find input for Infrastructure Analysis part of Instrument System provide better information
  4. Common Wording analyze evaluate improve crosscutting practices & principles Issue

    (Problem) Improvement (remedy) Cost Risk Cause cost of improvement improvement has risks or consequence improvements resolve cause (root) causes of issues cost of issue (potential) cost of risk risk might result in issue solve issue with improvement(s) improvement solves issue(s)
  5. Groundwork (3) analyze evaluate improve crosscutting practices & principles collect

    issues collect opportunities for improvement create from Explicit Assumption Improvement Backlog keep explicit list or table helps understand Issue List keep explicit list or table m:n mapping
  6. Groundwork (4) analyze evaluate improve crosscutting practices & principles fundamental

    Legend: collect issues collect opportunities for improvement create from change has impact Impact Analysis might create new problems Expect Denial Explicit Assumption Improvement Backlog Fail Fast Fast Feedback Separate Cause From Effect Slide or Write Traceability keep trace to problem stakeholders deny problems traces help prove your points keep explicit list or table helps understand root cause analysis presentation or written report solution to what problem(s) Issue List Artifact keep explicit list or table m:n mapping
  7. „Analysis“ Overview Qualitative Analysis Context Analysis Stakeholder Analysis Stakeholder Interview

    prepares validates external stakeholder Quantitative Analysis finds risks and non-risks gives overview fundamental crosscutting Legend: collect problems collect improvement opportunities Development Process Analysis part of find input for analyze evaluate improve Talk to the right people!
  8. „Analysis“ Overview Qualitative Analysis Context Analysis Stakeholder Analysis Stakeholder Interview

    prepares validates external stakeholder Quantitative Analysis finds risks and non-risks gives overview fundamental crosscutting Legend: collect problems collect improvement opportunities Development Process Analysis part of find input for analyze evaluate improve Understand the neighbourhood!
  9. Qualitative Analysis Context Analysis Stakeholder Analysis Stakeholder Interview prepares validates

    external stakeholder Quantitative Analysis finds risks and non-risks gives overview fundamental crosscutting Legend: collect problems collect improvement opportunities Development Process Analysis part of find input for „Analysis“ Overview analyze evaluate improve Systemic issues with the organization?
  10. „Analysis“ Overview Qualitative Analysis Context Analysis Stakeholder Analysis Stakeholder Interview

    prepares validates external stakeholder Quantitative Analysis finds risks and non-risks gives overview fundamental crosscutting Legend: collect problems collect improvement opportunities Development Process Analysis part of find input for analyze evaluate improve Quality issues?
  11. Qualitative Analysis Preparation Identify the relevant stakeholders Kickoff Present the

    ATAM method Present the business objectives and architecture goals Present the architecture of the system Evaluation Explain detailed the architecture approaches Create a quality tree and scenarios Analyze architecture approaches with respect to the scenarios Follow-up Present the results
  12. Qualitative Analysis Software Product Quality Attributes ISO 25010 Functional Suitability

    Reliability Performance efficiency Operability Security Compatibility Maintain- ability Transfer- ability Appropriate- ness Accuracy Compliance Availability Fault tolerance Recover- ability Compliance Time- behaviour Resource- utilisation Compliance Appropriate- ness Recognise- ability Learnability Ease-of-use Helpfulness Attractiveness Technical accessibility Compliance Confidential- ity Integrity Non- repudiation Account- ability Authenticity Compliance Replace- ability Co- existence Inter- operability Compliance Modularity Reusability Analyzability Changeability Modification stability Testability Compliance Portability Adaptability Installability Compliance
  13. „Analysis“ Overview Qualitative Analysis Context Analysis Stakeholder Analysis Stakeholder Interview

    prepares validates external stakeholder Quantitative Analysis finds risks and non-risks gives overview fundamental crosscutting Legend: collect problems collect improvement opportunities Development Process Analysis part of find input for analyze evaluate improve Measure!
  14. Stakeholder Analysis analyze evaluate improve top-management, business-management, project-management, product- management,

    process-management, client, subject-matter-expert, business-experts, business-development, enterprise-architect, IT-strategy, lead-architect, developer, tester, qa-representative, configuration-manager, release-manager, maintenance-team, external service provider, hardware- designer, rollout-manager, infrastructure-planner, infrastructure-provider, IT-administrator, DB-administrator, system-administrator, security- or safety-representative, end-user, hotline, service-technician, scrum-master, product-owner, business-controller, marketing, related-projects, public or government agency, authorities, standard-bodies, external service- or interface providers, industry- or business associations, trade-groups, competitors Role / Name Description Intention Contribution Contact Identify the right people!
  15. Stakeholder Analysis (II) who MIGHT have problems or know things...

    analyze evaluate improve • use (pre-interview) questionnaire • conduct personal interviews: e.g. what are your top-3 issues with... 1. the system 2. the development / maintenance process 3. operation / infrastructure of the system 4. ...
  16. Perishable Food Packaging > Embedded software + information systems >

    Regulated domain -> safety critical > Goal: Decrease SW development cost
  17. Food: Analysis > Stakeholder analysis and -interviews > Development Process

    Analysis > Qualitative Analysis + View-Based-Understanding > Quantitative Analysis, Static Code Analysis > Central problem areas: > Lack of overview („knowledge islands“) > Low code quality > ad-hoc development: No systematic processes
  18. Food: Root-Cause Analysis > Company focus primarily on hardware >

    Software development scattered in various departments > No (planned) software architecture
  19. Food: Analysis (excerpt) issue (problem) description problem-cost time-to-market > 6

    month (!) from business or government requirement to production sales loss might be > 1M$ production log data loss architecture does not ensure complete production logs - data records might get lost! Large volumes of perishable food could be at risk > 10-100k $ per incident scattered knowledge + low code quality no synergy effects, no conceptual integrity, no re-use between departments, ... >5-50k $ per maintenance update self-developed OR-mapper expensive maintenance, high know-how requirements, high deviation in performance 5-10k $ per maintenance update
  20. Food: System Overview > C# / .NET as development &

    production platform Machine Operational Support Sales Support Database Machine Sensors Message Queue Legend: COTS C# Data Storage & Reporting Machine Configuration Frontend Machine Configuration Backend
  21. Food: Safety Risk Wrong usage of Message Queue: > 1.-3.

    has to be transactional > Reporting „commits“ to MQ after 2! (too early!) > Problem in reporting leads to lost data! Machine Operational Support Sales Support Database Machine Sensors Message Queue Legend: COTS C# Data Storage & Reporting Machine Configuration Frontend Machine Configuration Backend 1 2 3
  22. Telco: Analysis > View-Based-Understanding > Data Analysis > (few) stakeholder

    interviews > Central problem areas: > BI Reporting highly fragmented & diverse > Report implementation details driven by business experts (provided data models + SQL query details as „requirements“) > Implementation partially based upon proprietary meta-model
  23. Telco: Analysis (excerpt) problem / risk description problem-cost high development

    cost business benchmarks showed development to be overly expensive (and slow) per report-type 50-200% non-transparent software and data architecture of >50 developers and BI experts, only very few understood whole DWH vendor-lock-in proprietary tools implemented to process (proprietary) meta-model, high yearly license cost, 50 k€ license fee / yr, O(1000) dev-hrs wasted developer exodus core developers upset as company announced large outsourcing deal, (nearly) annihilating internal development 6-18 month without new business features
  24. Croc: Sales & ERP Provider > Niche provider for sales

    & ERP „standard“ solution > Origin in „perishable“ market - but growing > 80% of clients: low-margin-high-volume > 20% of clients: low-volume-very-high-margin > Original idea: Universal-Core + Configuration > Starting point: low (dev + runtime) performance Company name changed due to anonymity requirements!
  25. Croc: Analysis > Brief stakeholder analysis and -interviews > Static

    Code Analysis > Runtime Analysis > Data Analysis (including data model) > Central problem areas: > Excellent code quality („clean code“) - but very few unit tests > Extremely high configurability of everything > >150 developers with extremely different options
  26. Croc: Analysis (2) „Configuration is the sequel to programming, with

    unsuitable means“ > Configuring UI structure, UI behavior, workflows, business and validation rules, reports and interfaces > Horrible persistent data structures for both runtime and configuration data > Some configuration stored in various XML formats
  27. Croc: Analysis (3) > Few key tables with 500-700 columns

    (!!) each. > Stores complete application state - including cursor position. „Clean“ Code XML Configuration DB Legend: COTS Code Table-1 Table-2 Table-3 Table-4 Database Relational Data
  28. „Evaluate“ Overview fundamental crosscutting Legend: issue list improvement backlog Estimate

    Issue Cost create from Estimate Improvement Cost Estimate in Interval Estimate Feature Value analyse impact Explicit Assumption requires based upon
  29. fundamental crosscutting Legend: issue list improvement backlog Estimate Issue Cost

    create from Estimate Improvement Cost Estimate in Interval Estimate Feature Value analyse impact Explicit Assumption requires based upon „Evaluate“ Overview Map problems to „business“ terms!
  30. „Evaluate“ Concepts Estimate Assumption Unit (Measure) Parameter Observation Probability based

    upon how certain? Correction Factors can observe require / allow Intervall time, money, etc Subject what do we estimate? tacke uncertainty by based upon
  31. Rail Transport Provider > Heterogeneous IT landscape > Problem areas:

    > 6-12 month from initial business requirement to production („time-to-market“) > Stability, reliability > Performance
  32. Rail - aim42 Analysis > Stakeholder Analysis + -Interviews >

    yielded several problems + problem-areas > Issue Tracker Analysis + Software Archeology > Qualitative (ATAM-like) Analysis > Static Code Analysis > Development Process Analysis
  33. Rail (1): Overview Ticket Sales Frontend Cash Management Client Personalization

    Client Data / Contract User Management Rail Itinerary Vouchers Rebate and Reduction Cards Inter-European Connections (HAFAS) External Partners Booking Office Ticket Price Management Data Warehouse Marketing & Sales Campaigns Travel Agents API & UI Pricing Engine Ticket Sales Backend Legend: Java PHP Python C/C++ Web Server Extensions Pricing Data Store Haskell Cobol Security Extensions PL/ SQL bad!
  34. Rail (2): Challenges > Embrace new sales channels (mobile) >

    requires (much) higher availability > Marketing demands rapid price adjustments
  35. Rail (4): Analysis (excerpt) issue (problem) description problem-cost time-to-market 6-12

    month (!) from business requirement to production configuration of certain ticket types crashes backend when either end-users or sales-clerks configure specific ticket-types (groups > 5 persons, more than one rebate reason, border crossing or >2 train changes), several backend processes crash know-how drain in development many dissatisfied developers and business experts leave (development) organization, migration from internal to external development, fix-price projects
  36. 7%# 6%# 12%# 8%# 67%# Cost%Distribu+on%for%So/ware%% Requirements# Design#/#Architecture# (ini9al)#Programming# Integra9on#

    Maintenance# Rail (5): Evaluation (excerpt) What‘s the (additional) cost of „heterogenity“? 1. Explicit assumptions • Heterogenity „costs“ in all phases • Phase effort is known h"p://courses.cs.vt.edu/~csonline/SE/Lessons/LifeCycle/
  37. Rail (6)... Collected tasks in which additional effort might occur..

    h"p://courses.cs.vt.edu/~csonline/SE/Lessons/LifeCycle/
  38. „Improve“ Practices > Anticorruption Layer > Assertions > Automated-Tests >

    Branch-For-Improvement > Extract-Reusable-Component > Front-End-Switch > Group-Improvement-Actions > Handle-If-Else-Chains > Improve-Code-Layout > Improve Logging > Interface Segregation Principle > Introduce Boy Scout Rule > Introduce-Layering > Isolate-Changes > Keep-Data-Toss-Code > Manage Complex Client Dependencies With Facade > Measure-Everything > Never-Change-Running-System > Never-Rewrite-Running-System > Quality-Driven-Software-Architecture > Refactoring > Refactoring-Plan > Remove-Nested-Control-Structures > Sample-For-Improvement > Schedule-Work > Untangle-Code > Use Invariants To Kill Zombies
  39. Automated Tests > Risk: Changes fail existing processes in prod

    > Put this into numbers: > Which processes are impacted by the new feature's code changes? > Estimate the hourly cost of those processes failing in production > Estimate the probability of each process's failure
  40. Unit Tests > If you don’t have any, start with

    new features > Reproduce each bug as a unit test > Write small tests > Use self-explaining test case names
  41. Integration Tests > Priority: Test your API! > cheaper than

    UI testing > usually not acceptance tested > Don’t use mocks if you’re not forced to! > only if 3rd-party regularly blocks you
  42. State of Logging > Growing number of user transactions >

    much larger log files > log files distributed across multiple systems > Increasing demand for real-time analysis
  43. Stakeholders Developer failure analysis after weeks Operations real-time health information

    Product Owner weekly usage reports ??? some complex daily report?
  44. Improve Logging > Diagnostic contexts > Filters > Defined log

    format > Log aggregation > CorrelationID
  45. Customer Story > A well-known German bank > Web application

    for customer self-service > Customers call support hotline for failures > Hotline shall track state of transactions
  46. “An event is anything that we can observe occurring at

    a particular point in time.” — Alexander Dean, Unified Log Processing, Manning
  47. Questions? Comments? Dr. Gernot Starke, @gernotstarke [email protected] http://gernotstarke.de Alexander Heusingfeld,

    @goldstift [email protected] https://www.innoq.com/en/staff/alex innoQ Deutschland GmbH Krischerstr. 100 40789 Monheim am Rhein Germany Phone: +49 2173 3366-0 innoQ Schweiz GmbH [email protected] Gewerbestr. 11 CH-6330 Cham Switzerland Phone: +41 41 743 0116 www.innoq.com Offices in: Berlin Darmstadt München