88b269d56345875706178b62bfcc964f.ppt
- Количество слайдов: 26
软件 程 Software Engineering 主讲:陈 越 E-mail : chenyue@cs. zju. edu. cn
软件 程 教 材 软件 程导论(第三版) 张海藩 清华大学出版社(1997)
参考书目 软件 程 实用软件 程 (第二版) 郑人杰 殷人昆 陶永雷 清华大学出版社(1996) 软件 程 -实践者的研究方法 (英文版 第四版) Roger S. Pressman 机械 业出版社
参考书目 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)
参考书目 Object-Oriented Programming Using C++ Ira Pohl Benjamin/Cummings Publishing Company , Inc. (1993)
软件 程 课程评分方法 实验 30% + 期末考试 70% = 总评 100% 作业仅供参考。可通过e-mail 递交,不限时,不记分
软件 程 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.
软件 程 计划:按用户界面分为 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
内容 软件 程 ⑴ “可行性分析报告”(演讲) ⑵ “需求规格说明书”(书面) ⑶ “总体设计报告” (演讲) ⑷ 推出HDIS v 1. 0(现场验收) ⑸ 推出HDIS 升级版(现场验收); 同时完 成面向对象分析练习题一道(演讲) ⑹ 推出HDIS期末合并版(现场验收) 要求: 1、6、7、8组合并; 2、3、4、5 组合并。
软件 程 目的 体验软件 程各阶段的主要 作,特别 注意吸取教训; 学会与他人合作,培养团队精神,单干 户将得不到成绩。 现在开始 分组 行 动 起 来! 抽签
第一章 软件危机与软件 程 § 1. 软件危机 (Software Crisis) In the early days: “Software” = “Place a sequence of instructions together to get the computer to do something useful”. User Computer Late 1950’s: Computer became cheaper and more common High level languages were invented User Programmer Computer easier
§ 1. 软件危机 Early 1960 s: Very few large software projects were done by some experts. Hacker Cracker Middle to late 1960 s: Truly large software systems were attempted. 例: 美国IBM公司在 1963年至 1966年开发的 IBM 360机的操作系统。这一项目花了5000人一 年的 作量,最多时有1000人投入开发 作, 写出了近 100万行源程序。. . . 据统计,这个 操作系统每次发行的新版本都是从前一版本中 找出 1000个程序错误而修正的结果。. . .
§ 1. 软件危机 这个项目的负责人F. D. Brooks事后总结了他 在组织开发过程中的沉痛教训时说:“. . . 正像 一只逃亡的野兽落到泥潭中做垂死的挣扎,越是挣 扎,陷得越深,最后无法逃脱灭顶的灾难。. . . 程序设计 作正像这样一个泥潭,. . . 一批批程 序员被迫在泥潭中拼命挣扎,. . . 谁也没有料到 问题竟会陷入这样的困境. . . ”。IBM 360操作系 统的历史教训成为软件开发项目的典型事例为人们 所记取。 Software Crisis !
§ 1. 软件危机 问题出在哪里? ⑴ 项目没有被很好地理解;计划不周,最终导致 进度拖延。 例1. In the late 1960 s, 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!
§ 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.
§ 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.
§ 1. 软件危机 例2: In the early 1980 s, 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.
§ 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. ”
§ 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. Managers —— evaluate, track progress, . . . Programmers —— communicate to each other Maintainers —— VITAL! 人与人的交流比写程序困难得多。
§ 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.
§ 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.
§ 1. 软件危机 解决问题的想法: Better management Different team organizations Better languages & tools Uniform coding conventions 必须意识到:“软件” 编程,它有自己的生 命周期 (life cycle)。大型软件系统的开发与其它 程项目如建造桥梁、制造飞机、轮船等的开 发是同理的。 “软件 程”(Software Engineering) NATO Conference , Garmisch , Germany , 1968.
§ 2. 软件 程(Software Engineering ) 1、原理(Principles): P. 5 -7 ⑴ 用分阶段的生命周期计划严格管理 项目概要计划 里程碑计划 项目控制计划 产品控制计划 验证计划 运行维护计划 ⑵ 坚持进行阶段评审 ⑶ 实行严格的产品控制——基准配置管理 (Baseline configuration management) ⑷ 采用现代程序设计技术 ⑸ 结果应能清楚地审查— set standards ⑹ 开发小组的成员应该少而精 1+1 < 2 ⑺ 承认不断改进软件 程实践的必要性
§ 2. 软件 程 2、瀑布模型(Waterfall Model) : P. 12 定 义 Definition Feasibility Study Requirements Analysis System Design 开 发 Program Design Coding & Module Testing Integration & System Testing 维护 Delivery & Maintenance
§ 2. 软件 程 特 点 ⑴ 顺序性、依赖性 ⑵ 推迟程序的物理实现 ⑶ 质量保证的观点 —— 阶段文档与评 审的要求,利于尽早发现错误。
§ 3. 技术审查和管理复审 任务:发现技术方面的错误,监督项目进度、经费 开支、投资回收的前景等。 作业:阅读HDIS简介,回答下列问题: 1、第一件要做的事是什么? 2、你认为该软件应具备的最重要的 两种品质是什么? 3、你认为怎样分 是最合理的?
88b269d56345875706178b62bfcc964f.ppt