Software Engineeringcist.buct.edu.cn/staff/zheng/CSE48300C/01-Introduction.pdf · 2018-03-03 ·...

Preview:

Citation preview

Software Engineering

Zheng Li(李征)

Jing Wan(万静)

Why SE?

几乎所有与技术相关的工作都需要软件工程师

《2017年美国新兴职业报告》

LinkedIn’s 2017 U.S. Emerging Jobs Report

Couse Assessment

Total 40

▪ Lesson 32

▪ Project 8

TextBooks:

▪ 软件工程:实践者的研究方法(英文精编版第8版)

▪ Software Engineering:

A Practitioner’s Approach, 8/e Roger S.Pressman and Bruce R. Maxim

原出版社:McGraw-Hill Science/Engineering/Math

国内出版社:机械工业出版社

28 Feb 7 Mar 14 Mar 21 Mar 28 Mar

4 Apr 11 Apr 18 Apr 25 Apr 2 May

9 May 16 May 23 May 30 May

Couse Assessment

GRADING:

▪ Class collaboration (10%)

▪ Project (30%)

▪ Final Exam (60%)

Couse Assessment

Class Collaboration (10%)

▪ Attendance

▪ Contributing in the class discussions, if any

▪ Be active, but not too much

Project

TBA

Most of Slides are from the slide set to accompany

Software Engineering: A Practitioner’s Approach, 8/e

by Roger S. Pressman and Bruce R. Maxim

Slides copyright © 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman

For non-profit educational use only

The course covers:

Introduction of Software Engineering

The Software Process

Modeling

Quality Management

Managing Software Projects

Topic Covered Today

The nature of software

Introduction of Software Engineering

Chapter 1: The Nature of Software

What is Software?

Software is:

1. instructions (computer programs) that when executed

provide desired features, function, and performance;

2. data structures that enable the programs to adequately

manipulate information and

3. documentation that describes the operation and use of

the programs.

These slides are designed to accompany Software Engineering:

A Practitioner’s Approach, 8/e (McGraw-Hill 2014). Slides

copyright 2014 by Roger Pressman.

14

Program = Data Structure + Algorithm

Software == Program ?

Programs + Associated documentation

such as requirements, design models and user

manuals.

What is Software?

Software

What software have you used?

Software Surrounds Our Civilization

Software Applications

System software

Application software

Engineering/Scientific software

Embedded software

Product-line software

Web/Mobile applications

AI software (robotics, neural nets, game playing)

18

What Does This Mean?

Software is getting more important

The Importance of software

Our civilization runs on software

软件是现代文明的重要基础

C++的设计者 Bjarne Stroustrup

Software Development

Software is developed or engineered,

it is not manufactured in the classical sense.

Software doesn't "wear out."

Although the industry is moving toward component-

based construction, most software continues to be

custom-built.

21

Wear vs. Deterioration

22

Legacy Software

Why must it change?

▪ software must be adapted to meet the needs of new computing

environments or technology.

▪ software must be enhanced to implement new business requirements.

▪ software must be extended to make it interoperable with other more

modern systems or databases.

▪ software must be re-architected to make it viable within a network

environment.

23

WebApps

Modern WebApps are much more than hypertext files with a few pictures

WebApps are augmented with tools like XML and Java to allow Web engineers including interactive computing capability

WebApps may standalone capability to end users or may be integrated with corporate databases and business applications

Semantic web technologies (Web 3.0) have evolved into sophisticated corporate and consumer applications that encompass semantic databases that require web linking, flexible data representation, and application programmer interfaces (API’s) for access

The aesthetic nature of the content remains an important determinant of the quality of a WebApp.

24

Mobile Apps

Reside on mobile platforms such as cell phones or tablets

Contain user interfaces that take both device characteristics and location attributes

Often provide access to a combination of web-based resources and local device processing and storage capabilities

Provide persistent storage capabilities within the platform

A mobile web application allows a mobile device to access to web-based content using a browser designed to accommodate the strengths and weaknesses of the mobile platform

A mobile app can gain direct access to the hardware found on the device to provide local processing and storage capabilities

As time passes these differences will become blurred

26

Cloud Computing

27

Cloud Computing

Cloud Computing

Cloud computing provides distributed data storage and processing resources to networked computing devices

Computing resources reside outside the cloud and have access to a variety of resources inside the cloud

Cloud computing requires developing an architecture containing both frontend and backend services

Frontend services include the client devices and application software to allow access

Backend services include servers, data storage, and server-resident applications

Cloud architectures can be segmented to restrict access to private data

29

Software Product Line

Software Product line is a set of software-intensive systems that

share a common set of features and satisfy the needs of a

particular market

These software products are developed using the same

application and data architectures using a common core of

reusable software components

A software product line shares a set of assets that include

requirements, architecture, design patterns, reusable components,

test cases, and other work products

A software product line allow in the development of many products

that are engineered by capitalizing on the commonality among all

products with in the product line

30

Chapter 2: Software Engineering

How Successful Have We Been?

Perform tasks more quickly and effectively

▪ Word processing, spreadsheets, e-mail

Support advances in medicine, agriculture,

transportation, multimedia education, and most

other industries

Many good stories

However, software is not without problems

火星气候探测者号的星际迷航

火星气候探测者号在1997年发射,在太空中飞行几个月以后,由于导航错误,最终在火星大气层解体。

阿丽亚娜5型运载火箭,昂贵的简单复制

