软 件 工 程 software engineering

26
软 软 软 软 Software Engineer ing 软软 E-mail : [email protected]. cn

Upload: tegan

Post on 27-Jan-2016

287 views

Category:

Documents


1 download

DESCRIPTION

软 件 工 程 Software Engineering. 主讲:陈 越 E-mail : [email protected]. 软 件 工 程. 教 材. 软件工程导论(第三版) 张海藩 清华大学出版社( 1997 ). 参考书目. 软 件 工 程.  实用软件工程 (第二版) 郑人杰 殷人昆 陶永雷 清华大学出版社( 1996 ).  软件工程 - 实践者的研究方法(英文版 第四版) Roger S. Pressman 机械工业出版社. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 软 件 工 程 Software Engineering

软 件 工 程Software Engineering

主讲:陈 越

E-mail : [email protected]

Page 2: 软 件 工 程 Software Engineering

软 件 工 程

软件工程导论(第三版) 张海藩 清华大学出版社( 199

7 )

教 材

Page 3: 软 件 工 程 Software Engineering

软 件 工 程

实用软件工程 (第二版) 郑人杰 殷人昆 陶永雷 清华大学出版社( 1996 )

软件工程 - 实践者的研究方法(英文版 第四版) Roger S. Pressman

机械工业出版社

参考书目

Page 4: 软 件 工 程 Software Engineering

参考书目

Fundamentals of Software Engineering Carlo Ghezzi, Mehdi Jazayeri, Dino Mandrioli Prentice-Hall, Inc. (1991)

Software Engineering , Theory and Practice Shari Lawrence Pfleeger , Prentice-Hall, Inc.(1998)

Page 5: 软 件 工 程 Software Engineering

参考书目

Object-Oriented Programming Using C++ Ira Pohl Benjamin/Cummings Publishing Company , Inc. (1993)

Page 6: 软 件 工 程 Software Engineering

软 件 工 程

课程评分方法

实验 30% + 期末考试 70% = 总评 100%

作业仅供参考。可通过 e-m

ail 递交,不限时,不记分

Page 7: 软 件 工 程 Software Engineering

软 件 工 程

Software Engineering Laboratory Project

Home Design and Improvement System

The Home Design and Improvement System,

HDIS, is intended to integrate and unify all activities

related to construction and improvements of

homes. Constructing a new home or renovating an

existing home can require a high number of

interactions with numerous individuals, companies,

and stores. The purpose of HDIS is to utilize

computing technology in a positive way to enhance,

facilitate, and promote this activity.

Page 8: 软 件 工 程 Software Engineering

软 件 工 程计划:按用户界面分为 7 个组,分别为: ① Contractor’s Interface Group ② Home Owner’s Interface Group ③ Architectural Interface Group ④ Interior Designer’s Interface Group ⑤ Landscape Interface Group ⑥ Schedule & Supplier’s Interface Group Funding Interface Group Land Office Interface要求:每组不超过 20 人; 组长负责:组织、分工、安排进度

等 组长奖罚:引起过半数组员不满,

改选组长;带领全组顺利完成任务,总评 +5

Page 9: 软 件 工 程 Software Engineering

软 件 工 程内容

⑴ “可行性分析报告”(演讲)⑵ “需求规格说明书”(书面)⑶ “总体设计报告” (演讲)⑷ 推出 HDIS v1.0 (现场验收)⑸ 推出 HDIS 升级版(现场验收) ; 同

时完成面向对象分析练习题一道(演讲)

⑹ 推出 HDIS 期末合并版(现场验收)

要求: 1 、 6 、 7 、 8 组合并; 2 、 3 、4 、 5 组合并。

Page 10: 软 件 工 程 Software Engineering

软 件 工 程

目的 体验软件工程各阶段的主要工作,特

别注意吸取教训; 学会与他人合作,培养团队精神,单

干户将得不到成绩。

现在开始 分组 抽签

行 动 起 来!

Page 11: 软 件 工 程 Software Engineering

