Software development: “Process” vs “agile” with material...

92
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Software development: “Process” vs “agile” with material by Marco Piccioni

Transcript of Software development: “Process” vs “agile” with material...

Page 1: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software EngineeringProf. Dr. Bertrand Meyer

March 2007 – June 2007

Chair of Software Engineering

Software development:“Process” vs “agile”

with material by Marco Piccioni

Page 2: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 2

Three cultures of software development

Three cultures:

Process

Agile

Object

The first two are usually seen as exclusive, but all have major contributions to make

Page 3: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 3

Process-oriented

(Sometimes called formal )Examples:

Waterfall model (from 1970 on)Military standardsCMM, then CMMIISO 9000 series of standardsRational Unified Process (RUP)Cluster model

Overall idea: to enforce a strong engineering discipline on the software development process

Controllability, manageabilityTraceabilityReproducibility

Page 4: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 4

Agile

Extreme Programming (XP)Lean ProgrammingTest-Driven Development (TDD)Scrum

Page 5: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 5

This lecture (today and tomorrow)

1. The case for agile methods2. Process-oriented methods 3. Towards a combination

Page 6: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 6

- 1 -

The case foragile methods

(or: the Cubicle Strikes Back)

Page 7: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 7

“The agile manifesto”

We are uncovering better ways of developing software by doing it and helping others do it.

Through this work we have come to value:

Individuals and interactions over processes and tools Working software over comprehensive documentation

Customer collaboration over contract negotiationResponding to change over following a plan

That is, while there is value in the items on the right, we value the items on the left more.

agilemanifesto.org

Page 8: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 8

Scheme 1: predictable manufacturing

Assembly-line production is possible:Define specifications and constructions stepsBuild some instances and perform measurementsOn the basis of that experience, estimate & schedule future production

Page 9: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 9

Scheme 2: new model development

Each model specific, evolving process:Requirements change between races

Static reasons (specific tracks)Dynamic reasons (weather, competitors)

High level of competitionContinuous experimenting

Prototypes rather than products

Page 10: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 10

Assembly-line vs prototype

Many parameters change; need creative adaptation to change

Stable environment

Activities emerge as part of the process

Can identify schedule and order all activities

Estimates only become possible late, as empirical data emerge

Reliable effort and cost estimates are possible, early on

Hard to freeze specificationsSpecify, then build

Prototype-style manufacturingAssembly-line manufacturing

C. Larman Agile & Iterative Development A Manager guide Addison Wesley 2003

Page 11: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 11

What about software?

In the agile view, most software development is not a predictable, mass-manufacturing problem, but falls under the new product development model

Page 12: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 12

Agile methods: basic concepts

Principles:Iterative developmentCustomer involvementSupport for changePrimacy of codeSelf-organizing teamsTechnical excellenceSearch for simplicity

Practices:Evolutionary requirementsCustomer on siteUser storiesPair programmingDesign & code standardsTest-driven developmentContinuous refactoringContinuous integrationTimeboxingRisk-driven developmentDaily trackingServant-style manager

Shunned: “big upfront requirements”; plans; binding documents; diagrams (e.g. UML); non-deliverable products

Page 13: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 13

Another view: lean programming

Eliminate waste Minimize inventory Maximize flow Pull from demand Empower workers Meet customer requirements Do it right the first time Abolish local optimization Partner with suppliers Create a culture of continuous improvement

Mary Poppendieck*

*See www.poppendieck.com

“Documentation that is not part of the final program”

Iterative development

Decide as late as possible

Build in tests;build in change

Fret about value, not scope

Page 14: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 14

Manager’s role in agile development

The manager does not:Create a work breakdown structure, schedule or estimatesTell people what to do (usually)Define and assign detailed team roles

The manager does provide:CoachingService and leadershipResourcesVisionRemoval of impedimentsPromotion of agile principles

Page 15: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 15

Iterative development

Each iteration is a self-contained mini-project

Iteration goal: a release, that is a stable, integrated and tested partially complete system

All software across all teams is integrated into a release each iteration

Most iteration releases are internal

During each iteration, there should be no changes from external stakeholders

Page 16: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 16

Iterative development

Not a new idea (see Microsoft’s Daily Build, cluster model)

Avoid “big bang” effect of earlier approaches

Short iteration cycles

Page 17: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 17

The waterfall modelFeasibility

study

Requirements

Specification

Globaldesign

Detaileddesign

Implemen-tation

Distribution

V & V

Page 18: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 18

