csc 205, software engineering i 1 csc 205 software engineering i spring quarter, 2000 clark s....

29
CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D.

Post on 20-Dec-2015

222 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

1

CSC 205Software Engineering I

Spring Quarter, 2000

Clark S. Turner, J.D., Ph.D.

Page 2: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

2

Why are we here?

• Software Engineering is...– the study of software process, software development

principles, methods and tools¤ requirements and design notations¤ implementation strategies¤ testing methods¤ maintenance techniques¤ Management strategies

– the production of quality software, delivered on-time, within budget, and satisfying users’ needs

halfway between an art form and a discipline?

Page 3: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

3

Administration

• Instructor– Clark S. Turner

• Required Books– Wiegers, Software

Requirements– Brooks: Mythical Man-Month,

20th anniversary edition

• Other References– Weinberg, Requirements – Jackson, Software

Requirements and Specifications

• Office: 14-211– phone 756 6133– Hours:

¤ Monday 9-10 am¤ Tuesday 9-10 am¤ Wednesday 10-11 and 2-4

• Prerequisites– CSC 103 or equivalent

¤ will be checked and enforced

• Future course website– www.csc.calpoly.edu/

~csturner

Page 4: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

4

Very Preliminary Syllabus ...no guarantees that the course will follow this plan...

• Introduction to Software Engineering

– scope and principles – software methods and tools– lifecycle models– overview of requirements issues

• Team issues– mythical man-month

• Requirements Engineering– concepts and techniques

¤ informal specs

– methods and tools¤ data-flow diagrams¤ entity-relationship diagrams¤ finite-state machines¤ Petri-nets¤ formal specification

• Testing, Verification and Validation– strategies at the requirements stage– test plans

Page 5: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

5

Assessment

• Final grade based on– Midterm (10%)– Final (10%)– Project contribution (50%)– Class and lab contribution (30%)

• Late work policy– Start with an “A” cap on the course grade

¤ late delivery of an activity report drops cap by 1/3 grade (A to A- etc)

¤ non-delivery of an activity report drops cap by an entire grade¤ grade cap drops are cumulative

• Academic (dis)honesty– Our main concern: don’t ever use anyone else’s work

without clearly indicating the source!

Page 6: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

6

The problem and the response...

• Software is typically– late– over budget– faulty– hence... the “software crisis”

• Software Engineering– software production should use established engineering

principles– history: coined in 1967 and endorsed by a NATO conference

in 1968

Page 7: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

7

What type of software?

• Small single-developer projects can typically get by without Software Engineering– typically no deadlines, small budget (freeware), not safety-

critical

• Software Engineering is required for– large projects (100,000 lines of code and up)– multiple subsystems– teams of developers (often geographically dispersed)– safety-critical systems (software that can kill people...)

Page 8: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

8

Software Engineering is young

• Traditional engineering disciplines have been around for hundreds, if not thousands, of years

• Software Engineering still needs– standard specification and design techniques– formal analysis tools– established processes

• Currently experimenting in– techniques, notations, metrics, processes, architecture, etc.– Some success has been reported– A foundation is being formed...

Page 9: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

9

What is Engineering?

• Engineering is– sequence of well-defined, precisely-stated, sound steps,

which follow method or apply technique based on some combination of

¤ theoretical results derived from a formal model¤ empirical adjustments for un-modeled phenomenon¤ rules of thumb based on experience

• This definition is independent of purpose ...– i.e. engineering can be applied to many disciplines

• Side question: Are we employees or professionals?– are we independent in our employ?– do we have obligations to society?

Page 10: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

10

Software Engineers require ...

• a broad range of skills– Mathematics– Computer Science– Economics– Management– Psychology

• applied to all phases of software production!

Page 11: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

11

Software economics...

• Software Production = development + maintenance• …but maintenance accounts for approximately 67%

of the overall costs during the lifecycle of a software product

• Thus … faster development is not always a good thing– may result in software that is difficult to maintain– resulting in higher long-term costs

Page 12: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

12

Lifecycle Costs (Schach: page 10)

Maintenance 67%

Integration6%

Design6%

Modulecoding5%

Moduletesting7%

Problem Def3%

Requirements4%

Planning2%

Page 13: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

13

Maintenance Aspects

• All products undergo some form of maintenance to account for change ...

• Three major types of maintenance– Perfective (60.5%)

¤ Changes to improve the software product

– Adaptive (18 %)¤ Responding to changes in a product’s environment

– Corrective (17.5 %)¤ Fixing bugs...

Real world is constantly changing

Maintenance is a necessity

Page 14: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

14

Requirements and Design Aspects• User needs and perceptions are difficult to assess

- functionality isn’t enough• Requirements specification is a contract with the

customer• Requirements must provide a definitive basis for

testing• Design decomposition is critical to mastering

complexityRequirements addresses “what?”

Design addresses “how?”

Page 15: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

15

Verification and validation must

permeate the software lifecycle

Verification and Validation Aspects

• The longer a fault exists in software – the more costly it is to detect and correct – the less likely it is to be fixed correctly

