managing software debt - pnsqc 2009

48
Managing Software Debt Continued Delivery of High Value as Systems Age Chris Sterling Technology Consultant / Agile Coach / Certified Scrum Trainer Email: [email protected] Blog: www.GettingAgile.com Twitter: csterwa

Upload: chris-sterling

Post on 01-Nov-2014

2.219 views

Category:

Technology


1 download

DESCRIPTION

Many software developers have to deal with legacy code at some point during their careers. Seemingly simple changes are turned into frustrating endeavors. Code that is hard to read and unnecessarily complex. Test scripts and requirements are lacking, and at the same time are out of sync with the existing system. The build is cryptic, minimally sufficient, and difficult to successfully configure and execute. It is almost impossible to find the proper place to make a requested change without breaking unexpected portions of the application. The people who originally worked on the application are long gone.How did the software get like this? It is almost certain the people who developed this application did not intend to create such a mess. The following article will explore the multitude of factors involved in the development of software with debt.

TRANSCRIPT

Page 1: Managing Software Debt - PNSQC 2009

Managing Software Debt

Continued Delivery of High Value as Systems Age Chris Sterling

Technology Consultant / Agile Coach / Certified Scrum Trainer

Email: [email protected]: www.GettingAgile.com

Twitter: csterwa

Page 2: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Topics Being Covered

• Problems Found with Aging Software• Software Debt Explained

– Technical Debt– Quality Debt– Configuration Management Debt– Design Debt– Platform Experience Debt

• The Wrap Up– A Story of What is Possible

Page 3: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Problems Found with Aging Software

• Software gets difficult to add features to as it ages • Business expectations do not lessen as software

ages • Software must remain maintainable and changeable

to meet needs of business over time • Lack of emphasis on software quality attributes

contributes to decay

Page 4: Managing Software Debt - PNSQC 2009

Software Debt

Creeps into software slowly and leaves organizations with liabilities

Page 5: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Software Debt Creeps In

Shows a relatively new system with little software debt accrued.

Page 6: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Software Debt Creeps In

An aging software system slowly incurs significant debt in multiple functional areas.

Page 7: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Software Debt Creeps In

An older system has accrued significant debt in all functional areas and components.

Page 8: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Managing Software Debt – an Overview

Minimum Acceptable

Value

Depreciation ofValue Due to

Software Debt

Time

Effect of Managing Software Debtover time is extended preservationof software’s value

High

er S

oftw

are

Valu

e

Potential for depreciation is always there so

discipline is essential

Page 9: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Types of Software Debt

• Technical Debt• Quality Debt• Configuration Management Debt• Design Debt• Platform Experience Debt

Page 10: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Technical Debt

Issues in software implementation that will impede future development if left unresolved

Page 11: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

* Ward Cunningham’s Definition of “Technical Debt”

• Technical Debt includes those internal things that you choose not to do now, but which will impede future development if left undone. This includes deferred refactoring.

• Technical Debt doesn’t include deferred functionality, except possibly in edge cases where delivered functionality is “good enough” for the customer, but doesn’t satisfy some standard (e.g., a UI element that isn’t fully compliant with some UI standard).

* Ward Cunningham - “Technical Debt” - http://c2.com/cgi/wiki?TechnicalDebt

Page 12: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

My Definition of “Technical Debt”

“Technical debt is the decay of component and inter-

component behavior when the application functionality meets a

minimum standard of satisfaction for the customer.”

Page 13: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Maintain One List of Work

Put all work into Product Backlog andMake tradeoff decisions based on reality of the situation

Page 14: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Quality Debt

A lack of quality, either technical or functional, will lessen value per feature added over time

Page 15: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Accrual of Quality Debt with Releases

R1 R2$00

$5,000

$10,000

$15,000

$20,000

$25,000

$30,000

$35,000Total Debt Accrued

Releases

Page 16: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Break/Fix Only Prolongs the Agony

0.0

10.0

20.0

30.0

40.0

50.0

60.0

70.0

Debt Accrued (Bugs) Bugs FixedSprints

Page 17: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

17

Effect of Project Constraints on Quality

Page 18: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

A Fit Case Study

Cost reduction using Fit for test automation and data conversion

Page 19: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Manual Regression Testing

• Testing was taking 75 person hours during 2 full test runs consisting of:o Comprehensive manual regression testingo Data conversion and validation

• Cost for testing was $17,000 each iteration

Page 20: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Introducing Fit into Testing Process• After 8 iterations team had introduced healthy

amount of Fit fixtures and automated tests• Reduced 70+ hour test runtime down to 6 hours

which now included:o Fit automated regression testing o Data conversion and validation automated with Fit

fixtures • Reduced cost of testing each iteration from $17,000

to $7,000

Page 21: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

21

