comp 302: software engineering. comp 302 2 outline of today’s lecture how important is software?...

42
Comp 302: Software Engineering

Upload: joseph-underwood

Post on 23-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 302: Software Engineering

Page 2: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 3022

Outline of today’s lecture

How important is software? Why? An overview of the software industry

What is software engineering? The issues The constraints Key ideas underlying software engineering methodologies

The software life cycle

Page 3: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 3023

But, first Brush up on your programming skills! Make sure you know

how to use arrays in Java how to use the Collections framework and the java.util package

Chapter 19 in Deitel&Deitel, Java How to Program, 6/e Chapters 20, 21 and 22 in Deitel&Deitel, Java How to Program, 5/e

how to write to and read from a file how to build a basic GUI how polymorphism works

You will need these skills for the prototype and the project There will not be time to re-teach you these in this class Your project grades and learning experience will suffer

SIGNIFICANTLY if you don’t have a working knowledge of these

Page 4: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 3024

How important is software? Very important

Many businesses, entire industries, the global economy rely on software

Financial institutions, the stock market, … Aerospace, automotive, almost any manufacturing Inventory, supply-chain management e-commerce Government, medicine, other research, …

Reflected in economic indicators Guess

Turkey’s Gross National Product

Turkey’s yearly budget

Yearly revenue of the software industry

Page 5: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 3025

How important is software? Very important

Many businesses, entire industries, the global economy rely on software

Financial institutions, the stock market, … Aerospace, automotive, almost any manufacturing Inventory, supply-chain management e-commerce Government, medicine, other research, ..

Reflected in economic indicators Guess

Turkey’s Gross National Product ~$200 billion

Turkey’s yearly budget ~$70-80 billion

Yearly revenue of the software industry ~$150 billion

Page 6: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 3026

The Software Marketplace Software remains one of the most innovative and fastest

growing sectors of the global economy, generating revenues of more than $150 billion every year.

Page 7: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

From Software Magazine’s Software 500 for 2004

Company

Software / Services Revenue ($Million)

Corporate Revenue ($Million)

Services as %

R&D as % of Corporate Revenue Employees Software Business Sector

1 IBM $56,946.00 $89,131.00 71.00% 6% 319,000Middleware/Application Server/Web Server

2 Microsoft Corporation $32,190.00 $32,190.00 NA 14% 54,468 Operating Systems3 EDS $20,000.00 $20,000.00 100.00% NA 120,000 IT Sourcing

4 Lockheed Martin $15,275.50 $31,824.00 NA NA 130,000System Integration Services

5 Computer Sciences Corp. $13,846.30 $13,846.30 NA NA 90,000System Integration Services

6 Accenture Ltd. $13,397.20 $13,397.20 NA NA 83,000System Integration Services

7 Hewlett-Packard Company $10,165.00 $56,588.00 NA NA 142,000System Integration Services

8 Oracle Corporation $9,475.00 $9,475.00 NA NA 41,600 Database9 Hitachi, Ltd. $9,345.00 $21,834.00 84.00% 7% 326,344 Other

10 SAP America $8,779.00 $8,848.80 32.00% 14% 30,251Telecommunications Services

11 Capgemini $7,224.00 $7,224.00 NA NA 49,805System Integration Services

12 NTT Data Corporation $6,943.10 $6,943.10 NA NA 7,550

13 Unisys Corporation $4,691.90 $5,911.20 NA NA 37,300System Integration Services

14 Ingram Micro Inc. $4,520.00 $22,613.00 NA NA 11,300 Supply Chain15 SYNNEX Corp. $4,126.20 $4,126.20 NA NA 1,664 Supply Chain

R&D as %

Page 8: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 3028

Characteristics of IT Industry 20 million new jobs in the US in the past seven years Between 1995 and1998, the IT sector contributed one-third of all U.S.

economic growth Between 1996 and 1997, falling prices in the IT sector knocked almost

a full percentage point off US inflation (typically 3-5%) IT now accounts for nearly one-half of all business investment. Workers in the IT industry earn 80% more than the private sector