1996年6月4日,阿丽亚娜5型运载火箭的首次发射点火后,火箭开始偏离路线,最终被逼引爆自毁,整个过程只有短短30秒。

http://www-users.math.umn.edu/~arnold/disasters/ariane5rep.html

阿丽亚娜5型运载火箭,昂贵的简单复制

阿丽亚娜5型运载火箭基于前一代4型火箭开发。4型火箭系统中,对一个水平速率的测量值使用了16位的变量及内存,而5型火箭的开发人员简单复制了这部分程序,而没有对新火箭进行数值的验证,结果发生了致命的数值溢出。发射后这个64位带小数点的变量被转换成16位不带小数点的变量,引发了一系列的错误,从而影响了火箭上所有的计算机和硬件,瘫痪了整个系统,

http://www-users.math.umn.edu/~arnold/disasters/ariane5rep.html

Northeast Blackout of 2003

Affected 10 million

people in Ontario,

Canada

Affected 40 million

people in 8 US

states

Financial losses of

$6 Billion USD

508 generating

units and 256

power plants shut

down

The alarm system in the energy management system failed

due to a software error and operators were not informed of

the power overload in the system

Apple 2015发布会

More

软件 Bug 引发的十次严重后果http://blog.jobbole.com/97/

How Successful Have We Been?

A fault: occurs when a human makes a

mistake, called an error, in performing some

software activities

A failure: is a departure from the system’s

required behavior

Software Engineering

Some realities:

▪ a concerted effort should be made to understand the problem before a software solution is developed

▪ design becomes a pivotal activity

▪ software should exhibit high quality

▪ software should be maintainable

The seminal definition:

▪ [Software engineering is] the establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines.

Software Engineering

The IEEE definition:

▪ Software Engineering:

1. The application of a systematic, disciplined, quantifiable approach to

the development, operation, and maintenance of software; that is, the

application of engineering to software.

2. The study of approaches as in (1).

Relationship between CS and SE

Computer Science: focusing on computer hardware,

compilers, operating systems, and programming

languages; Computer science is concerned with theory

and fundamentals.

Software Engineering: a discipline that uses computer

and software technologies as a problem-solving tools;

Software engineering is concerned with the

practicalities of developing and delivering useful

software.

Relationship between CS and SE

A Layered Technology

50

Software Engineering

a “quality” focus

process model

methods

tools

A Process Framework

Process framework

▪ Framework Activities

work tasks

work products

milestones & deliverables

QA checkpoints

▪ Umbrella Activities

51

Framework Activities

Communication

Planning

Modeling

▪ Analysis of requirements

▪ Design

Construction

▪ Code generation

▪ Testing

Deployment

52

Umbrella Activities

Software project tracking and control

Risk management

Software quality assurance

Technical reviews

Measurement

Software configuration management

Reusability management

Work product preparation and production

53

Adapting a Process Model

the overall flow of activities, actions, and tasks and the interdependencies among them

the degree to which actions and tasks are defined within each framework activity

the degree to which work products are identified and required

the manner which quality assurance activities are applied

the manner in which project tracking and control activities are applied

the overall degree of detail and rigor with which the process is described

the degree to which the customer and other stakeholders are involved with the project

the level of autonomy given to the software team

the degree to which team organization and roles are prescribed

54

55

The Essence of Practice

Polya suggests:

1. Understand the problem (communication and analysis).

2. Plan a solution (modeling and software design).

3. Carry out the plan (code generation).

4. Examine the result for accuracy (testing and quality assurance).

56

Understand the Problem

Who has a stake in the solution to the problem? That is, who are the stakeholders?

What are the unknowns? What data, functions, and features are required to properly solve the problem?

Can the problem be compartmentalized? Is it possible to represent smaller problems that may be easier to understand?

Can the problem be represented graphically? Can an analysis model be created?

57

Plan the Solution

Have you seen similar problems before? Are there patterns that are recognizable in a potential solution? Is there existing software that implements the data, functions, and features that are required?

Has a similar problem been solved? If so, are elements of the solution reusable?

Can subproblems be defined? If so, are solutions readily apparent for the subproblems?

Can you represent a solution in a manner that leads to effective implementation? Can a design model be created?

58

Carry Out the Plan

Does the solution conform to the plan? Is source code traceable to the design model?

Is each component part of the solution provably correct? Has the design and code been reviewed, or better, have correctness proofs been applied to algorithm?

59

Examine the Result

Is it possible to test each component part of the solution? Has a reasonable testing strategy been implemented?

Does the solution produce results that conform to the data, functions, and features that are required? Has the software been validated against all stakeholder requirements?

Hooker’s General Principles

1: The Reason It All Exists

2: KISS (Keep It Simple, Stupid!)

3: Maintain the Vision

4: What You Produce, Others Will Consume

5: Be Open to the Future

6: Plan Ahead for Reuse

7: Think!

60

Software Myths

Affect managers, customers (and other non-technical

stakeholders) and practitioners

Are believable because they often have elements of

truth,

but …

Invariably lead to bad decisions,

therefore …

Insist on reality as you navigate your way through

software engineering

61

62

How It all Starts

SafeHome:▪ Every software project is precipitated by some business

need— the need to correct a defect in an existing application;

the need to the need to adapt a ‘legacy system’ to a changing business environment;

the need to extend the functions and features of an existing application, or

the need to create a new product, service, or system.

Email:lizheng@mail.buct.edu.cn

http://cist.buct.edu.cn/staff/zheng/

wanj@mail.buct.edu.cn

Recommended