The program development life cycle · 程序开发生命周期
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| requirements/rɪˈkwaɪəmənts/ | 需求 | xū qiú |
| development life cycle/dɪˈveləpmənt laɪf ˈsaɪkl/ | 开发生命周期 | kāi fā shēng mìng zhōu qī |
| waterfall/ˈwɔːtəfɔːl/ | 瀑布模型 | pù bù mó xíng |
| maintenance/ˈmeɪntənəns/ | 维护 | wéi hù |
| iterative model/ˈɪtərətɪv ˈmɒdl/ | 迭代模型 | dié dài mó xíng |
| rapid application development/ˈræpɪd ˌæplɪˈkeɪʃn dɪˈveləpmənt/ | 快速应用开发 | kuài sù yìng yòng kāi fā |
| prototype/ˈprəʊtəʊtaɪp/ | 原型 | yuán xíng |
| agile/ˈædʒaɪl/ | 敏捷 | mǐn jié |
| implementation/ˌɪmplɪmənˈteɪʃn/ | 实现 | shí xiàn |
The airport that opened sixteen months late
- Denver's new airport was due to open in October 1993 with the most ambitious baggage system ever built: 4,000 automatic carts, 35 km of track, no human hands. It opened in February 1995, $560 million over budget, with the carts shredding suitcases in test runs.
- The schedule had been fixed before anyone analysed what the system had to do. Requirements kept changing while it was being built. Testing started when there was no time left to fix what it found.
- Every one of those failures has a name in this lesson. A development life cycle 开发生命周期 exists so that a project is planned, managed and controlled instead of discovered.
- This lesson is what a life cycle is for, the three models the syllabus names, and the five stages every program goes through.
晚了十六个月才开放的机场
- 丹佛的新机场原定 1993 年 10 月开放,配备有史以来最雄心勃勃的行李系统:4000 辆自动小车、35 公里轨道、不经人手。它 1995 年 2 月才开放,超支 5.6 亿美元,测试中小车把行李箱撕得粉碎。
- 在任何人分析这个系统必须做什么之前,时间表就已经定死。建造过程中需求不断变化。等到测试开始,已没有时间修复它发现的问题。
- 这些失败在这一课里每一个都有名字。开发生命周期(development life cycle)的存在,就是为了让项目被计划、管理和控制,而不是被"发现"。
- 这一课讲生命周期的用途、大纲点名的三种模型,以及每个程序都要经过的五个阶段。
Why a life cycle is needed
- A development life cycle is the set of stages from idea to finished, maintained software. Its purpose is to plan, manage and control a project: the right product, on time, with good quality.
- It manages complexity by breaking a big program into phases, coordinates a team, and tracks progress against milestones.
- It builds in testing rather than leaving it to the end, records design decisions for whoever maintains the program later, and manages risk.
为什么需要生命周期
- 开发生命周期是从想法到完成并维护的软件的一组阶段。它的目的是计划、管理和控制一个项目:正确的产品、按时、高质量。
- 它把大程序分成阶段来管理复杂性,协调团队,并按里程碑跟踪进度。
- 它把测试内建进来而不是留到最后,为日后维护程序的人记录设计决策,并管理风险。
A development life cycle is used to: · 一个开发生命周期用来:
It structures the work into stages so the team builds the right product, on time, with quality. · 它把工作组织成阶段,这样团队按时、有质量地构建正确的产品。
Which are purposes of a development life cycle? Select all · 所有 that apply. · 哪些是开发生命周期的目的?选出所有适用的。
A life cycle plans, manages and controls. It cannot guarantee correctness; it makes finding and fixing errors part of the plan. · 生命周期计划、管理和控制。它不能保证正确;它让发现和修复错误成为计划的一部分。
Why there is more than one
- No single life cycle fits every project, so several exist and the exam asks you to choose.
- The choice depends on the size and complexity of the program, how clear the requirements 需求 are at the start, how much change is expected, the risk if it fails, the team, and the deadline.
- A payroll system with fixed legal rules and a game whose players do not yet know what they want are different projects. They deserve different cycles.
为什么不止一种
- 没有一种生命周期适合所有项目,所以存在好几种,考试要你选择。
- 选择取决于程序的规模和复杂度、一开始需求(requirements)有多清楚、预期有多少变化、失败的风险、团队,以及截止日期。
- 一个法律规则固定的工资系统,和一个玩家还不知道自己想要什么的游戏,是不同的项目。它们应得不同的周期。
Waterfall
- The waterfall 瀑布模型 model is a linear sequence: analysis, design, coding, testing, maintenance. Each stage is finished, documented and signed off before the next begins.
- Benefits: clear structure, easy to manage and schedule, thorough documentation at every stage, well suited to stable requirements.
- Drawbacks: a change of requirements mid-project means going back up the waterfall; the customer sees nothing working until the end; errors in analysis surface only at testing.
Water does not flow back uphill
瀑布模型
- 瀑布模型(waterfall)是线性序列:分析、设计、编码、测试、维护。每个阶段在下一个开始之前完成、写好文档并签字确认。
- 好处:结构清晰,易于管理和排期,每个阶段都有完整文档,非常适合稳定的需求。
- 坏处:项目中途需求变化意味着回到瀑布上游;客户直到最后才看到能运行的东西;分析中的错误直到测试才浮现。