¤ e.g. fixing it “breaks” something else!

• 60-70 % of all faults detected in large-scale software products are introduced in its specification and design

• Thus...faults must be found early using improved specification techniques and “perpetual testing”– requires specification and design V&V– validate first description and verify each phase with respect to

previous– evaluate testability and develop test plans at each phase

Page 16: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

16

Relative cost of fixing a fault

Requirements Specificaiton Planning Design Impelementation Integration Maintenance

200

30

10

4321

Page 17: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

17

Team Programming Aspects• Reduced hardware costs afford hardware that can

run large and complex software systems – products too complex for an individual to develop

• Most software is produced by a team of software engineers, not an individual

– Team programming leads to interface problem between components and communications problems between members

– Team programming requires good team organization to avoid excessive communication

Team programming introduces communication overhead

Page 18: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

18

Software Engineering Principles

• Deal with both process and product• Applicable throughout the lifecycle• Need abstract descriptions of desirable properties• Same principles as other engineering disciplines

Principles

methods and techniques

methodologies and tools

process and environments

Page 19: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

19

Rigor and Formality

• Rigor is a necessary complement to creativity– enhances understandability, improves reliability, facilitates

assessment, controls cost

• Formality is the highest degree of rigor• Engineering = sequence of well-defined, precisely-

stated, sound steps, which follow method or apply technique based on some combination of– theoretical results derived from formal model– empirical adjustments for un-modeled phenomenon– rules of thumb based on experience

Page 20: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

20

Separation of Concerns

• Enables mastering of inherent complexity• Allows concentration on individual aspects

– product features: functions, reliability, efficiency, environment, user interface, etc.

– process features: development environment, team organization, scheduling, methods,

– economics and management

• Concerns may be separated by– time (process sequence)– qualities (e.g., correctness vs. performance)– views to be analyzed separately (data vs. control)– components

• Leads to separation of responsibility

Page 21: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

21

aspects of modules in isolation

overall characteristics of integrated systembottom-up

top-down

Modularity and Decomposition

• Complex system divided into modules• Modular decomposition allows separation of

concerns in two phases

• Modularity manages complexity, fosters reusability, and enhances understandability– composibility vs. decomposibility– high cohesion and low coupling

Page 22: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

22

Abstraction

• Identify important aspects and ignore details• Abstraction depends on the purpose or view• Models are abstractions of reality• Abstraction permeates software development

– from requirements to code– from natural language descriptions to mathematical models– from products to process

• One specification but many realizations

Page 23: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

23

Anticipation of Change

• Constant change is inevitable in large-scale software systems– software repair & error elimination– evolution of the application

• Identify likely changes and plan for change– software requirements usually not entirely understood– users and environments change– also affects management of software process

• Maintenance is process of error correction and modification to reflect changing requirements– regression testing with maintenance– configuration management of versions

Page 24: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

24

Generality

• Focus on discovering more general problem than the one at hand– fosters potential reuse– facilitates identification of OTS solution

• Trade-offs between initial costs vs. reuse savings• General-purpose, OTS products are general trend in

application domains– standard solutions to common problems

Page 25: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

25

Incrementality

• Step-wise process with successively closer approximations to desired goal

• Identify and “deliver” early subsets to gain early feedback– fosters controlled evolution

• Incremental concentration on required qualities• Intermediate deliverables may be prototypes• Requires careful configuration management and

documentation

Page 26: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

26

Formal development methods

lead to higher reliability

Formal analysis techniques are critical

Formal development methods

lead to higher reliability

Formal analysis techniques are critical

Reliability

• As software application pervades critical systems, reliability is paramount

• Cost of failure exceeds cost of development• Reliability measures how well a system provides

expected service over time– all service is not equal– software reliability based entirely on development– software does not degrade

Page 27: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

27

Discussion: Relationships between Principles• formality and modularity• formality and separation of concerns• separation of concerns and modularity• modularity and abstraction• modularity and anticipation of change• anticipation of change and generality• abstraction and generality• modularity and incrementality• anticipation of change and incrementality• generality and incrementality

Page 28: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

28

Sample Software Qualities

• Correctness• Reliability• Robustness• Performance• Usability• Testability• and more…

– what are the relationships between these qualities?– What about safety? Is this a property of software or

systems?¤ Is it subsumed under “reliability”???

Page 29: CSC 205, Software Engineering I 1 CSC 205 Software Engineering I Spring Quarter, 2000 Clark S. Turner, J.D., Ph.D

CSC 205, Software Engineering I

29

Uniqueness of Software

• What are we dealing with?– The stuff doesn’t “wear out” (but does exhibit a bathtub

curve …)– The stuff has no “tolerance” - it is binary– The stuff weighs nothing, and you can’t really “see” it.– It is very plastic, we can always “change” it in place

¤ try that with your automobile!

• Why don’t other engineering principles apply?– For example, statistical reliability methods?

¤ No mean value theorem applies¤ No accurate user profile or operational distribution

– So, when we test, what do we find out about software?¤ Can’t tell for sure if our software is good or not.