sw engineering management

32
SOFTWARE ENGINEERING & MANAGEMENT "software work is the most complex that humanity has ever undertaken.” [Brooks, 95] [email protected] (2010)

Upload: robert-sayegh

Post on 30-Jan-2015

862 views

Category:

Leadership & Management


2 download

DESCRIPTION

Literature overview on SW engineering and management processes

TRANSCRIPT

Page 1: SW Engineering Management

SOFTWARE ENGINEERING & MANAGEMENT

"software work is the most complex that humanity has ever undertaken.” [Brooks, 95]

[email protected] (2010)

Page 2: SW Engineering Management

Preface

These slides reflect extensive research on what happens in the Software field worldwide.

It aims to give perspective and motivate thoughts on what we do in our SW team.

2

[email protected] (2010)

Page 3: SW Engineering Management

Disclaimer

Disclaimer: all the following slides contain quotes from known books and articles – as such, each slide has a note for the relevant reference(s).

Needless to mention, nothing beats reading through the references directly.

[email protected] (2010)

3

Page 4: SW Engineering Management

Project Planning4

[email protected] (2010)

Page 5: SW Engineering Management

SW is Complex & Expensive!

Large Software systems cost far more to build, and take much longer to construct, than the office buildings occupied by the companies that have commissioned the software.

Really Large Software systems in the 250,000 FP size can cost more than building a domed football stadium, a 50-story skyscraper, or a 90,000 ton cruise ship.

Not only are large systems expensive, but they also have one of the highest failure rates of any manufactured object in human history.

Software is not your typical happy ending, lives happily ever after story!

5

[email protected] (2010)

Windows User
Large > 1000FPReally Large > 100,000 FP
Windows User
ref: Jones 2009
Page 6: SW Engineering Management

SW Runway Projects6

[email protected] (2010)

Windows User
ref: Charette 2005
Page 7: SW Engineering Management

Late = Defective

Large systems usually run late because they contain so many defects or errors that they don’t work.

Unfortunately, if this situation is not detected until testing begins it is too late for corrective actions to be fully successful.(on-schedule until testing cycle syndrome)

• Vista (125K FP)• ERP SAP (300K FP)

•1FP = 125 lines of code

7

[email protected] (2010)

Windows User
ref: Capers Jones "ROI in Software management"Interesting saying: "How does a project get 1 year behind schedule? 1 day at a time."
Windows User
comment: Poor estimations are found out usually deep in the testing phase! until then all goes according to plan!ref: Fact 28
Page 8: SW Engineering Management

Poor Estimation#1 factor for runaway projects

• Most software estimates are performed at the beginning of the life cycle. This makes sense until we realize that estimates are obtained before the requirements are defined and thus before the problem is understood. Estimation, therefore, usually occurs at the wrong time.

• Oddly, there seems to be general agreement that this fact is correct. The practice it describes is absurd. Someone should be crying out to change things. But no one is.

• It is important to note that runaway projects, at least those that stem from poor estimation, do not usually occur because the programmers did a poor job of programming.

8

[email protected] (2010)

Windows User
ref: Fact 8/9ref: Fact 23 : 50-51% of failure causes...Comment: sum is not 100%, as some failures are caused deue to more than one reason!
Windows User
Comment: Shortcuts, bad practices, lack of methodology, etc..., are symptoms of the spiraling schedule, however bad estimation is a root cause!
Page 9: SW Engineering Management

Unstable Requirements#2 factor for Runway projects

• Nearly everyone accepts the fact that requirements must be allowed to change, and the only remaining disagreement is about how to keep control under those circumstances.

• If the problem was exploring requirements to lead them toward stability, the solution was seen to be prototyping. – We would build a sample solution, according to this

idea, and let the users try it out to see if it was what they wanted.

• The Extreme Programming methodology calls for a representative of the user community to reside with the software project team during development!

9

[email protected] (2010)

Windows User
ref: Fact 23ref: Glass 1998Comment: sum is not 100%, as some failures are caused deue to more than one reason!
Page 10: SW Engineering Management

Sounds familiar?• Estimation is done at the wrong time

• Estimation is done by the wrong people– Most software estimates are made either by upper management or by marketing.

• (Wrong) Estimations are not corrected– Estimations are rarely adjusted as the project proceeds.

• Estimation is nevertheless the most important factor.– As estimates are so faulty, you'd think they would be treated as relatively

unimportant. Right? Wrong! There is little reason to be concerned when software projects don’t meet estimated target. But everyone is concerned anyway!

• There is a disconnect between management and programmers. – In one research study of a project that failed to meet its estimates and was seen

by its management as a failure, the technical participants saw it as the most successful project they had ever worked on.

10

[email protected] (2010)

Windows User
ref: Facts 8 - 11
Page 11: SW Engineering Management