Acceptance Test-Driven Development

FunctionalRequirement

Draft AcceptanceTest Cases

ImplementFunctionality

ExecuteAcceptance Test Cases

ReviewResults

Modify AcceptanceTest Cases

Verify Results

Accepted

Page 22: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Configuration Management Debt

Creating unpredictable and error-prone release management

Page 23: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Traditional Source Control Management

Main BranchDebt

Death March {Debt accrues quickly within stabilization periods

Version 1Branch

Integrate forVersion 2

CodeComplete

Page 24: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Flexible Source Control Management

Main BranchVersion 1 Version 2 {Not Easy! Must have proper infrastructure to do this.

Page 25: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Continuous Integration

Page 26: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Scaling to Multiple Integrations

Page 27: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Design Debt

Design decays when not attended to so design your software continually

Page 28: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

* Abuse User Stories

Implement Securityfor User Information

As a Malicious Hacker I want to steal credit card information so that I can make fraudulent charges

* From “User Stories Applied” presented by Mike Cohn Agile 2006

Page 29: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Automated Tests

29

New Featur

e

System

Design Changes

Automated

Regression

Test Run

Page 30: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Working with Legacy Software

30

Define Acceptance Criteria for Requirement

Analyze What Might Be Affected by Requirement

Write Automated Tests for How it Works Now

Write Failing Automated Tests for How it Should Work

Carefully Modify Source Code to Implement Requirement

Execute Automated Tests to Verify Change

Page 31: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Platform Experience Debt

Silos of knowledge and increased specialization will increase cost of maintenance over time

Page 32: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

How to Combat Platform Experience Debt

• Ignore it (I do not suggest this!) • Write automated functional tests for existing system

functionality• Connect through interface to underlying system • Transfer knowledge of platform to more people • Rewrite system on more current platform • Move thin slices of functionality to more current platform

over time• Start architecture upgrade discussions and involve teams

through known team configuration patterns

Page 33: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Team Configuration Patterns

• Virtual Architect Pattern• Integration Team Pattern• Component Shepherd Pattern• Team Architect Pattern

Page 34: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Virtual Architect Pattern

EnterprisePlanning

Page 35: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Virtual Architect Pattern

• Pros– Share architecture ideas and needs across teams– Based on verbal communication

• Cons– Usually singles out special Team Member role– Could lead to top-down architecture decisions– IT may gain extensive influence and begin to run Product

Backlog prioritization for architecture needs

Page 36: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Integration Team Pattern

Feature Developmen

t

Integrate Features

All features are

implemented and

integrated every

iteration

Page 37: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Integration Team Pattern

• Pros– Reduces complexity on Feature Teams– Forces delivery from Integration Team instead of interface

and deployment designs• Cons

– Perpetuates specialized roles– Don’t always work on highest value Product Backlog items

Page 38: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Component Shepherd Pattern

Page 39: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Component Shepherd Pattern

• Pros– Share more knowledge within organization to minimize

platform experience debt– Work on highest value Product Backlog items

• Cons– Not always optimal as using individual knowledge– Difficult to learn multiple systems across Teams

Page 40: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Team Architect Pattern

Page 41: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Team Architect Pattern

• Pros– Team owns architecture decisions– Decisions are made close to implementation concerns

• Cons– May not have appropriate experience on Team– Team could get “stuck” on architecture decisions

Page 42: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

What is possible?

High quality can be attained and should enable accelerated feature delivery at same time.

Page 43: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

A Story: Field Support Application• 2000+ users access application each day• Application supports multiple perspectives and

workflows from Field Support Operations to Customer Service

• Team of 5 people delivering features on existing Cold Fusion platform implementation

• Migrating to Spring/Hibernate in slices while delivering valuable features

• 36 2-week Sprints, 33 production releases, and only 1 defect found in production

• So, what was the defect you say? Let me tell you…

43

Page 44: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Lets wrap this up...

What should I take away from this?

Page 45: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Principles for Managing Software Debt

• Maintain one list of work• Emphasize quality• Evolve tools and infrastructure continually• Improve system design always• Share knowledge across the organization• And most importantly, get the right people to work

on your software!

Page 46: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Continuous Integration

Page 47: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Thank you

Questions and Answers

Page 48: Managing Software Debt - PNSQC 2009

Copyright © 2009 Sterling Barton. All rights reserved.

Chris Sterling – Sterling Barton, LLC• Technology Consultant, Agile Coach &

Certified Scrum Trainer• Consults on software architecture, Agile

software development, and effective technology management across a spectrum of industries

• Founder of the International Association of Software Architects (IASA) Puget Sound chapter

• Open Source Developer• Email: [email protected]• Web: http://www.sterlingbarton.com• Blog: http://www.gettingagile.com• Follow me on Twitter : csterwa

48