Waterfall risk profile

Requirements Design Implementation Integration, V&V…

Time

Pote

ntia

l im

pact

of ri

sk b

eing

tack

led

C. Larman Agile & Iterative Development A Manager guide Addison Wesley 2003 p. 58

Page 19: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 19

Risk-driven vs. client-driven planning

What would you choose to implement first?

The riskiest, most difficult tasks…or

What the client perceives as his highest business value?

Page 20: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 20

Timeboxed iterative development

Set iteration end date, no change permitted

If requests cannot be met within timebox:

Place lower priority requests back on wish listNever move a deadlineNever ask developers to work more to meet a deadline

Iterations may typically last from 1 to 6 weeks

Page 21: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 21

Parkinson’s law*

Work expands so as to fill the time available for its completion

*C. Northcote Parkinson: Parkinson's Law, or The Pursuit of Progress, 1957

Page 22: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 22

Arguments for timeboxing

For developers:More focus (to limit Parkinson’s law)Forced to tackle small levels of complexity

For managers:Early forcing difficult decisions and trade-offsBetter skill assessment of people involved and better balance and optimization provided

For stakeholders:They see the actual progress of the application every iteration end

Page 23: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 23

Arguments against upfront requirements

Details are too complex for people to graspStakeholders are not sure what they wantThey have difficulty stating itMany details will only be revealed during developmentAs they see the product develop, stakeholders will change their mindsExternal forces cause changes and extensions

(e.g. competition)

Page 24: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 24

Requirements uncertainty

Jones C. 1997 Applied Software Measurement MCGraw Hill

0

5

10

15

20

25

30

35

Requirements change

10 100 1000 10000

Project size in FP

Page 25: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 25

Actual use of requested features

Never: 45%Seldom: 19%Occasionally: 16%Often: 13%Always: 7%

J. Johnson, XP2002

Page 26: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 26

Requirements in practice, the agile view

Realistic approach, based on 200+ SW projects:

Requirements always changeDevelopers get complete specifications only 5% of the timesOn average, design starts with 58% requirements specified in detail

From: D. Reinertsen, S. Thomke: Agile Product Development: Managing Development Flexibility in Uncertain Environments, in California Management Review, Vol. 41, No. 1, Fall 1998, pp. 8-30.

Page 27: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 27

Evolutionary requirements analysis

Do we need to know all the functional requirements to start building a good core architecture?

Agile answer: the architect needs most nonfunctional or quality requirements (e.g. load, internationalization, response time) and a subset of functional requirements

Page 28: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 28

User stories

Page 29: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 29

Test-Driven Development: basic cycle

1. Add a test2. Run all tests and check the new one fails3. Implement code to satisfy functionality4. Check that new test succeeds5. Run all tests again to avoid regression6. Refactor code

After Kent Beck*

*Test Driven Development: By Example, Addison-Wesley

Page 30: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 30

TDD: a first assessment

For:Central role to testsNeed to ensure that all tests passContinuous execution

But:Tests are not specsRisk that program pass tests and nothing else

Stay tuned…

Page 31: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 31

Scrum practices

Self-directed and self-organizing teams of max 7 peopleNo external addition of work to an iteration, once chosenDaily team measurement via a stand-up meeting called “scrum meeting”30 calendar-day iterationsDemo to stakeholders after each iteration

Page 32: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 32

Scrum lifecycle

Planning

Staging

Development

Release

Page 33: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 33

Scrum lifecycle: planning

Purpose:Establish the visionSet expectationSecure funding

Activities:Write visionWrite budgetWrite initial product backlogEstimate itemsExploratory design and prototypes

Page 34: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 34

Scrum lifecycle: staging

Purpose:Identify more requirements and prioritize enough for first iteration

Activities:PlanningExploratory design and prototypes

Page 35: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 35

Sample product backlog

305underwayuse case71process sale c.c. scenario

1001not started

technology53PDA sale capture

203not started

enhance88lay-away plan payments

24completedefect43sales commission calculation

104not started

issue12slow credit payment approval

605underwayuse case97process sale cash scenario

25underwayfeature17log credit payments to AR

Est.(hrs)PriStatusCategoryN.Requirement

C. Larman Agile & Iterative Development A Manager guide Addison Wesley 2003

Page 36: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 36

Scrum lifecycle: development & release

Page 37: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 37

XP practices: about people

Team typically works in an open space.

Stakeholders are mostly available

Every developer chooses his tasks (iteration planning game)

Pair programming

No overtime (sustainable pace)