第一章 软件危机与软件工程

Late 1950’s:

§1. 软件危机 ( Software Crisis)In the early days: “Software” = “Place a sequence of instructions together to get the computer to do something useful”.

User Computer

Computer became cheaper and more commonHigh level languages were invented

ProgrammerUser Computer

easier

Page 12: 软 件 工 程 Software Engineering

§1. 软件危机Early 1960s: Very few large software projects were done by some experts.

Hacker

Middle to late 1960s:Truly large software systems were attempted.例 : 美国 IBM 公司在 1963 年至 1966 年开发的 IBM360 机的操作系统。这一项目花了 5000人一年的工作量,最多时有 1000 人投入开发工作,写出了近 100 万行源程序。 ...... 据统计,这个操作系统每次发行的新版本都是从前一版本中找出 1000 个程序错误而修正的结果。 ......

Cracker

Page 13: 软 件 工 程 Software Engineering

§1. 软件危机

这个项目的负责人 F. D. Brooks 事后总结了他在组织开发过程中的沉痛教训时说:“ ......正像一只逃亡的野兽落到泥潭中做垂死的挣扎,越是挣扎,陷得越深,最后无法逃脱灭顶的灾难。 ...... 程序设计工作正像这样一个泥潭, ...... 一批批程序员被迫在泥潭中拼命挣扎, ......谁也没有料到问题竟会陷入这样的困境 ......”。 IBM360操作系统的历史教训成为软件开发项目的典型事例为人们所记取。

Software Crisis !

Page 14: 软 件 工 程 Software Engineering

§1. 软件危机

⑴ 项目没有被很好地理解;计划不周,最终导致进度拖延。

例 1. In the late 1960s, a bright-eyed young engineer* was chosen to “write” a computer program for an automated manufacturing application. The reason for his selection was simple. He was the only person in his technical group who had attended a computer programming seminar. He knew the in’s and out’s of assembler language and Fortran, but nothing about software engineering and even less about project scheduling and tracking.*If you’re wondering whether this story is autobiographical, it is!

问题出在哪里?

Page 15: 软 件 工 程 Software Engineering

§1. 软件危机

His boss gave him the appropriate manuals and a verbal description of what had to be done. He was informed that the project must be completed in two months.

He read the manuals, considered his approach, and began writing code. After two weeks, the boss called him into his office and asked how things were going.

“Really great,” said the young engineer with youthful

enthusiasm, “This was much simpler than I thought. I’m probably close to 75 percent finished.”

The boss smiled. “That’s really terrific,” he said. He then told the young engineer to keep up the good work and plan to meet again in a week’s time.

Page 16: 软 件 工 程 Software Engineering

§1. 软件危机

A week later the boss called the engineer into his office and asked, “Where are we?”

“Everything’s going well,” said the youngster, “but I’ve run into a few small snags. I’ll get them ironed out and be back on track soon.”

“How does the deadline look?” the boss asked.

“No problem,” said the engineer. “I’m close to 90 percent complete.”

If you’ve been working in the software world for more than a few years, you can finish the story. It’ll come as no surprise that the young engineer stayed 90 percent complete for the entire project duration and only finished (with the help of others) one month late.

Page 17: 软 件 工 程 Software Engineering

§1. 软件危机

例 2 : In the early 1980s, the United States’ Internal Revenue Service (IRS) hired Sperry Corporation to build an automated federal income tax form processing system. According to the Washington Post, the “system has proved inadequate to the workload, cost nearly twice what was expected and must be replaced soon” (Sawyer 1985). In 1985, an extra $90 million was needed to enhance the original $103 million worth of Sperry equipment. In addition, because the problem prevented the IRS from returning refunds to taxpayers by the deadline, the IRS was forced to pay $40.2 million in interest and $22.3 million in overtime wages for its employees who were trying to catch up.

Page 18: 软 件 工 程 Software Engineering

§1. 软件危机