水不会倒流上山
The waterfall model is best suited to projects where: · 瀑布模型最适合以下项目:
Waterfall is linear with each stage finished before the next — great for stable requirements, poor at mid-project change. · 瀑布是线性的,每个阶段在下一个之前完成——对稳定需求很好,对项目中途的改变很差。
In the waterfall model the customer sees a working version of the program early in the project. · 在瀑布模型中,客户在项目早期就能看到程序的可运行版本。
Nothing runs until coding and testing, near the end. Seeing working software early is the iterative model's and RAD's strength. · 直到接近末尾的编码和测试之前什么都不能运行。早看到可运行软件是迭代模型和 RAD 的长处。
Iterative
- The iterative model 迭代模型 makes repeated passes. Each pass produces a partial working version that is reviewed by the user and refined in the next pass.
- Benefits: problems are caught earlier; the user sees working software early and often; good when requirements are discovered over time.
- Drawbacks: harder to estimate the total cost and time; repeated reviews need the user's attention; the design can drift without discipline.
Build, show, refine, repeat
迭代模型
- 迭代模型(iterative model)进行多次重复。每一次产出一个部分可用的版本,由用户评审,并在下一次中改进。
- 好处:问题更早被发现;用户早早地、经常地看到可运行的软件;适合逐步发现的需求。
- 坏处:总成本和时间更难估算;反复评审需要用户投入;没有纪律设计会漂移。

构建、展示、改进、重复
Rapid application development
- Rapid application development 快速应用开发 (RAD) builds a prototype 原型 quickly, puts it in front of the users, and rebuilds it from their feedback until it becomes the product. Teams often work on parts in parallel.
- Benefits: a very fast first delivery; requirements that change are absorbed as they appear; users shape the product directly.
- Drawbacks: it depends on users being available throughout; the prototype's shortcuts can survive into the product; it suits smaller systems better than large safety-critical ones. Agile 敏捷 methods take the same idea further, with short sprints and constant testing.
Prototype, feedback, prototype again
快速应用开发
- 快速应用开发(rapid application development,RAD)快速构建一个原型(prototype),放到用户面前,根据他们的反馈重建,直到它成为产品。团队常常并行处理各部分。
- 好处:首次交付极快;变化的需求在出现时被吸收;用户直接塑造产品。
- 坏处:依赖用户全程可用;原型的捷径可能留到产品里;它更适合小系统而不是大型安全关键系统。敏捷(agile)方法把同样的想法推得更远:短冲刺、持续测试。