Documentation: reduced to bare minimum

Page 38: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 38

XP lifecycle

Exploration

Planning

Iterations to first release

Productizing

Maintenance

Page 39: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 39

XP lifecycle: exploration

Purpose:Enough well-estimated user stories for first releaseFeasibility ensured

Activities:PrototypesExploratory proof of technology programmingStory card writing and estimating

Page 40: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 40

XP lifecycle: planning

Purpose:Agree on date and stories of first release

Activities:Release planning gameStory card writing and estimating

Page 41: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 41

XP lifecycle: iterations to first release

Purpose:Implement a tested system ready for release

Activities:Testing and programmingIteration planning gameTask writing and estimating

Page 42: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 42

XP lifecycle: productizing

Purpose:Operational deployment

Activities:DocumentationTrainingMarketing

Page 43: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 43

XP lifecycle: maintenance

Purpose:Enhance, fixBuild major releases

Activities:May include this phases again, for incremental releases

Page 44: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 44

What about tools?

Try to keep things as simple as possible

Only if they really help productivity and information sharing

Ideal situation: one relatively simple tool that seamlessly embraces all software lifecycle

Examples: No tool (white board + camera or video), Eiffelstudio, IBM Jazz project

Page 45: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 45

Agile methods links

www.agilealliance.comwww.cetus-links.orgwww.xprogramming.comwww.gilb.comwww.craiglarman.comwww.controlchaos.comwww.pols.co.uk/agile-zone/papers.htmlwww.eiffelroom.com

Page 46: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 46

Not everyone is gaga about XP

Page 47: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 47

Criticisms of XP

Hype not backed by evidence of successLoony ideas

(e.g. pair programming)“What’s good is not new, what’s new is not good”Rejection of proven software engineering techniquesLack of design

(disdained in favor of refactoring)Lack of documentation

(disdain of “big upfront requirements”) Unfairly favors developer over customerComplicates contract negotiations

Page 48: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 48

Pair programming criticism

“Pair programming is necessary in XP because it compensates for a couple of practices that XP shuns: up-front-design and permanent documentation.It makes up for the fact that the programmers are (courageously) making up the design as they code”.

(Stephens & Rosenberg)*

*Slightly abridged

(Ron Jeffries: “I think maybe concentration is the enemy. Seriously. If you’re working on something that is so complex that you actually need to concentrate, there’s too much chance that it’s too hard”)

Page 49: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 49

At first (Stephens & Rosenberg)

Page 50: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 50

“None of this actually matters” (Stephens & Rosenberg)

Page 51: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 51

The cycle (Stephens & Rosenberg)

Page 52: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 52

Contract-Driven Development

CDD = TDD — WTC*

Use contracts as specifications and test oracles

*Writing Test Cases

Andreas Leitnerwith Arno Fiva

(ETH)

Page 53: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

53

Specified but unimplemented routine

Page 54: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

54

Running the system and entering input

54

(erroneous)

Page 55: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

55

The error is flagged at run time as a contract violation

55

Page 56: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

56

This has become a test case

56

Page 57: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

57

Another execution, another error

57

Page 58: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

58

This has become a second test case

58

Page 59: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

59

Editing the class

59

Page 60: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

60

Correcting an error

60

Page 61: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

61

Recompiling

61

Page 62: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

62

Test cases are run again silently in the background

62

Page 63: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

6363

One bug corrected, the other not

Page 64: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

64

Attempting a fix

64

Page 65: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

65

Still doesn’t work

65

Page 66: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

66

We fix this (or think so)

66

Page 67: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

67

The guardian angel is, however, watching

67

Page 68: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

68

They fixed the bugs, had many children and lived happy ever after

68

Page 69: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 69

- 2 -

Process-based approaches: RUP

Page 70: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 70

Rational Unified Process (RUP)

Process model designed by Rational (now IBM) on basis ofSpiral model (Boehm)Objectory (Jacobson)

Page 71: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 71

RUP practices

Risk-driven requirements handling using use cases

Visual modelling

Develop in short timeboxed iterations

Focus on component architectures

Continuous measurement of quality factors

Up to 50 artifacts, all optional

Page 72: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 72

RUP: sample disciplines and artifacts

Iteration Plan

Risk List

Project Management

Design model

Software Architecture Document

Design

Vision

Use-Case Model

RequirementsArtifact (Workproduct)Discipline

C. Larman Agile & Iterative Development A Manager guide Addison Wesley 2003

Page 73: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 73