In 1996, the situation had not improved. The Los Angeles Times reported on March 29 that there was still no master plan for the modernization of IRS computers, only a six-thousand-page technical document. Congressman Jim Lightfoot called the project “a $4-billion fiasco that is floundering because of inadequate planning” (Vartabedian 1996).

Myth: If we get behind schedule, we can add more programmers and catch up.

Reality: Software development is not a mechanistic process like manufacturing. In the words of Brooks, “adding people to a late software project makes it later.”

Page 19: 软 件 工 程 Software Engineering

§1. 软件危机⑵ 没有充分的文档资料 (documentation) Myth: The only deliverable for a successful project is

the working program.

Reality: A working program is only one part of a software configuration that includes programs, documents, and data. Documentation forms the foundation for successful development and, more important, provides guidance for the software maintenance task.

VITAL!

人与人的交流比写程序困难得多。

Managers —— evaluate, track progress, ......Programmers —— communicate to each otherMaintainers ——

Page 20: 软 件 工 程 Software Engineering

§1. 软件危机⑶ 软件可靠性 (reliability)缺少度量的标准,质

量无法保证。 如何保证软件产品的质量,是非常复杂困难的问题。特别对于规模庞大的软件,如: .

The software supporting the American space shuttle consists of 3 million lines of code, including computers on the ground controlling the launch and the flight; there were one hundred thousand lines of code in the shuttle itself in 1985.

President Reagan’s proposed Strategic Defense Initiative (SDI) is estimated to require 10 to 100 million lines of code. Many computer scientists and software engineers continue to believe there is no way to write and test the software to guarantee adequate reliability.

Page 21: 软 件 工 程 Software Engineering

§1. 软件危机

⑷ 软件难以维护 (maintainability)

不易升级 (evolvability)

Myth: Once we write the program and get it to work, our job is done.

Reality: Someone once said that “the sooner you begin ‘writing code’, the longer it’ll take you to get done.” Industry data indicate that between 50 and 70 percent of all effort expended on a program will be expended after it is delivered to the customer for the first time.

Page 22: 软 件 工 程 Software Engineering

§1. 软件危机

Better management

Different team organizations

Better languages & tools

Uniform coding conventions

必须意识到:“软件” 编程,它有自己的生命周期 (life cycle) 。大型软件系统的开发与其它工程项目如建造桥梁、制造飞机、轮船等的开发是同理的。

“软件工程” (Software Engineering)

NATO Conference , Garmisch , Germany , 1968.

解决问题的想法:

Page 23: 软 件 工 程 Software Engineering

§2. 软件工程 (Software Engineering )

1 、原理 (Principles): P.5-7⑴ 用分阶段的生命周期计划严格管理 项目概要计划 里程碑计划 项目控制计划 产品控制计划 验证计划 运行维护计划

⑵ 坚持进行阶段评审⑶ 实行严格的产品控制——基准配置管理 (Baseline con

figuration management)

⑹ 开发小组的成员应该少而精1+1 < 2

⑷ 采用现代程序设计技术⑸ 结果应能清楚地审查— set standards

⑺ 承认不断改进软件工程实践的必要性

Page 24: 软 件 工 程 Software Engineering

§2. 软件工程2 、瀑布模型 (Waterfall Model) :P. 12

维 护

Definition

Feasibility Study

Requirements Analysis

Program Design

Coding & Module Testing

Integration & System Testing

Delivery & Maintenance

System Design

Page 25: 软 件 工 程 Software Engineering

§2. 软件工程

⑴ 顺序性、依赖性

⑵ 推迟程序的物理实现

⑶ 质量保证的观点 —— 阶段文档与评审的要求,利于尽早发现错误。

特 点

Page 26: 软 件 工 程 Software Engineering

§3.技术审查和管理复审任务:发现技术方面的错误,监督项目进度、经费

开支、投资回收的前景等。

作业:阅读 HDIS简介,回答下列问题:

1 、第一件要做的事是什么?

2 、你认为该软件应具备的最重要的两种品质是什么?

3 、你认为怎样分工是最合理的?