原型、反馈、再原型
In the waterfall model each stage is finished before the next begins, whereas agile works in short iterative sprints with constant feedback. · 在瀑布模型中,每个阶段在下一个开始之前完成,而敏捷以短的迭代冲刺工作,带持续的反馈。
Waterfall is linear (good for stable requirements); agile adapts through short sprints with continuous customer collaboration and testing. · 瀑布是线性的(对稳定需求好);敏捷通过短的冲刺适应,带持续的客户协作和测试。
Match each model to its key idea. · 把每个模型与它的关键想法配对。
Waterfall = linear; iterative = repeated refinement; RAD = prototype-driven and fast. · 瀑布 = 线性;迭代 = 重复的精炼;RAD = 原型驱动且快。
Rapid application development builds a ____ that users try and give feedback on, then rebuilds it. · 快速应用开发构建一个让用户试用并反馈的____,然后重建它。
The prototype is RAD's defining feature; user feedback on it is how the requirements are discovered. · 原型是 RAD 的定义性特征;用户对它的反馈是发现需求的方式。
Worked example: choose a life cycle and justify it
- A company needs software to calculate employees' pay under tax rules that are fixed by law. Which life cycle, and why? Waterfall: the requirements are stable and fully known at the start, the rules can be documented completely in analysis, and the thorough documentation matters for a system that must be correct and audited.
- A start-up wants an app for a new kind of social event; its users are not sure what features they want. RAD: the requirements are unclear and will change, so a prototype that users try and react to discovers them quickly, and the small system suits fast rebuilding.
- Name the model, then link two of its properties to two facts in the scenario.
例题:选择生命周期并论证
- 一家公司需要按法律固定的税则计算员工工资的软件。用哪种生命周期,为什么? 瀑布:需求稳定且一开始就完全已知,规则能在分析中完整记录,而完整的文档对一个必须正确且可审计的系统很重要。
- 一家初创公司想做一款面向新型社交活动的应用;用户不确定想要什么功能。 RAD:需求不清楚且会变化,所以一个让用户试用并反应的原型能快速发现需求,小系统也适合快速重建。
- 说出模型,再把它的两个特性与情境中的两个事实联系起来。
A small team must build an app whose users are unsure what they want, and the users can try versions every week. Which life cycle fits best? · 一个小团队要做一款用户不确定想要什么的应用,用户每周都能试用版本。哪种生命周期最合适?
Unclear, changing requirements plus available users is the RAD case. Waterfall needs the requirements fixed at the start. · 不清楚、会变化的需求加上在场的用户正是 RAD 的场景。瀑布需要一开始就固定需求。
The five stages
- Analysis: find out what the program must do; gather and document the requirements from the users.
- Design: decide how: data structures, algorithms, modules, the user interface, file layouts, expressed in structure charts, flowcharts and pseudocode.
- Coding (implementation 实现): write the source code following the design. Testing: run it against planned test data and correct the errors found.
- Maintenance 维护: after release, keep it working and useful, correcting faults, adapting to change and improving it.
五个阶段
- 分析:弄清程序必须做什么;从用户那里收集并记录需求。
- 设计:决定怎样做:数据结构、算法、模块、用户界面、文件布局,用结构图、流程图和伪代码表达。
- 编码(实现,implementation):按设计编写源代码。测试:用计划好的测试数据运行并纠正发现的错误。
- 维护(maintenance):发布后让它持续可用、有用——纠正故障、适应变化、加以改进。
The program development life cycle · 程序开发生命周期
Step through the stages every project passes through. Getting the requirements right in analysis matters most — a mistake caught in testing is far costlier to fix than one caught early. · 逐步走过每个项目经历的阶段。在分析中把需求弄对最重要——一个在测试中抓住的错误,比一个早抓住的修复起来贵得多。
The analysis stage is mainly about deciding: · 分析阶段主要是关于决定:
Analysis gathers requirements (the "what"); design decides the "how". · 分析收集需求(“什么”);设计决定“如何”。
Put the stages of the program development life cycle in order. · 把程序开发生命周期的阶段按顺序排列。
What, how, build, check, keep working. In the iterative model the middle stages repeat, but the order inside each pass is the same. · 什么、怎样、构建、检查、持续可用。迭代模型中间的阶段会重复,但每一遍内部的顺序相同。
Worked example: what happens in analysis and design
- Describe what happens during the analysis and design stages of the program development life cycle. [4]
- Analysis: the developers interview and observe the users to find out what the program must do; they identify the inputs, the outputs and the processing required, and write a requirements specification that the customer agrees.
- Design: the developers decide how the program will meet those requirements: they choose the data structures and algorithms, decompose the program into modules on a structure chart, design the screens and files, and write pseudocode.
- Two actions and a product for each stage. "They analyse the problem" restates the heading and earns nothing.
例题:分析和设计阶段发生什么
- 描述程序开发生命周期中分析和设计阶段发生的事。[4]
- 分析:开发者访谈并观察用户以弄清程序必须做什么;他们确定输入、输出和所需的处理,并写出客户认可的需求说明。
- 设计:开发者决定程序怎样满足这些需求:选择数据结构和算法,在结构图上把程序分解成模块,设计屏幕和文件,编写伪代码。
- 每个阶段两个动作加一个产物。"他们分析问题"只是重复标题,不得分。
Marks that slip away
- Analysis is what, design is how. "Deciding the algorithms" belongs to design.
- Waterfall is not "the bad one". Its strength is stable, documented requirements; its weakness is change. Give both when asked for benefits and drawbacks.
- RAD is not just "fast". Its defining feature is the prototype and the users' feedback on it.
- Maintenance is a stage, not an afterthought: most of a program's lifetime cost is spent there.
容易丢掉的分
- 分析是"什么",设计是"怎样"。"决定算法"属于设计。
- 瀑布不是"坏的那个"。它的长处是稳定、有文档的需求;短处是变化。被问好处和坏处时两者都要给。
- RAD 不只是"快"。它的定义性特征是原型和用户对它的反馈。
- 维护是一个阶段,不是事后补救:程序一生的大部分成本花在那里。
You've got it
- a life cycle plans, manages and controls a project: phases, milestones, testing built in, decisions recorded, risk managed
- waterfall: linear, each stage signed off, best for stable requirements, poor at change · iterative: repeated refined versions, catches problems early, harder to estimate · RAD: prototype plus user feedback, fast and flexible, needs available users
- choose by requirement clarity, expected change, size and risk, and justify with the scenario
- the stages: analysis (what) → design (how) → coding → testing → maintenance
你掌握了
- 生命周期计划、管理和控制项目:阶段、里程碑、内建测试、记录决策、管理风险
- 瀑布:线性,每阶段签字确认,最适合稳定需求,不擅应变 · 迭代:反复改进的版本,早发现问题,更难估算 · RAD:原型加用户反馈,快而灵活,需要用户在场
- 按需求清晰度、预期变化、规模和风险选择,并用情境论证
- 阶段:分析(什么)→ 设计(怎样)→ 编码 → 测试 → 维护