登陆注册
27082000000031

第31章 Software Engineering(1)

5.1 Software Engineering

Software engineering is the application of tools?? methods?? and disciplines to produce and maintain an automated solution to a real-world problem. It requires the identification of a problem?? a computer to execute a software product?? and an environment ??composed of people?? equipment?? computers?? documentation?? and so forth?? in which the software product exists. Clearly?? without computer programs there would be no software product and no software engineering. But this is only a necessary condition; it is not sufficient.

A large-scale software project spans a considerable period of time. A number of distinct phases can be identified over this period of time. Together?? these make up what is known as the "software life cycle".

While the actual terminology may differ?? most authors identify five key phases in the software life cycle.

The first phase?? requirements definition?? refers to the period during which the requirements of the system desired?? that is?? its functional characteristics and operational details?? are specified. The input to this phase is the stated ??often rather loosely stated?? needs for the software. Typically?? a "requirements document" is the output of this phase?? a set of precisely stated properties or constraints that the final product must satisfy. This is not a design?? but rather precedes the design?? specifying what the system should do without specifying how it is to do it. The existence of a requirements document provides something against which a design ??the next phase in the life cycle?? can be validated. Sometimes a quickly developed prototype can be a useful vehicle for debugging requirements.

As with any of the phases?? it is important that errors not be allowed to move into subsequent phases. An error in requirements?? for example?? a misstated function?? leads to a faulty design and an implementation that does not do what is required. If this is allowed to proceed undetected?? say?? until the testing phase?? the cost of repairing this error ??including redesign and re-implementation?? can be substantial.

The second phase?? design?? is predominantly creative?? while some would argue that creativity is inherent and cannot be trained or improved?? it can certainly be enhanced by the use of good procedures and tools. The input to this phase is a ??debugged and validated?? requirements document?? the output is a design expressed in some appropriate form ??for example?? pseudo-code??. Validation of a design is important. Each requirement in the requirements document must have a corresponding design fragment to meet it. Formal verification?? while possible to a limited extent?? can be exceedingly difficult. More informal revolve the entire design team?? management?? and even the client.

The third phase?? implementation?? is the actual coding of the design developed in the second phase. The lure of this phase is strong?? and many a foolhardy programmer has been drawn to it before adequately laying the groundwork in the first two phases. As a result?? requirements are incompletely understood and the design is flawed. The implementation proceeds blindly?? and many problems arise as a result.

The fourth phase?? testing?? is concerned with demonstrating tile correctness of the implemented program. Inevitably some testing is performed as part of the previous two phases as well. Any experienced programmer mentally tests each line as it is produced and mentally simulates the execution of any module prior to any formal testing stage. Testing is never easy. Edsger Dijkstra has written that while testing effectively shows tile presence of errors?? it can never show their absence. A "successful" test run means only that no errors were uncovered with the particular circumstances tested; it says nothing about other circumstances. In theory?? the only way that testing can show that a program is correct as if all possible cases are tried ??known as an exhaustive test???? a situation technically impossible for even the ******st programs. Suppose?? for example?? that we have written a program to compute the average grade on an examination. An exhaustive test would require all possible combinations of marks and class sizes; it could take many years to complete the test.

The fifth phase is program maintenance phase. Student programmers?? unfortunately?? rarely become involved in this phase. Its importance in the real world?? however?? cannot be over emphasized?? since the cost of maintaining a widely used program can match or exceed the cost of developing it. Unlike hardware maintenance?? software maintenance deals not with repair of deteriorated components?? but with repair of design defects?? which may include the provision of added functions to meet new needs. The ability of programmers to produce new programs is clearly affected by the amount of time they spend maintaining old ones. The inevitability of maintenance must be recognized?? and steps must be taken to reduce its time consumption.

Software design can be viewed in the same way. We use the requirement specification to define the problem. Then?? we declare something to be a solution to a problem if it satisfies all the requirements in the specification. In many cases?? the number of possible solutions is limitless. A customer can choose to implement one solution from among several possibilities.