average--$53,000 as compared to $30,000.(Data taken from the testimony of Harris N. Miller

President, Information Technology Association of America (ITAA)

http://www.itaa.org/govt/cong/c19991208.pdf and http://www.nfo-bi.com/)

Total e-commerce revenue in 2003 was $720 billion. E-commerce revenue in 2004 is estimated to reach $3.2 trillion

(eMarketer estimate, www.nfo-bi.com) US retail e-commerce revenue: $102 billion

25% increase over 2005

Page 9: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 3029

Cost of software Ratio of hardware to software procurement cost

approaching zero Total cost of ownership for computers: 5 times the cost

of hardware Gartner estimate: Keeping a PC functional for five years

costs $7-14 K.

Page 10: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30210

It’s a great time to be a software engineer!

Page 11: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30211

It’s a great time to be a software engineer!

Page 12: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30212

It’s a great time to be a software engineer!

Software engineering is a great and growing profession!

The field is young It is innovative and fast-paced Lots of unsolved, complex problems Lots of new solutions every day Lots of opportunities for smart, energetic people to make their

mark! This is not just the greatest profession of our time –

It’s the greatest profession of all time

Page 13: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30213

Goals of Course

Being smart and energetic doesn’t cut it, so, this course will

introduce you to disciplined software development convey a number of key concepts about

commercial/industrial software development Formal, structured software development process Teams, management, organizations

Page 14: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30214

Outline of today’s lecture How important is software? Why?

An overview of the software industry

What is software engineering? The issues The constraints Key ideas underlying software engineering methodologies

The software life cycle

Page 15: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30215

Software Engineering Classic Definition (1969)

“The establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines.”

IEEE Definition (1993)

“Software Engineering: The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software; that is the application of engineering to software.”

Page 16: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30216

Outline of today’s lecture How important is software? Why?

An overview of the software industry

What is software engineering?The issues

The constraints Key ideas underlying software engineering methodologies

The software life cycle

Page 17: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30217

Issue 1: Fault-Free Software What are Faults?

software behavior unaccounted for in its design

Examples? Therac-25 medical linear accelerator incident Int’l Atomic Energy Agency declared radiological emergency in

2001 in Panama. 28 patients overexposed, 8 died. Data entry software was in error

Ariane-5 (ESA rocket) Rocket lost due to (unneeded) code throwing exception

Patriot missile timing error NASA Climate Orbiter failure London Ambulance Dispatch system

Dropped, duplicated calls

Page 18: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30218

Development failures IBM survey,1994

55% of systems cost more than expected 68% overran schedules 88% had to be substantially redesigned

Advanced Automation System (FAA, 1982-1994) industry average was $100/line, expected to pay $500/line ended up paying $700-900/line $6B worth of work discarded

Bureau of Labor Statistics (1997) for every 6 new systems put into operation, 2 cancelled probability of cancellation is about 50% for biggest systems average project overshoots schedule by 50% 3/4 systems are regarded as ‘operating failures’

Page 19: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30219

Issue 1: Working, quality software Buggy software is a huge problem Defects in software are commonplace

Much more common than in other engineering disciplines

How can we lessen our chances of faults? Use a well-defined process that includes rigorous design, testing, and

programming techniques

Role of design and designers thinking in advance always helps (and it’s cheap!) can’t add quality at the end:

contrast with reliance on testing; more effective, much cheaper makes delegation and teamwork possible

Page 20: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30220

Specification But how do we know behavior is a bug?

Because we have some separate specification of what the program must do Separate from the code

Thus, knowing whether the code works requires us first to define what “works” means A specification

Formal, or semi-formal

Page 21: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30221

Teams and Specifications

Principle #1:

Communication is hard.

In any conversation, the participants will have (slightly) differing interpretations of what was said.

Page 22: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30222

Teams and Specifications (Cont.) Principle #1 is devastating for software development

People will Discuss what to do Divide up the work Implement incompatible components Be surprised when it doesn’t all just work together

Page 23: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30223

What Can We Do? Write specifications

Write down what it is supposed to do Make sure everyone understands it Keep the specification up to date

This does not solve the problem There are always ambiguities, contradictions These lead to bugs But the problem is reduced to manageable size

Page 24: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30224

Summary of Issue 1 A specification allows us to:

Check whether software works Build software in teams at all

Checking that the software works is hard Code reviews Static analysis tools Testing and more testing Formal verification

Page 25: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30225

Issue 2: Time & Budget Constraints

What happens if we are late? miss the market window (competition wins) costs rise, less profit

What happens if we are over budget? loss of profit cancellation of project

Case study: California DMV software (‘87-’93) attempt to merge driver & vehicle registration systems spent 7 years and $50 million before pulling the plug

costs 6.5x initial estimate & expected delivery slipped to 1998!

Page 26: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30226

Time Time is the enemy of all software projects

Taking a long time is inherently risky

Time pressure is (seemingly) at conflict with sound development.

The Netscape vs. IE story

Page 27: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30227

Why? The world changes, sometimes quickly

Technologies become obsolete Many products obsolete before they first ship!

Other people produce competitive software

Software usually depends on many 3rd-party pieces Compilers, networking libraries, operating systems, etc. All of these are in constant motion Moving slowly means spending lots of energy keeping up with

these changes

Page 28: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30228

Issue 2: How Do We Code Efficiently?

Assume we want to minimize time Usually the case Time-to-market exerts great pressure in software

How can we code faster? Obvious answer: Hire more programmers!

Page 29: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30229

Parallel Development How many programmers can we keep busy?

As many as there are independent tasks

People can work on different modules Thus we get parallelism And save time

What are the pitfalls?

Page 30: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30230

Pitfalls of Parallel Development The problems are the same as in parallel computing

More people = more communication Which is hard

Individual tasks must not be too fine-grain Increases communication overhead further

Inherent sequential constraints e.g., pipeline architecture

Page 31: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30231

Interfaces The chunks of work must be independent

But work together in the final system

We need interfaces between the components To isolate them from one another To ensure the final system works

The interfaces must not change (much)! Otherwise, development is not parallel

Page 32: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30232

Defining Interfaces What are interfaces?

They are just specifications!

But of a special kind Interfaces are the boundaries between components

And people

Page 33: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30233

Defining Interfaces Specifying interfaces is most important

Interfaces should not change a lot Effort must be spent ensuring everyone understands the

interfaces Both things require preplanning and time

But often we can stop at specifying interfaces Let individual programmers handle the internals themselves

Page 34: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30234

Software Architecture To define interfaces, we must decompose a system into

separate pieces with boundaries

The decomposition of a system is driven by: What it does How we build it Who builds it

Page 35: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30235

How We Build It Buildings need scaffolding during construction So does software!

Two areas in particular: Lots of extra code that is not really part of the final product Influence of third-party subsystems

Test harnesses, stubs, ways of building and running partial systems

Page 36: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30236

Who Builds It Software architecture reflects the structure of the

organization that builds it

Often, 5 developers = 5 components

Page 37: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30237

Summary of Issue 2 Efficient development requires

Decomposing system into pieces Good interfaces between pieces

The pieces should be large Don’t try to break up into too many pieces

Interfaces are specifications of boundaries Must be well thought-out and well communicated

Page 38: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30238

Issue 3: Satisfies the User’s Needs

Functionality & Usability does what the user’s tasks require easy to learn efficient to use & error rates kept to a minimum leads to high user satisfaction

Bad (even if correct) user interfaces cost money (5% satisfaction -> up to 85% profits) lives (Therac)

How to attack this issue? Capture user’s needs in the form of a requirements

document Iterate on this document, update throughout

lifecycle of project

Page 39: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30239

Conclusions Software engineering boils down to two issues:

Know what you want to do Develop an efficient plan for doing it

Both require specifications To even define what you want to do To ensure everyone understands the plan

Page 40: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30240

Outline of today’s lecture How important is software? Why?

An overview of the software industry

What is software engineering? The issues The constraints Key ideas underlying software engineering methodologies

The software life cycle

Page 41: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30241

Phases

Gather Requirements

Specification

Design

Implementation

Integration

Product

Page 42: Comp 302: Software Engineering. Comp 302 2 Outline of today’s lecture How important is software? Why? An overview of the software industry What is software

Comp 30242

Cost of Finding Flaws Late