RUP lifecycle

Inception

Elaboration

Construction

Transition

Page 74: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 74

RUP phases

Page 75: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 75

- 3 -

The good, the bad and the ugly

Page 76: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 76

Retain from XP

Principles:Iterative developmentCustomer involvementSupport for changePrimacy of codeSelf-organizing teamsTechnical excellenceSearch for simplicity

Practices:Evolutionary requirementsCustomer on siteUser storiesPair programmingDesign & code standardsTest-driven developmentContinuous testingContinuous refactoringContinuous integrationTimeboxing (where appropriate)Risk-driven developmentDaily trackingServant-style manager

Page 77: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 77

Discard from XP

Pair programming as an imposed practiceRefusal to guarantee both functionality and delivery dateTests as a substitute for specifications

Page 78: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 78

Retain against XP

Key software engineering practices:Extensive requirements processDocumentationUpfront designSpecifications as subsuming tests Role of managerCommitment to both functionality and dateDesign for generality

Page 79: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 79

Retain from process-based approaches

Engineering principlesDocumentationIdentification of tasksIdentification of task dependencies

Page 80: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 80

Reject from process-based approaches

Strict separation between analysis, design, implementation

Ignorance of the central role of change in software

Use cases as the principal source of requirements

Tendency to “Big Bang” effect

Page 81: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

Software Engineering, lecture 8: Process vs Agile 81

The contribution of object technology

Focus on abstractionsReuse (consumer and producer)Seamless developmentReversibilitySingle Model principle:

The software is the modelThe model is the softwareThe software includes everything relevant to the projectTools automatically extract views

See B. Meyer, PracticeTo Perfect:The Quality First Model, IEEE Computer, May 1997, pages 102-106, also at se.ethz.ch/~meyer/publications/computer/quality_first.pdf

(“Primacy” of code, but in a more far-reaching sense than in plain XP)Contracts as a guide to analysis, design, implementation, maintenance, managementContinuous testing based on contracts

Page 82: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

8282

Seamless development with Eiffel & contracts

Single notation, tools, concepts, principles

Continuous, incremental development

Keep model, implementation, documentation consistent

Reversibility

Example classes:

PLANE, ACCOUNT, TRANSACTION…

STATE, COMMAND…

HASH_TABLE…

TEST_DRIVER…

TABLE…

Analysis

Design

Implemen-tation

V&V

Generali-zation

Page 83: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

83

Software Engineering

The cluster model

Cluster 1Cluster 2A

D

I

V&V

G

AD

I

V&V

G

AD

I

V&V

G

AD

I

V&V

G

Page 84: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

84

Software Engineering

The cluster model

I

V

DS

GI

V

DS

GI

V

DS

G

Cluster 1Cluster 2

I

V

DS

G

Cluster n

I

V

DS

G

I

V

DS

G

Page 85: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

85

Software Engineering

Cluster model: focus & practices

Clusters (set of related classes)Start with foundational clustersMini lifecycles, each covering a clusterSeamlessnessReversibilityDesign by contractCurrent showable demo at every stage

Page 86: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

86

Software Engineering

Mini-lifecycle tasks

SpecificationDesign / ImplementationVerification & ValidationGeneralization

Page 87: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

87

Software Engineering

Mini-lifecycle tasks: specification

Identification of the data abstractions (classes) of the cluster

Identification of constraints (class invariants)

Page 88: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

88

Software Engineering

Mini-lifecycle tasks: design & implementation

Definition of the class architectureInterface featuresContracts

Definition of the relationships between classesClientInheritance

Finalization of classes

Page 89: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

89

Software Engineering

Mini-lifecycle tasks: verification & validation

Static examination

(Possibly) automated unit testing

Page 90: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

90

Software Engineering

Mini-lifecycle tasks: generalization

Goal: turn classes in potentially reusable software components via:

Abstracting

Factoring

Documenting

Page 91: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

91

Software Engineering

Generalization

Prepare for reuse. For example:Remove built-in limitsRemove dependencies on specifics of projectImprove documentation, contracts...Abstract Extract commonalities and revamp inheritance hierarchy

Few companies have the guts to provide the budget for this

B

A*

Y

X

Z

A D I V G

Page 92: Software development: “Process” vs “agile” with material ...se.inf.ethz.ch/.../slides/08-softeng-process-agile.pdf · Software Engineering, lecture 8: Process vs Agile 26

92

Software Engineering

Software engineering principles

Quality pays

Architecture

Extendibility

Reusability

Reliability