Programmers role

• In a research group, attendees asked to work on a small task, with deliberately too much to do and not enough time.

– Expectation: the attendees will try to do the whole job, do it correctly, and therefore will produce an unfinished product.

– Actual outcome: not so, these attendees scrambled mightily to achieve the impossible schedule, thus producing sketchy and shoddy products that appear to be complete but cannot possibly work.

11

[email protected] (2010)

Windows User
ref: Fact 12comment: research conducted by author
Page 12: SW Engineering Management

Programmers Role (cont.)

Four factors determine the timelines: Cost, Schedule, Features, and Quality.

Extreme Programmers suggest that after the “customer” chooses three of the four factors, the developers get to choose the fourth. This proposes to change the power structure

that is currently such a major contributor to poor estimation.

12

[email protected] (2010)

Windows User
ref: Fact 12comment: Mostly SW team argues on all four elements and may alter some decisions related to all four. However, there is no distinction on responsibility of one specific factor to be solely under SW responsibility.
Page 13: SW Engineering Management

Project Quality13

[email protected] (2010)

Page 14: SW Engineering Management

Quality Attributes• Portability

– a software product that is easily moved to another platform.• Reliability

– a software product that does what it's supposed to do, dependably.

• Efficiency – a software product that economizes on both running time and

space consumption.• Usability

– a software product that is easy and comfortable to use.• Testability

– a software product that is easy to test.• Understandability

– a software product that is easy for a maintainer to comprehend.

• Modifiability – a software product that is easy for a maintainer to change.

14

[email protected] (2010)

Windows User
ref: fact 46
Page 15: SW Engineering Management

Quality (cont.)

There is no correct, generalized ordering of these quality attributes.

However, for any one project, it is vitally important to establish a prioritized list of these attributes from the outset.

Quality is not user satisfaction, meeting requirements, or meeting cost and schedule!

15

[email protected] (2010)

Page 16: SW Engineering Management

100% test coverage is far from enough

• Even if 100 percent test coverage (unit testing) were possible, that is not a sufficient criterion for testing.

• Most defects are “very complicated”– 35 percent: missing logic paths (not part of code!)– 40 percent: unique combination of logic paths.

• The goal is to minimize the number and especially the severity of those residual defects.– There will always be residual defects in software, after even the most

rigorous of error removal processes.

• There is no known magic solution to this problem.– Producing successful, reliable software involves matching a variable

number of error removal approaches, typically the more of them the better.

16

[email protected] (2010)

Windows User
ref: fact 33ref: fact 51
Page 17: SW Engineering Management

Errors do cluster!

• ~80% of the defects come from ~20% of the

modules

• About half the modules are error free (Boehm and Basili 2001)

– Some components are more complex than others– Some programmers are better than others

• Bottom line: if you find a larger than expected number of errors in some module, keep looking!

17

[email protected] (2010)

Windows User
ref: Fact 49ref: Davis 1995ref: Basili 2001
Page 18: SW Engineering Management

You cannot controlwhat you cannot measure

Top Ten Software Metrics Reported Using

Number of defects found after release 61%Number of changes or change requests 55%User or customer satisfaction 52%Number of defects found during development 50%Documentation completeness/accuracy 42%Time to identify/correct defects 40%

Defect distribution by type/class 37%Error by major function/feature 32%

Test coverage of specifications 31%

Test coverage of code 31%

18

[email protected] (2010)

Page 19: SW Engineering Management

Bottom Five Software Metrics Reported UsingModule/design complexity 24%Number of source lines delivered 22%Documentation size/complexity 20%Number of reused source lines 16%

Number of function points 10%

19

[email protected] (2010)

Windows User
ref: Fallacy 1comment: originally "you cannot CONTROL what you cannot measure... then perverted from CONTROL --> MANAGE"comment: more research --> what can we gain from these metrics?
Page 20: SW Engineering Management

Project Design20

[email protected] (2010)

Page 21: SW Engineering Management

Design, Design, Design…

Efficiency stems more from good design than from good coding.

Design Patterns are widely accepted as better form of reuse than traditional code reuse (“Designers rarely start from scratch”!) Visser 87

Extreme Programming advocates simple design followed by ongoing refactoring to fix inefficiencies and errors in the design after it is coded.

21

[email protected] (2010)

Windows User
Fact 52ref: Fact 28Comment:design is too wide an issue for this presentation- determining feasibility (always YES!)- "hard part first" design- labot split (designer / coder) or (architect/ designer)- Desig n metrics
Page 22: SW Engineering Management

People Quality matters … a lot ! “ The most important practical finding [of our study] involves the

striking individual differences in programmer performance... The researchers had found differences of up to 28 to 1 while trying to evaluate the productivity difference between batch and timesharing computer usage”. (Sackman 1968)

