is Unstoppable: Determination Requirementsse463/Slides/RDisUnstoppable.pdf · Requirements...

Post on 17-Jun-2020

1 views 0 download

Transcript of is Unstoppable: Determination Requirementsse463/Slides/RDisUnstoppable.pdf · Requirements...

RequirementsDeterminationis Unstoppable:An Experience Report

Daniel M. Berry, CS;Krzysztof Czarnecki, Michał Antkiewicz,Mohamed AbdElRazik, ECE;University of Waterloo

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 1

These slides are actually the basis for my explanation of the plan for the project that are in the Administration, Plans, and Requirements slides, Pages 23--40.

This case study shows what happens when you don't work out all the assumptions, exceptions, and variations of your features before you start coding them.

Some Terminology

Requirements analysis (RA) is known also as“requirements engineering (RE)”.

Requirements specification (RS) is what REyields.

Requirements determination (RD) may or maynot be done as part of RE.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 2

Requirements Determination

RD is the making of some requirementsrelevant decision …

perhaps as small as deciding one word in aRS.

RD may or may not be part of any consciousRE process.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 3

Consulting at Company X

X has a well-managed IT department.

X’s IT department has produced award-winning applications.

Nevertheless an X VP asked us to look at theirRE process for problems.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 4

How We Did the Consulting

Semi-structured interviews with 18 people:

g 5 focus groupsg 23 hours of recordings capturing about 40

people’s remarksg logged hundreds of quotations

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 5

Clustering the Quotations

While clustering the quotations, we noticedthat they told a story, …

a story that some of us had seen before.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 6

A Model of the Lifecycle

From the story, we came up with a model ofX’s software lifecycle using long-understoodideas from the RE field.

The model explains about 95% of what weheard.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 7

Outline of the Rest of Talk

g Paraphrases of some quotations

g The model, in three parts, Model I, Model II,and Model III

g Conclusions and implications of the model

g What happened at presentation of themodel at X

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 8

Paraphrases of somequotations

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 9

Not enough time for RE.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 10

RE is timeboxed.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 11

Coding starts too early.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 12

Coding is done to earlyrequirements.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 13

Results in many projectchange notices (PCNs).

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 14

Stealth changes withno PCN to avoidreproach a PCN earns.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 15

Testing effort estimatedbased on very earlyrequirements.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 16

It seems that …

RE is being stopped before it has run itscourse.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 17

Reality

Michael Jackson [1995] once said:

“Requirements engineering is where theinformal meets the formal.”

g Raw ideas: informalg Code: formal

→ Model I

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 18

Informal Meets Formal(Model I)

Client IdeasCode

TestCases

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 19

Two Extremes:

g Upfront RE, in which as much time asnecessary is spent to determinerequirements before proceeding withdesign and implementation.

g RD during coding, in which theprogrammers and testers determine allrequirements as they write the code andtest cases.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 20

Informal Meets Formal(Model I), Cont’d

RDDuringCoding

UpfrontRE

Client IdeasCode

TestCases

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 21

In Most Projects…

the meeting point is somewhere in the middle.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 22

Meeting Point is Unavoidable

There is no way to go from ideas to codewithout determining requirements for the codefrom the ideas.

That is, no programmer can write code withoutknowing what the code is to do, even if he orshe has to decide what the code is to do onthe spot.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 23

When upfront RE cut short, …

the RS is incomplete.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 24

When programmers receivean incomplete RS, …

they cannot continue until they decide whatthe missing requirements are.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 25

How programmers should decidemissing requirements?

They should ask the client.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 26

When programmers ask theclient, …

delay

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 27

Sadly, …

Often, the programmer does not ask the client:

g cannot find client, or

g has no access to client

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 28

So, …

the programmer invents requirements on thespot.

( It’s called “creativity” or “initiative”! )

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 29

When programmer invents, …

It’s not good, because:

g Programmers are not trained in RE.

g Programmers have interests that aredifferent from the client’s, to simply theirown coding.

g Each programmer needing a missingrequirement is working independently.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 30

Throw in Testers

Add to all this that the testers are trying towrite test cases for incomplete requirements.

Ergo, even more independent invention ofrequirements.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 31

Programmer- and Tester-Determined Requirements

They are bad…. and

They are expensive.

→ Model II

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 32

Why Expensive? (Model II)

200

150

100

50

0Reqs Specs Plan Design Code Integ Maint

1 2 3 4 10

30

Rel

ativ

e co

st to

fix

faul

t

Phase in which fault is detected and fixed

200

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 33

Perceptions

How do people perceive any newrequirements determined after delivery of theRS?

Creep!

even though the new requirements may bewhat was missing because of terminated RE.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 34

Logical Conclusion forModels I & II

RD always continues until it answers allquestions any programmer has about writingthe code and any tester has about writing testcases.

g There is no escaping this reality.g It’s like death and taxes!

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 35

Logical Conclusion forModels I & II, Cont’d

The client must be accessible for the entireduration of RE.