同类推荐
  • 美国历史(英文版)

    美国历史(英文版)

    《美国学生历史》(英汉双语版)出版问市后,受到众多读者欢迎,不少读者期望能买到英文原版关于美国历史的教材,《美国历史》正是为满足这部分读者纯英文阅读的需求。这本全英文版的《美国历史》由美国著名历史学家比尔德编写,以西方人的视角,深入浅出地介绍了从殖民地时期到世界大战期间美国历史上的重大事件与文明发展。《美国历史》按不同历史时期,分知识点,一一讲述,便于理解记忆。为使读者更好地理解和掌握各章的重点和难点,每章末尾还附有练习题和思考题。文中还配有相应的插图,便于对不同地域和各个时期人物及事件有更直观感受。
  • 《新编大学英语③》词汇突破记忆

    《新编大学英语③》词汇突破记忆

    本书根据《新编大学英语③》(浙江大学编著,外语教学与研究出版社出版)教材编写,包含课内阅读和课后阅读的所有词汇、词组,并给出同义、反义、考点、例句、辨析。编写本书的目的是提倡学生在句子中记忆单词,以便快速突破词汇关。书中每个单元都有同步测试题,书后有词汇自测题三套,供学生自我检查用。对于使用《新编大学英语③》教材的学生,本书不失为一本有助于强化理解、联想记忆、方便实用的学习辅导书。
  • 出行英语会话想说就会说

    出行英语会话想说就会说

    本书通过真实的对话情景以及旅游过程中可能遇到的各类问题,帮助大家掌握英语口语交流的基本技能,内容涉及交通、旅游观光等。本书借鉴了国内外的实用旅游用书,使读者在学习英语口语的同时,能够充分了解各个国家的国家概况、风土人情、异国礼仪等与旅游密不可分的相关信息。
  • 被侮辱与被损害的人

    被侮辱与被损害的人

    陀思妥耶夫斯基是一位超越时空的作家,又是一位充满矛盾的作家。正如世界有多复杂,人有多复杂,陀思妥耶夫斯基本人也有多复杂一样。现在,俄罗斯和全世界已悄然兴起一门新的学问——陀思妥耶夫斯基学。陀思妥耶夫斯基本人是个谜,他的作品也是个谜。破译这个谜,是全世界陀思妥耶夫斯基学家研究的基本课题。专家们把陀思妥耶夫斯基的生平与创作,一般分为两个时期:西伯利亚之前和西伯利亚之后。本书《被侮辱与被损害的人》(一八六一)则处于这两个时期之间,带有明显的过渡性质:既保留了四十年代作品的思想、内容和风格,又承上启下,开创了作家后期以探索社会秘密、人心秘密为主的社会-心理-哲理小说的先河。
  • 双语学习丛书-青春之火

    双语学习丛书-青春之火

    流淌心灵的隽语,记忆的箴言,在双语的世界里,感受英语学习的乐趣,体会英语学习的奥妙,提高英语学习的能力!丛书包括:爱的交融、财富精英、成长课堂、醇香母爱、父爱如山、故乡情怀、节日趣闻、快乐心语、浪漫往昔等故事。
热门推荐
  • 北海几吹夏

    北海几吹夏

    俏皮开朗高智商少女遇上医学奇才洁癖博士当他们同居后,会擦出什么样的火花?
  • 恶魔总裁的阴阳女仆

    恶魔总裁的阴阳女仆

    小小拥有一双可以看见一些人不能看见的眼睛,当她遇上恶魔总裁后,却彻底沦陷进去了,明明那个男人很坏,比如老是喜欢玩游戏。但是她还是不能自拔的爱他。
  • 陨灭星河

    陨灭星河

    墨阳,从小父母双亡。在师傅帮助下踏上修炼一途。师傅突然消失,墨阳踏上寻找师傅的路途
  • 君负我与天下人

    君负我与天下人

    仙界最尊贵的公主叶染羽,这一生最后悔的便是爱上了魔界之主绝七尘。她为了他成为了魔,众叛亲离,亲手毁了仙界,成了仙界的千古罪人,而他却不屑一顾,"我爱的人是叶七七,从来都不是你。"绝七尘邪魅一笑,说出的话却令叶染羽坠入了无尽的深渊。
  • 恐怖源头

    恐怖源头

    人声鼎沸的喧嚣街道,变得一片死寂。怪异的声音在门外响起,像是什么古怪的东西徘徊走动。李燃不得不承认,自己手中的破旧笔记上记载的文字是真的,在这个世界的阴影里蛰伏着不可知级的鬼东西,它们在黑暗中窥视着,充满了恶意。请务必记住,如果你看见‘它们’,一定要装作什么也没看到,不然‘它们’就知道你发现它们的存在了。被‘它们’盯上的人,会被拉入‘它们的世界’。
  • 如果重新来过你会怎么选择

    如果重新来过你会怎么选择

    有妹有房父母健在的一点也不想穿越的穿越者被迫穿越了,人生圆满的他一心想着回家去,只是,随着时间的推移,他惊讶的发现,自己居然是重生流?
  • 天行

    天行

    号称“北辰骑神”的天才玩家以自创的“牧马冲锋流”战术击败了国服第一弓手北冥雪,被誉为天纵战榜第一骑士的他,却受到小人排挤,最终离开了效力已久的银狐俱乐部。是沉沦,还是再次崛起?恰逢其时,月恒集团第四款游戏“天行”正式上线,虚拟世界再起风云!
  • 天行

    天行

    号称“北辰骑神”的天才玩家以自创的“牧马冲锋流”战术击败了国服第一弓手北冥雪,被誉为天纵战榜第一骑士的他,却受到小人排挤,最终离开了效力已久的银狐俱乐部。是沉沦,还是再次崛起?恰逢其时,月恒集团第四款游戏“天行”正式上线,虚拟世界再起风云!
  • 恋爱通缉:学长太霸道

    恋爱通缉:学长太霸道

    在学校一向是个小透明的余曼菱,因为学长送的一件校服而发生了巨大的改变。生性乐观单纯的她以为熬过的高三就到头了,没想到进入大学之后会再次与那位人见人爱花见花开的学长相遇,从此她平淡的生活变得一塌糊涂。“可以……离我远一点吗?”余曼菱靠在墙上,紧张的看着凑在自己面前的俊脸,对上对方那双定定看着自己的眼睛,顿时只好将视线下移。沈白宸将手撑在墙上,低头又凑近了一些,好笑的欣赏着对方迅速红起来的脸和瞪大的眼睛,然后缓缓的说道:“可我只想靠近你,怎么办?”
  • 天行

    天行

    号称“北辰骑神”的天才玩家以自创的“牧马冲锋流”战术击败了国服第一弓手北冥雪,被誉为天纵战榜第一骑士的他,却受到小人排挤,最终离开了效力已久的银狐俱乐部。是沉沦,还是再次崛起?恰逢其时,月恒集团第四款游戏“天行”正式上线,虚拟世界再起风云!