“Within a group of programmers, there may be an order of magnitude difference in capability“ (Schwartz 1968).

“ Productivity variations of 5:1 between individuals are common “

(Boehm 1975).

“The variability among student programmers is well known, but the high variability among these highly experienced subjects was somewhat surprising “ (Myers 1978).

22

[email protected] (2010)

Windows User
ref: Fact 2
Page 23: SW Engineering Management

Crucial human factor

• Peer reviews are both technical and sociological!– Paying attention to one without the other is a recipe for

disaster.

• There are some errors that most programmers tend to make (thought traps)– Uninitialized parameter– Missing a switch case– Omitting deep design detail– ...

• Rigorous inspections can remove up to 60% – 90% of errors from a software product.– Even before the first test case is run.

23

[email protected] (2010)

Windows User
ref: fact 40
Windows User
ref: Fact 48 - Gramms Trimm 1987 (biased errors)ref: Glass 1991 (thoughts on software errors)comment: programs like resharper attempt to provide some help on the simpler problems...
Windows User
ref: Basili 2001ref: NASA-Goddard 1989
Page 24: SW Engineering Management

Man-Month Myth [Brook’s law]

Complex / Undividable

Simple/ Dividable

Most typical / Only partially dividable

24

[email protected] (2010)

Windows User
ref: [Brook 95]comment: too many cooks burn the kitchen!
Page 25: SW Engineering Management

Refactoring

Refactor when you add a function Refactor when you fix a bug Refactor when you code review

Most common problem with Refactoring is the “social” aspect!

25

[email protected] (2010)

Windows User
ref: Fowler 99Commnet: the moral is:Keep an eye on the design ALWAYS!!!!Keep your code fresh and bot patchy!
Page 26: SW Engineering Management

Hype Frenzy

“Software developers talk a lot about tools. They evaluate quite a few, buy a fair number, and use practically none.”

Most software tool / technique improvements account for about a 5 to 35 percent increase in productivity and quality.

– Fallacy: Occasionally hype improvements get claimed by someone to have "order of magnitude" benefits.

– Problem: SW culture puts schedule conformance above all else, that there is no time to learn about new concepts.

26

[email protected] (2010)

Windows User
ref: Fact 5
Page 27: SW Engineering Management

Project Maintenance27

[email protected] (2010)

Page 28: SW Engineering Management

Reuse vs. Rewrite If more than 20 to 25 percent of a component is to be

revised, it is more efficient and effective to rewrite it from scratch

For every 25 percent increase in problem complexity, there is a 100 percent increase in complexity of the software

28

[email protected] (2010)

Robert Sayegh
Visser 1987
Windows User
ref: NASA 1990commnet: Cost in terms of Skill of Personnel and Time required for the task.Also see the measurement critiria slide...20% overhead of using existing module without change.
Page 29: SW Engineering Management

Suggested schedule guide

Usually on time• 30% Planning• 15% CodingHard to plan ahead• 25% Unit Testing• 25% System Testing

• The initial estimate, although most uncertain, is the most important.

• Making the initial estimate leads the manager to consider the various factors bearing on the size and complexity of the tasks.

29

[email protected] (2010)

Windows User
ref: Brooks 95ref: NASA 1990comment: notice "coding" vs. "implementation"
Page 30: SW Engineering Management

Maintenance is a solution,not a problem!

Maintenance activity involves in average:– 60% Enhancement (new features)

– 18% Adaptive maintenance (OS changes, etc.)

– 17% Error corrections (old bug fixes)

– 5% Refactoring (preventive maintenance)

Software makes it easy (relatively) to change the product during its lifetime.

30

[email protected] (2010)

Windows User
ref: fact 42ref: Glass 1992
Page 31: SW Engineering Management

Maintenance is a solution (cont.)

Better software engineering development leads to more maintenance, not less. Systems found more reliable when developed

using well known methodologies, tools, and techniques. They require repair less often.

Such systems also found to have longer maintenance time! More modifications were queued is such systems

simply because they were easier to change.

31

[email protected] (2010)

Windows User
ref: fact 45ref: Dekleva 1992
Page 32: SW Engineering Management

References• Facts and Fallacies of Software Engineering

(Robert L. Glass, 2002)

• Manager's Handbook for Software Development / (NASA SEL 84-101, 1990)

• Return of Investment (ROI) in SW Project Management(Carpers Jones, 2009)

• Software conflict, the art and science of software engineering(Robert L. Glass, 2006)

• Refactoring, improving the design of existing code(Martin Fowler, 1999)

• The Mythical Man-Month.(Brooks Frederick P. Jr., 1995)

• Why Software Fails(Robert N. Charette, Spectrum.ieee.org Sept. 2005)

32

[email protected] (2010)