We are talking about the actual duration of RE,not the official duration, …

especially if the actual duration of RE is thefull lifecycle.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 36

Logical Conclusion forModels I & II, Cont’d

The client must be accessible for the entireduration of …

RD.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 37

But, But, But …

If we don’t stop RE,it will go on forever!

Like a mother’s work, RE is never done!

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 38

Yes and No

Yes:

There are always new requirements forsoftware that is being used [Lehman], …

and iterative methods are for dealing withthose kinds of new requirements.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 39

Yes and No, Cont’d

No:

Once a scope is picked — and you cannotcomplete the code without pinning down somescope — there are no new requirements, onlyas yet undiscovered requirements.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 40

and fixing the code to match the newly discovered requirements that were always there is much more expensive than never having to fix the code, because it was written correctly from the beginning.

How to Know if RE is Done-1:

RE for a scope is done when the RS iscomplete enough that every …

programmer can program the required code …

without having to ask anyone to clarify arequirement and without having to invent anyrequirements on the spot.

Every good programmerknows such an RS instinctively.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 41

How to Know if RE is Done-2:

RE for a scope is done when the RS iscomplete enough that every …

tester can write the required test cases …

without having to ask anyone to clarify arequirement and without having to invent anyrequirements on the spot.

Every good testerknows such an RS instinctively.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 42

Conversely,

I think all of you know now instinctively that you don't know quite enough about the details of what your capstone project system is supposed to do to be able to just write the code.

You've resigned yourselves to winging it under pressure as the deadline approaches.

I know, because I have been in a similar situation, displaying false bravado --- Everything is going smoothly --- while silently praying for a life-and-project-saving miracle! :-)

Another Conclusion forModels I & II

At least one programmer and one testershould be part of the RS writing team …

in order to help the team determine when tocontinue and when to stop.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 43

BEGIN SKIP FOR CONFERENCE:

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 44

Model I Applies to Iterativeand Agile Lifecycles

The full line is repeated for each iteration.

Each iteration serves as part of the RE for thenext iteration.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 45

Model I Applies to Iterativeand Agile Lifecycles, Cont’d

In an agile lifecycle,

g the scope is smaller andg the client is available all the time.

So it’s OK that the programmer is doing RD ashe or she writes code.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 46

but it's still an expensive way to discover requirements, because often already written code, based on incorrect assumptions, has to be changed under client's direction.

END SKIP FOR CONFERENCE:

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 47

Not In Paper

There was no room for the following in thepaper.

However, it is the third model.

If time permits, I will cover it!

If not, I will only mention it and move to theconclusions.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 48

Problem of the Lack of Benefitof a Document to its Producer(PotLoBoaDtiP)

This problem plagues all the documents thatpeople just hate to write or to keep up to date.

PotLoBoaDtiP was first identified by PaulArkley & Steve Riddle as the traceabilitybenefit problem.

But, the problem exists for more than creatingand maintaining traces.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 49

PotLoBoaDtiP (Model III)

PotLoBoaDtiP occurs whenever those whohave the knowledge to produce a documentare not the ones who benefit from thedocument, and…

those who benefit from the document, itsconsumers, do not have the knowledge toeasily and quickly produce the documentwhen they need it.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 50

PotLoBoaDtiP

At best, for doing the document, the producersuffers drudgery; at worst, the producersuffers rebuke.

At best, for not having the document, thebeneficiary suffers drudgery; at worst, thebeneficiary suffers an impossible task.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 51

Consequences of PotLoBoaDtiP

rebukedrudgery

impossible taskdrudgery

worstbest

BeneficiaryProducer

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 52

Example 1 of PotLoBoaDtiP

requirements and code

traces between

drudgery drudgerybest

BeneficiaryProducer

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 53

Example 2 of PotLoBoaDtiP

PCN

rebuke impossible taskworst

BeneficiaryProducer

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 54

Technology Does Not SolvePotLoBoaDtiP

There are lots of tools out there for tracing.

But, just as there is no incentive to producethe trace, there is no incentive to use thetools.

PotLoBoaDtiP must be addressed as anincentive problem.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 55

Conclusions

g RD continues until all programmers’ andtesters’ questions are answered.

g Client must be accessible throughoutactual RE.

g Programmers and testers should helpdetermine when RE is done.

g PotLoBoaDtiP should be addressed viaincentives.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 56

Presentation to X’s VPs

X’s VPs expected boring presentation aboutquotations and their frequencies and limitedour presentation to 15 minutes.

We surprised them by presenting only asummary of the quotations and then focusedon the model and its conclusions.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 57

We believe that …

focusing on the model was the right thing todo…

because of the lively 1⁄2-hour discussion thatensued.

One VP said that we hit the nail on the head!

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 58

Now Go Read Our Paper!

But please be polite to the other authors ofthis session, and stay until the end of thissession.

2010 D.M. Berry, K. Czarnecki, M. Antkiewicz, & M. AbdElRazik Requirements Engineering RD is Unstoppable Pg. 59