登陆注册
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.

同类推荐
  • 愤怒的葡萄:The Grapes of Wrath(英文朗读版)

    愤怒的葡萄:The Grapes of Wrath(英文朗读版)

    《愤怒的葡萄》以经济危机时期中部各州农民破产、逃荒和斗争为背景。俄克拉何马和邻近的得克萨斯、堪萨斯、阿肯色各州的农民负债累累,土地被大公司没收,无家可归,只得向西迁移,想在加利福尼亚州寻找出路。《愤怒的葡萄》以约德一家为代表,记叙了他们一家十二口从俄克拉荷马州向加利福尼亚州逃荒的艰难经历。他们将家中的一切变卖后,换来一辆破旧的汽车,一家坐车向西逃荒。途中年轻的诺亚和康尼则在半路上开了小差。到了加州后,一切并不像他们想像的那样美好,等待他们的仍然是失业、饥饿和困苦。小说标题《愤怒的葡萄》中的“愤怒”便是对导致人们贫困的不公的社会制度的强烈抗议。
  • 课外英语-七彩音符奔放的旋律(双语版)

    课外英语-七彩音符奔放的旋律(双语版)

    本书收录了世界经典英文歌曲,其中包括雪绒花、白兰鸽、昔日重来、铃儿响叮当、奔放的旋律、友谊地久天长、雨中的节奏等多首脍炙人口的歌曲,每首歌曲都有中英文歌词、语言点解析及注释赏析。
  • 出国应急英语大全

    出国应急英语大全

    “语言的魅力,不仅在于说得对,更在于说得地道得体。很多的英语爱好者在学习时,总是习惯自己先预定场景,再根据情节进行口语练习。而这个场景因为我们的思维定势常常被中国化,而非英语国家的真实语境。在国外真实的语境中,对话是灵活多变的,所以很多学习者在学了多年英语后,还是无法与老外进行流利沟通,自然就无法在国外畅通无阻,随心所欲地旅行了。
  • 动物庄园(英文原版)

    动物庄园(英文原版)

    《动物庄园》(Animal?Farm)亦译作《动物农场》《动物农庄》,是英国有名作家乔治·奥威尔的重要作品,也是一部政治寓言体小说。故事描述了一场“动物主义”革命的酝酿、兴起和很终畸变,于1945年抢先发售岀版。
  • 汤姆·索亚历险记(有声双语经典)

    汤姆·索亚历险记(有声双语经典)

    马克·吐温的这部经典之作讲述了一个关于友谊和冒险的故事。汤姆·索亚是个活泼顽皮的男孩,他与波莉姨妈住在密西西比河畔的一座小镇上。他带领镇上的男孩玩耍和冒险。他足智多谋,说动朋友参与了他的各项冒险计划,与朋友共同目击了一场谋杀、扮演了一群海盗,还找到了一大笔宝藏!和汤姆在一起,就连学校生活也处处暗藏惊险呢。
热门推荐
  • 纪连海新解乾隆朝三大名臣

    纪连海新解乾隆朝三大名臣

    本书是纪连海先生在CCTV《百家讲坛》中“正说清代名臣”之刘墉篇、纪晓岚篇、和珅篇的集结。聪明诡谲的刘罗锅、铁齿铜牙的纪晓岚、狡猾贪婪的和珅,都是那个时代的风云人物。他们都是乾隆皇帝的臣子,亲厚疏近,演绎出复杂多变的政治风貌:刘墉根本就不敢得罪和珅?和珅是纪晓岚着力帮衬的顶头上司?刘墉和纪晓岚是师兄弟?乾隆为何格外宠爱和珅,甚至不辨是非?忠臣、勋臣、佞臣、奸臣、这一顶顶帽子合不合体?恃才傲物、委曲求全、趋炎附势、颐指气使,这样的政治江湖谁才是赢家?不同的出身、不同的气质、不同的道路、不同的结局,三个人的命运扣人心弦;随着纪连海的讲述,数百年前的大戏再次开锣……
  • 神奇宝贝最强外挂系统

    神奇宝贝最强外挂系统

    林枫穿越到了神奇宝贝的世界并获得了最强外挂系统
  • 众神装殖

    众神装殖

    舔狗,舔狗,舔到最后一无所有的赵某人在一场大醉后,醉驾意外身亡!却被所谓的众神亦或是高科技文明选中参与到了一场种族大战的游戏中。实力强大的战士、魔法绚丽的法师、神秘莫测的召唤师、百步穿杨的弓箭手…这一切游戏中的角色成了这场生死大战的主角!
  • 偷天篡

    偷天篡

    玄天大陆没有斗气,魔法,只有先天觉醒的天种,强大如星辰,镇压天地,弱小如野草,只能随风飘摇,前世的特种兵千陌,死后异世重生,却发现这个世界与他有着说不清道不明的联系,看千陌如何逆天而行,成就无上仙种,突破一切阻隔,一指问天!
  • 凡人意识

    凡人意识

    什么是意识?是所有生物都拥有意识,还是人类独有?察觉杀气果断反杀,遭遇GANK提前离开,意识存在万物之间。在不断萎缩的世界反面,少年背负起旧神的灵龛,从灰暗的历史中走了出来,决定带给凡人们新生。
  • 天行

    天行

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

    快穿之我是女主角

    苏馨儿从来都是女神一样的存在,从来没有想过会遇到一个这么逗逼的系统,然后去拯救一个个的炮灰女配,然而她的人生才刚刚开始.....
  • 废材逆袭:绝世特工

    废材逆袭:绝世特工

    死后再次重生于神秘大陆,顶着被众人唾弃的身份,咸鱼翻身,疯狂逆袭。她要让那些曾经欺辱过她的人,统统受到报应!
  • 官梯之裙带飞扬

    官梯之裙带飞扬

    黑色的眼睛让我们能够看穿黑暗直达本质,但最后心里依然有一种觉悟——世界本来就是这样!觉得能看的,给个收藏,这是动力啊!
  • 平凡的伟大战疫

    平凡的伟大战疫

    2020年伊始新冠疫情爆发,在这样的自然灾害面前人类显现得是无比脆弱和无力,在没特效的治疗药物之前,所有人都在疫情中都是战战兢兢、小心翼翼地保护着自己。当人们都畏惧害怕的时候,也有一群可爱的人们,在努力保护着自己的同时,也稍稍多考虑了下其他人。在自己力所能及的范围内,帮助他人,为抗疫之战贡献自己的力量。他们都是平凡而普通的一员,小小举动是那么的纯洁高尚,用自己的实际行动谱写着自己对于生命意义的理解。