Teaching An Old Dog New Tricks: Agile For Legacy Systems
Craeg Strong CTO, Ariel Partners June 23, 2015 Mclean, VA © Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 1 Craeg Strong
Software Development since 1988
Large Commercial & Government Projects
Agile Coach / Kanban Trainer
Performance & Scalability Architect
CTO, Ariel Partners CSM, CSP, CSD, CSPO, PSM, Apache Ant Open-Source Contributor PMI-ACP, PMP, SAFe Agilist www.arielpartners.com New York & Washington DC Area [email protected] @ckstrong1
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 2 Agenda 1. Up Front Assertions 2. Why Is Legacy Different? 3. Situational Assessment 4. Whirlwind Tour 1. Facilities 2. Team 3. Agile Methodology 4. Technical Debt 5. Documentation 6. “Sprint 0” 7. Lifecycle Management Tool 8. Roadmapping 9. Automated Tests 10. DevOps Automation 5. Summary
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 3 Assertions Big legacy projects represent a constituency 1 that has been largely left out of the conversation about Agile. Agile methods can provide benefits for big 2 legacy software projects – even if they have been previously successful under waterfall. Agile practices may need to be customized 3 and introduced in a different order in a legacy project.
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 4 How Is Legacy Different?
System Mission-Critical Criticality Heavily Regulated
Heavyweight, Prescriptive Governance Manual-Intensive Reporting
Optimized For Non-Collaboration Facility Private Offices May Be Tied To Self-Worth
Resistant to Change Staff Battle Fatigue
Documentation Missing or Out of Date Significant Documentation Requirements
Testing Mostly Manual System Not Designed For Testability
Procurement Lengthy Approval Process Skeptical of Open Source
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 5 Situation Assessment Mature Significant Software Challenges
UNIX Healthcare.gov FBI Trilogy “Criminal Justice Project” Denver Airport Baggage Handling Assessment Questions System What does our capital budget look Conclusions like? OpEx vs CapEx How much we will invest in How long will the capability be the existing code base needed? How we will allocate our How many of the original team are budget between available? maintenance and re-design What is the state of the code base How that allocation may shift relative to modern best practices? over the next 5 years Does the software use a strategic platform? Is it still supported?
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 6 Criminal Justice Project
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 7 Whirlwind Tour 1. Facilities 2. Team 3. Agile Methodology 4. Technical Debt 5. Documentation 6. “Sprint 0” 7. Lifecycle Management Tool 8. Roadmapping 9. Automated Tests 10.DevOps, CI/CD Automation
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 8 1. Facilities
Dream
Reality
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 9 Summary: Structuring The Space
Remove Barriers to Collaboration
Co-Locate The Team Cubicles Open Spaces Put Whiteboards Everywhere Post-Its of all shapes and colors Dual Hi-Res Monitors
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 10 2. Staffing The Team
Specialists
UX DevOps Technical Tool Designer Engineer Writer /Automation Specialist
Traditional Scrum Team Development
Developer Testers Business CM/Build DBA Developer Testers Business CM/Build DBA s Analyst Engineer s Analyst Engineer
Increasing Complexity New Project Legacy Project Lightweight Governance Heavyweight Governance Little Technical Debt Significant Technical Debt
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 1111 Team Composition
New Staff Junior 20% Midlevel
Specialists (Senior) 50% UX Designer DevOps Engineer 30% Build Automation Engineer Tool Specialist Technical Writer UI Test Automation Expert BDD/TDD Developer Project Veterans (Mid/Senior) Senior Developer Domain Expert Expert Manual Tester Training Specialist
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 12 Summary: Structuring The Team
Mix of System Knowledge & New Automation Skills Needed
Up To 50% Experienced Staff Members Most New Staff Should Bring Specific Automation Skills Relatively Few Junior Developers May Need Documentation Specialists Expect Some Turnover, Especially Veterans
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 13 3. Methodology 60%
50%
40%
30%
20%
10%
0%
*According to VersionOne
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 14 Choosing A Methodology
Scrum Kanban Awareness & Awareness, Acceptance, or No Experience With Agile, or Precedent Organizational Precedent Previous Negative Experience Nature of the Work Best for Development or O&M or Development plus “Disciplined O&M” O&M Stakeholder Time-Boxed Iterations Stakeholders cannot commit Availability provide Convenient Planning to fixed time-frames, or can Horizon for Stakeholders engage more frequently External Dependencies Effort fairly self-contained, Lots of dependencies on Cross-Functional team external teams Openness to Change Need or Want Clean Break Evolutionary approach is from past: Revolution necessary Team Preferences & Ceremonies, Time-Box Escape “Tyranny of the Time- Maturity Desirable Box,” Lengthy Planning Meetings
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 15 What If You Are Kind Of In The Middle?
Scrum Kanban Awareness & Awareness, Acceptance, or No Experience With Agile, or Precedent Organizational Precedent Previous Negative Experience Nature of the Work Best for Development or O&M or Development plus “Disciplined O&M” O&M Stakeholder Time-Boxed Iterations Stakeholders cannot commit Availability provide Convenient Planning to fixed time-frames, or can Horizon for Stakeholders engage more frequently External Dependencies Effort fairly self-contained, Lots of dependencies on Cross-Functional team external teams Openness to Change Need or Want Clean Break Evolutionary approach is from past: Revolution necessary Team Preferences & Ceremonies, Time-Box Escape “Tyranny of the Time- Maturity Desirable Box,” Lengthy Planning Meetings
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 16 Consider Scrumban
Using the Kanban Method for… To facilitate adoption of Scrum, starting from Adopting wherever you are right now Scrum Demand Analysis, Workflow Analysis
Amplifying Help identify, implement, and measure improvements for an existing Scrum team Scrum WIP limits, Lead Time Metrics
To facilitate inter-team planning and Scaling communication Scrum Visualize and manage dependencies via Kanban boards, Portfolio Kanban
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 17 How Does Kanban Improve Change Control Scrum? Board Meeting Service Pack Month 1 Month 2 Month 3 Month 4 Month 5 Month 6
Sprint 1 Release Sprint 2 Planning Sprint 3 Sprint Sprint 4 Backlog Sprint Sprint 5 Backlog Sprint Sprint 6 Backlog Sprint Backlog Sprint Backlog Sprint Backlog
Release Backlog Sprint Planning Retrospective
System Testing Change Control Board
Product Government Acceptance Testing Backlog
18 © Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 18 Challenges We Encountered Using Scrum For Maintenance Project Change Control Release Board Meeting Month 1 Month 2 Influx of Expedited Items Sprint 1 Sprint 2
Sprint Backlog Sprint Too Many Work Items Backlog Recurring Need For Estimates Constant Interruptions
Release Backlog
Product Backlog Expectation Reality © Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 19 Why Were We Always So Busy? Work Item Type Class Of Service Business User Story Standard Infrastructure User Story Standard Tier III Escalation Expedited Production Script Fixed Date Hot Fix Expedited Escaped Defect ? Expedited Documentation Deliverable(Dark Matter) Fixed Date Documentation Rework Expedited Technical Chore Intangible Kanban gives us the analytical tools to understand these work items better and to see why they have been disrupting the smooth delivery of value
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 20 Summary: Choosing A Methodology
Pick Best-Fit For Situation
Learn Both Kanban and Scrum Full-Time Coach Up-Front Training “Agile Bootcamp” Learning Kanban Makes You Better At Scrum
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 21 4. Technical Debt
10%
40%
60% 90%
Greenfield Legacy
Negotiate A High Percentage of Bandwidth To Be Spent Paying Down Technical Debt
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 22 Focus On Test Automation
Ideally we have full automated
Automated test coverage Performance We can potentially ship at the Tests end of any sprint
Automated Automated Smoke & Compile Packaging Deployment Unit Tests Verification Tests
Automated DEV Security Version Tests TEST Control
Static Analysis Begin Sprint End Sprint
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 23 But Set Aside Extra Time For Manual Testing
Dev Dev Tech Dev Tech Release Sprint Sprint Sprint Sprint Sprint Sprint
PROS CONS • Faster Technical Debt • Reduced Business Value Reduction Delivery
• Faster Progress Towards • Additional Complexity Continuous Delivery • Inconsistent Metrics • Additional Testing
• Fewer Regressions For our project, Technical Sprints were the “training wheels” we needed to maintain high quality in the absence of test automation. We have since discarded them.
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 24 Summary: Dealing With Technical Debt
Maintain High Levels Of Quality In Spite of Low Initial Automated Test Coverage
Achieve Agreement On Need For Infrastructure Investment Allocate Additional Time Required For Manual Testing Balance Cost of Delay with Cost of Failure Testing / Hardening Sprints May Require Whole-Team Participation Remove Barriers To Manual and Automated Testing
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 25 5. Documentation
Traditional Governance Comprehensive documentation is a critical component of software development
Agile Working software over comprehensive documentation
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 26 Recognize That Documentation Requirements May Be Bursty
Release Sprint Sprint Sprint Sprint Sprint Sprint Procurement Testing Design & Technical Training Guidance Documentation Documentation Documentation Interface Testing Design & Technical Training Documentation Documentation Documentation Documentation Testing Design & Technical Training Documentation Documentation Documentation Testing Design & Technical Training Documentation Documentation Documentation Testing Design & Technical Training Documentation Documentation Documentation Design & Technical Training Documentation Documentation Training Documentation Training Documentation Training Documentation
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 27 Summary: Dealing with Documentation Requirements
Maintain High Quality Documentation That Is Valuable
Improve Documentation Capabilities Plan and Measure the Work Reduce Amount of Documentation Required Reduce Effort Required to Produce Documentation
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 28 6. Sprint 0
1. People Staffing Reaches Critical Mass (~80%) 2. Hardware Every Team Member Has An Imaged PC 3. Software Source Code Manager Installed 4. Initial Product Backlog Small List of Business and Technical Items 5. Initial Kanban Board Simple Workflow, One Post-It Per Item
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 29 Summary: When To Start Iterating?
Don’t Wait: Start Iterating As Soon As Possible
Automated Build May Take Extra Time To Setup… Automated Testing May Not Be Possible At First… Last Few Staffing Slots May Take Time To Fill… …But You Will Learn Quickly Kanban Workflow Board Will Evolve Rapidly Gather Baseline Metrics
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 30 7. Lifecycle Management Tool
Defect Tracking Tool
Requirements Tool Agile Tool Testing Tool One Tool Specialist Custom Reporting Likely To Be Traceability Essential Cross-Reference
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 31 Use Manual Kanban Board
Workflow Evolves Quickly Excel Can Be Used For Metrics Immature Agile Tool May Be Burden
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 32 Summary: Tool Chain Support For Agile
Simplify Tool-Chain & Automate Prudently
Tool Consolidation May Be Beneficial Automated Reports Preferable To Manual Reporting – But Watch Cost versus Benefit Always Start With Manual Kanban Boards Capture Metrics In Excel To Start With
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 33 8. Roadmapping
Release N Release N+1 Sprint Sprint Sprint Sprint Sprint Sprint Sprint Sprint
Feature 1 Feature 2 Business
Installer Roadmap Improvement
Automated Technical Builds Roadmap
Upgrade Upgrade Upgrade .NET DB Libraries GUI Libraries
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 34 Technical Improvements Address Risks Bad Good
Investigate Improve Config Mgmt: Artifactory Eliminate Unused Third Binary Repository Party Libraries
Retire Obsolete & Migrate To Unsupported Entity Framework Database Libraries
Replace COM Components Rewrite Error Preventing Native 64-Bit Handling Component Operation
Express Technical Items In Terms of The Business Risks They Mitigate
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 35 Demonstrate Progress On Technical Items Via Reports
Release 2015-01
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 36 Summary: Maintain Both Business and Technical Roadmaps
Roadmaps Can Help Communicate The Big Picture
May Help Replace Gantt Charts and Earned Value Management Avoid Overpromising Start With Technical Spike To Determine Feasibility Focus on Removing Technical Barriers First Older Platforms & Libraries May Not Support Automation Platform and Third Party Upgrades Require Significant Testing
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 37 9. Automated Tests
Writing Automated Tests For Legacy Applications Not Designed For Testability Is Difficult We Are Asking Our Customer To Make A Large Investment In Automation With Delayed Return On Investment We Need To Maximize Our Efforts
If only we could..
Create Tests That Don’t Break When We Change The GUI Get The Whole Team Involved Focus On Business Scenarios, Not Source Code Create Tests That Will Survive A Component Rewrite Create Tests That Support Traceability To Requirements
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 38 BDD/ATDD To The Rescue
Behavior Driven Development
Given… Gherkin Acceptance Test When… Driven Development Then…
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 39 BDD With SpecFlow
Feature File Tester 1. Write Feature Analyst
Step Definitions 2. Generate 3. Fill In Template Code
Developer
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 40 The Agile RTM
Links to Theme Links to Epic Links to User Record in TFS Record in TFS Story in TFS
Links to Feature Documentation Generated via Pickles All system functions expressed as user stories All user stories have acceptance criteria Each criterion translated to an automated test using structured English (Gherkin) Customized report matches epics and user stories to automated acceptance tests Test fails unless software is implemented correctly
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 4141 Summary: Focus On High-Value Automated Tests
BDD/ATDD Tools Enable High-Value Tests
“Three Amigos” Work Together (Analyst, Tester, and Developer) Tests Map Directly To Acceptance Test Criteria Code Tags Provide Traceability To Features or User Stories BDD/ATDD Tools Rapidly Maturing More Robust, Lower Barrier To Entry Than GUI-Level Test Tools
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 42 10. DevOps Automation
Develop Collaborate
Source Track Control Report Notify
Continuous Build Integration Scripts ST 1
Integration Other Unit Test Test Tests ST 2
Build Package How To Achieve Dev Vision of Full Upload To ITE Automation? Repo Smoke Configure Deploy Smoke Test
Tier III Monitor
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 43 Automate Each Piece of the Pipeline: One By One
Improved Initial Automation: Full “Lights Out” Manual Analyzed Automation: Build Script adds Automation: Ad-Hoc Documented Stand-Alone Validation Reporting Undocumented Baselined Script Pre-Conditions Diagnostics Post-Conditions
This Step is Essential
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 44 Summary: DevOps Automation
Establishing Continuous Integration & Continuous Delivery (CI/CD)
DevOps Tools Maturing Rapidly Support Varies Widely By Platform (Linux/Unix, Windows, Mainframe) Legacy Projects Typically Have Many Manual & Undocumented Processes (Folklore) Significant Analysis & Problem Solving Skills Required Many High-Value Candidates For Automation Are Non- Obvious Avoid Paving the Cow Paths
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 45 Summary
Legacy Projects Can Realize Benefits By Adopting Agile Practices Practices May Need To Be Modified Consider Kanban or Scrumban Staff Your Team Thoughtfully Manage Stakeholder Expectations Balance Cost of Delay with Cost of Failure Adopt Systems Thinking Approach To Addressing Technical Debt Reduce Complexity There Is No Silver Bullet
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 46 Questions?
We are available for consulting or Agile coaching We love to compare notes and talk shop!
Ariel Partners (646) 467-7394 [email protected] www.arielpartners.com @arielpartners Thank You!
© Copyright Ariel Partners 2015 *[email protected] ((646) 467-7394 47