UnitThree SoftwareEngineering SectionA SoftwareEngineeringMethodologies Softwaredevelopmentisanengineeringprocess.Thegoalof researchersinsoftwareengineeringistofindprinciplesthatguide thesoftwaredevelopmentprocessandleadtoefficient,reliable softwareproducts. Ⅰ.WaterfallModel Thewaterfallmodel(seeFigure3A-1)isasequentialdesign process,used in software development processes,in which progressisseenasflowingsteadilydownwardsthroughthephases ofrequirementsanalysis,design,implementation,testing,and maintenance. The waterfall development model originates in the manufacturing and construction industries; highly structured physical environments in which after-the-fact changes are prohibitively costly.Thefirstknownpresentationdescribinguseof similar phasesin software engineering was held by Herbert D.BeningtonatSymposiumonadvancedprogrammingmethodsfor digitalcomputers①on29June1956. ① 赫伯特·D.贝宁顿在数字计算机高级编程方法研讨会上第一次在软件工程中提出了类似的阶段。 methodologies /.meTE.dOlEdZi/ n.方法论 waterfallmodel 瀑布模型 prohibitively /prEu.hibitivli/ adv.过高地 symposium /sim.pEuziEm/ n.研讨会 39 Figure3A-1 WaterfallModel Ⅱ.IncrementalModel Inrecentyears,softwareengineeringtechniqueshavechanged to reflect the contradiction between the highly structured environment dictated by the waterfall model and the “freewheeling”, trial-and-error processthatisoftenvitaltocreative problem solving.Thisisillustrated by the emergence ofthe incremental model(see Figure3A-2)forsoftware development. Followingthismodel,thedesiredsoftwaresystemisconstructedin increments—thefirstbeingasimplifiedversionofthefinalproduct withlimitedfunctionality.Oncethisversionhasbeentestedand perhapsevaluatedbythefutureuser,morefeaturesareaddedand testedinanincrementalmanneruntilthesystemiscomplete. Figure3A-2 IncrementalModel contradiction /kOntrE.dikSEn/ n.矛盾 dictate /dik.teit/ v.控制;命令 free-wheeling /.fri:.wi:lIN/ 单向转动 trial-and-error 试错(法); 不断摸索 incremental model 增量模型 evaluate /i.vQljueit/ v.评估 40 Ⅲ.IterativeModel Another modelthatrepresentstheshiftawayfrom strict adherencetothewaterfallmodelistheiterativemodel(seeFigure 3A-3),whichissimilarto,andinfactsometimesequatedwith, theincrementalmodel,althoughthetwoaredistinct.Whereasthe incrementalmodelcarriesthenotionofextendingeachpreliminary versionofaproductintoalargerversion,theiterative model encompassestheconceptofrefiningeachversion.Inreality,the incrementalmodelinvolvesanunderlyingiterativeprocess,andthe iterativemodelmayincrementallyaddfeatures. Figure3A-3 IterativeModel Asignificantexampleofiterativetechniquesistherational unifiedprocess(RUP)(seeFigure3A-4)thatwascreatedbythe Rational①SoftwareCorporation,whichisnowadivisionofIBM. Generally,RUPisadevelopmentplan,whichspecifiesthegeneral processofdevelopingasoftwareproduct.Precisely,definitionthat states,whichactivitiesaretobeperformed,by whichperson, actingin which role;in which order the activities will be performed,and which products willbedevelopedand how to evaluatethem. Incrementalanditerativemodelssometimesmakeuseofthe trend in software development toward prototyping in which incompleteversionsoftheproposedsystem,calledprototypes,are ① Rational:提供基于业界开放标准的工具、最佳方案和服务,用于开发商业应用和构 建软件产品及系统,包括移动电话和医疗系统等设备使用的嵌入式软件。 iterative /.itErEtiv/ adj.迭代的 preliminary /prI.lImInEri/ adj.初步的 encompass /In.kVmpEs/ vt.围绕 refine /rI.faIn/ vt.提炼;精炼 rationalunified process 统一软件过程 prototyping /.prE.tE.taIpIN/ n.原型设计制作 41 Figure3A-4 TheUnifiedProcess builtandevaluated. Alessformalincarnation ofincrementalanditerativeideas thathasbeenusedforyearsbycomputerenthusiastsisknownas open-sourcedevelopment.Thisisthe meansby which much of today..sfreesoftwareisproduced.Perhapsthe mostprominent example is the Linux operating system whose open-source developmentwasoriginallyledbyLinusTorvalds①. Ⅳ.AgileMethods Perhapsthemostpronouncedshiftfromthewaterfallmodelis representedbytheagilemethods,eachofwhichproposesearlyand quickimplementationonanincrementalbasis,responsivenessto changing requirements,and a reduced emphasis on rigorous requirementsanalysisanddesign.Oneexampleofanagilemethod isextremeprogramming(XP). XPwascreatedbyKentBeck②duringhisworkontheChrysler ComprehensiveCompensationSystempayrollprojectinthe1990..s. In1999,Beckdefined XPasalightweightmethodologyforthe small-to-mediumsizedteamsdevelopingsoftwareinthefaceof vagueorrapidlychangingrequirements.Intermsofthisdefinition, ① ② LinusTorvalds:林纳斯·托瓦尔兹(1969— ),芬兰人,著名的计算机程序员、黑 客。Linux内核的发明人及该计划的合作者。 KentBeck:肯特·贝克(1961— ),美国人,软件开发大师,是最早研究软件开发模 式和重构的人之一,是敏捷方法的开创者之一,对当今世界的软件开发影响深远。 incarnation /.InkA:.neISn/ n.化身 open-source development 开源软件的开发 agilemethods 敏捷方法 pronounced /prE.na.nst/ adj.明显的 responsiveness /rI.spXnsIvnIs/ n.敏感性 rigorous /.rIgErEs/ adj.严厉的;严密的 extreme programming(XP) 极限编程 42 XPcouldbedescribedinfourways.Firstly,itislightweight.InXP youonlydowhatyouneedtodotocreatevalueforthecustomer. Secondly,itisamethodology,whichbasedonaddressingobstacle insoftwaredevelopment.Itdoesnotaddresssomespecificissues suchasfinancialjustificationofprojectsorsales.Thirdly,itis implementedbyasmallormediumsize,whichmakestheproject team muchmoreflexible.Inthiskindofteam,everyoneiseliteand hashisclearresponsibility.Lastbutnotleast,XPadaptstorapidly changingrequirements.Inthemodembusinessworldrequirements needtochangetoadapttorapidshifts,sothatthevitalrolethat XPplaysontheoperatingsystemcannotbeover-emphasized. Figure3A-5 TheLogoofXP Thecontrastsdepictedbycomparingthewaterfallmodeland XPrevealthebreadth ofmethodologiesthatarebeingappliedto thesoftwaredevelopmentprocessinthehopesoffindingbetter waystoconstructreliablesoftwareinanefficientmanner.Research inthefieldisanongoingprocess.Progressisbeing made,but muchworkremainstobedone. Exercises Ⅰ.Fillintheblankswiththeinformationgiveninthetext. 1.Thegoalofresearchersin istofindprinciplesthatguidethesoftware developmentprocessandleadtoefficient,reliablesoftwareproducts. 2.Earlyapproachestosoftwareengineeringinsistedonperformingrequirements analysis, ,implementation, andmaintenanceinastrictlysequential manner. 3.Followingincrementalmodel,thedesiredsoftwaresystemisconstructedin — thefirstbeing asimplified version ofthefinalproduct withlimited functionality. breadth /bredT/ n.宽度;广泛 4.Asignificantexampleofiterativetechniquesisthe ,whichspecifiesthe generalprocesofdevelopingasoftwareproduct. 5.Themostprominentexampleisthe operatingsystemwhoseopensourcedevelopmentwasoriginalyledbyLinusTorvalds. 6.Folowingthe model,softwareisdevelopedbyateamoflesthana dozenindividualsworkinginacommunalworkspacewheretheyfrelyshareideasand asisteachotherinthedevelopmentproject. Ⅱ.TranslatethefolowingtermsorphrasesfromEnglishintoChinese. softwareenginering requirementsanalysis testing maintenance softwareenginer requirementsspecification waterfalmodel incrementalmodel iterativemodel rationalunifiedproces(RUP) softwarelifecycle open-source agilemethod extremeprogramming(XP) Ⅲ.TranslatethefolowingpasagefromEnglishintoChinese. SoftwareOwnership Legalefortstoprovidesuchownershipfalunderthecategoryofintelectual propertylaw,muchofwhichisbasedonthewel-establishedprinciplesofcopyrightand patentlaw.Inded,thepurposeofacopyrightorpatentistoalowthedeveloperofa “product”toreleasethatproducttointendedpartieswhileprotectinghisorher ownershiprights.Assuch,thedeveloperofaproduct(whetheranindividualora corporation)wilaserthisorherownershipbyincludingacopyrightstatementinal producedworks;includingrequirementspecifications,designdocuments,sourcecode, testplans,andinsomevisibleplacewithinthefinalproduct.Acopyrightnoticeclearlyidentifiesownership,thepersonnelauthorizedtousethework,andotherrestrictions. Furthermore,therightsofthedeveloperareformalyexpresedinlegaltermsina softwarelicense. 43 44 SectionB ExploratoryTesting Softwaretestingisaprocesswhereasoftwaretester/team runsaprogramorasystemtofindbugsordefects,tomaintainthe correctnessandreliability ofa program.Softwaretesting also validatesandverifiestheprogram tocheckifthebusinessand technicalrequirementsaremet,andisworkingasexpected. Ⅰ.WhatisExploratoryTesting? Exploratorytesting—aterm coined by Cem Kaner①—isa softwaretestingmethodthatimplementslearning,testdesign,and testexecutionatthesametimesimplybecauseyouexplorewhile testing.Itreallydoesn..tfollow asetofprocedures,scriptsor standardsthatiswhyitismistakenlyknownasthe“doityourself” orcarelessactivity,whichisinfact,thisapproachdescribesan intellectualtesting.Duringtesting,thetester knows how the softwarereallyworks,developtestdesignbasedonlearningand experience,andthecontroltoperform theentiretestingstage. Becauseofthefreedomthattheexploratorytestingoffers,itsolely dependsonthetester..sskilltofindbugs,createtestcases,andthe responsibilitytodelivertheprojectoptimizingthequalityandvalue ofthesoftware. ① Cem Kaner:卡尼尔,美国人,佛罗里达理工大学教授,在软件测试领域很出名。 bug /bVg/ n.(软件)错误;漏洞 exploratorytesting 探索性测试 testcase 测试用例 45 Ⅱ.SituationalBehaviorofExploratoryTesting Unlikescriptedtestingthatfollowprocedures,theexploratory testingisextensiveinsucha waythatitisatrialand error situation.Performingthisapproachrequireskeenobservationofthe behavior,thoroughinvestigation,criticalthinking/tacticsinfinding bugs,analyzethepossibleissues,andevaluatetheentiresoftware. Asituationalexampleforthisisplayinganonlinegame.At first,theuserhastoknowwhatitisallabout,theobjective,and howtoplaythegame.Whileplaying,theusernowidentifiesthe environmentandfunctionalitiesofthegame.Theuserdiscovers thentheencountereddifficultiesandforeseespotentialproblemson eachlevel.Atthesametime,theuserthinksstrategies/solutions andalsoexecutesthemaswellandbeabletocompleteandachieve theobjectiveofthegame. Therefore,relatingthesituationalexampleto exploratory testing,thefollowingarethekeystoremember: (a)Identifytheproject..spurpose. (b)Determinetherequirements and functionalities ofthe software. (c)Identifythelimitationofthesoftware. (d)Testthe functionalities thoroughly based on the requirements. (e)Createtestcasesthatverifytheconsistency ofthe software. Ⅲ.Advantages . Lesspreparation beforetheimplementingthesoftware testingbecauseitdoesn..trequire writingrepeatabletest procedures. . Testing,designingandexecutingthesoftwaresimultaneously savestime. . Report many issues caused by incomplete or wrong documentation. scriptedtesting 脚本测试 trialanderror 反复试验 tactic /.tQktIk/ n.战术 Ⅳ.Disadvantages .Testdesignscreatedcan..tbereviewedpriortoactual testingwhichmightproduceposibleisues. .Minorisuesarepoorlydetected. .Dificultytoperformtheexactmannerespecialyfornew foundbugs. Ⅴ.Conclusion ExploratoryTestingisnecesarytopracticebecauseit enhancesthetester..smindandstrategicskilsthroughexploration andexperience.Therefore,themorethetesterknowsthekeysin usingthismethod,thebeterthetesting,andthequalityof softwareprojectwilbe. Exercises Ⅰ.Filintheblankswiththeinformationgiveninthetext. 1.Softwaretestingisaproceswhereasoftwaretester/teamrunsa ora systemtofind ordefects,tomaintainthecorectnesandreliabilityofa program. 2.Exploratorytestingisasoftwaretestingmethodthatimplementslearning,test design,andtestexecutionatthesametimesimplybecauseyou whiletesting. 3.Exploratorytestingsolelydependsonthetester..s tofindbugs,create testcases. 4.Exploratorytestinghasles beforetheimplementingthesoftware testing. Ⅱ.TranslatethefolowingtermsorphrasesfromEnglishintoChinese. softwaretesting exploratorytesting scriptedtesting trialanderor bug testcase 46 SectionC 计算机专业英语翻译 1. 翻译的要点和标准 翻译就是把一种语言表达的信息用另一种语言表达出来。这里主要介绍把计算机 英文资料用中文加以表达的方法和技巧。翻译不仅要求对英文原文有透彻、正确的理解, 而且要求用符合中文语言习惯的适当表达方式进行再表述;不仅需要计算机专业知识,而 且要求掌握必要的文化与背景知识。 翻译有翻译的标准。在我国,关于翻译标准问题影响最大的,当推严复的“信、达、 雅”。“信”就是要忠实于原文,准确译出原意和原味。“达”就是要达意,语言要适当,表达 要能让人懂。“雅”就是要文采,译文要给人以赏心悦目的美感。就计算机专业英文翻译 而言,主要是达到前两条标准。 翻译的方法可分为“直译”和“意译”两大类。对于技术型较强的资料,译者不熟悉、新 的、前沿性的内容,应“直译”,力求准确,保证其与严谨性;对于广告性资料,译者十分了 解、熟练掌握的内容,不妨“意译”,可以使译文更易读。在具体的翻译实践中,应尽量兼顾 这两方面。 2. 英语科技文章在句子结构上的特点 除了掌握计算机专业知识,熟记大量的计算机专业英语词汇,还需要了解计算机专业 英语句子在结构上的特点。归纳为以下“八多”: .陈述句多(主系表结构占较大比重)。 .祈使句多(科技文章可操作性强,有时无须指明主语)。 .被动句多(科技文章侧重叙事推理,强调客观准确)。 .复合句多(并列关系、多种主从关系和非谓语动词构成的长句多)。 .虚拟语气多(因科技文章常涉及各种条件)。 .三种基本时态多(即一般现在时、一般过去时、现在完成时多)。 .as引出的句式多(如asshowninfigure2,asstatedabove等)。 “tbht…” .Ie+ 形容词或分词+ta句型多。 3. 计算机专业英语的翻译技巧 翻译有一定的规律和方法可循。但是,翻译是一门需要大量实践的技能,只有通过自 己的实践,并不断总结经验,才能提高翻译水平。下面讨论计算机专业英语翻译的一些常 用方法,供大家在翻译实践中适当运用。 3.词义选择 1 每个英语单词都有一个或几个具体的含义,这就需要在翻译时选择一个恰当的词义。 计算机英语是一种专业英语,其专业词汇大多是英语中已有的单词,只不过通过借用或引 申原义等手段变成了计算机专业词汇。在具体的翻译中,可以根据上下文以及词的类别、 47 词性、搭配等方面来判断和选择词义。 例句1: Thetwomaintypesofstoragedevicesarediskdrivesandmemory.存储设备主要分 两种类型:外存和内存。 在计算机专业英语中,storage通常翻译成“存储”,memory有“记忆、存储器、内存、 回忆”等含义,但是根据上下文内容,此处介绍存储设备,那么memory应该翻译成“内 存”,diskdrives本身有“磁盘驱动器”的意思,既然memory翻译成“内存”了,那么根据计 算机知识翻译的习惯,此处的diskdrives就翻译成“外存”。 例句2: IhavetoinstalwitheachnewPC:OficeSuite,includingE-mailclient. 我给每台 新计算机必须安装的应用程序有:Ofice套件,包括电子邮件客户端…… Inclient/servercomputing,procesingisdistributedbetwentwomachines—the clientmachineandtheservermachine.在客户机/服务器计算中,处理工作分布在两台机 器上进行———客户机和服务器。 用作计算机专业词汇时,client可以表示“客户程序”(软件领域),也可以表示“客户 机”(硬件领域)。第一句话中的client显然指程序,第二句中的client与server相对,显 然指硬件。 另外需要说明的是:有的计算机术语不加翻译可以直接借用到汉语中,并已经为IT 业所惯用,如句中出现的Ofice,还有Java、IBM等。 例句3: Becausetransistorsusemuchlespowerandhaveamuchlongerlife. 因为晶体管 的功率更小,寿命更长…… power有“权力、力量、功率、动力、政权”等意思,根据上下文,此处介绍晶体管与电子 管的区别,结合对当前计算机业的了解,生产的硬件大小有越来越小的趋势,而运算能力、 使用寿命、功率等都有所提高。因此,此处的power翻译成“功率”更合理。 3.词性、句子类型转换 2 句子成分、 英语和汉语之间有许多不同,其中对翻译影响较大的就是英语多用形合,汉语多用意 合。所谓形合,就是在形式上加以配合,使用复句或从句,用一种语法形式来表达它们之 间的句法关系,句中逻辑关系很严密,通常使用关联词语来实现。所谓意合,就是在意思 上加以配合,通过上下文的逻辑关系来约束各个分句之间的关系。 英译汉时,如果拘泥于原文单词或句子的语法特征,势必产生拗口的句子甚至难以理 解的句子。因此,在忠实于原文的前提下,要敢于突破语法框框,对词性、句子成分、句子 类型等进行变通转换,以使译文自然流畅,符合汉语习惯。 例句4: Thenewelectroniccomputerischieflycharacterizedbyitssimplicityofstructure. 这种新型计算机的主要特点是结构简单。 本句涉及副词转换为形容词,即副词chiefly译文中变成了“主要的”。当英语动词 characterize在翻译时转换为汉语名词时,原来相关的状语副词往往可以译为形容词。 48 例句5: AdominantfactorinthegrowthofMSinquestionthroughouttheyearshasben itssucesinmaintainingtechnicalsuperiorityinproductdevelopment微软公司这些年 来发展壮大的主要因素是其一直成功地保持了在产品开发方面的技术优势。(.) 本句涉及名词转换为副词,即名词suces 在译文中变成了副词“成功地”。 例句6: YoushoulduseyourE-mailacountwiththeexpectationthatsomeofyourmail wilbereadfromtimetotime.使用电子邮件账号时,你应该想到:你的一些邮件会被人 不时地阅读。 本句涉及名词转换为动词,即名词expectation在译文中变成了动词“想到”。此外, 原文的句子成分在译文中也发生了变化:主句的谓语动词use及其宾语yourE-mail acount转为时间状语;主句作状语的介词短语withtheexpectation转为主句的谓语动 词;同位语从句转为宾语从句。这句话如果按照原文的单词词性和句子成分翻译,会非常 拗口:你应该带着你的一些邮件会被人不时阅读的料想使用你的电子邮件账号。 例句7: Thepropertiesofthiscomputershouldbemadefuluseof.应该充分利用这台计 算 机的性能。 本句的主语转换为宾语。 例8: ThefirstinventorofthisprecisioninstrumentsemstohavebenCharlesBabbage in1847—thesamemanwhoisregardedasthefatherofthecomputer.计算机之父查尔 斯·巴贝奇在1847年首先发明了这种精密仪器。 本句是表语转换为主语。 3.增词与减词 3 在英译汉时,译文增添或者省略一些词,是为了更好地表达原文的意思,便于读者理 解原文。但是,补充只能在原文的基础上和作者的意思内进行,不能离题发挥。省略的词 必须是译文中确实不需要表达的,不能损及原文的意思。 例句9: Computershaveopenedupanewerainmanufacturingthroughthetechniquesof automation,andtheyhaveenhancedmoderncommunicationsystems.通过自动化技术, 计算机开辟了制造业的新纪元,也增强了现代通信系统的性能。 本句通过增词将原文的意思表达完整。 例句10: Itwouldbeeasytoasumethatcomputerswilalbeabletoworktogetheronce theyhavebroadbandconnection.人们很容易认为:计算机一旦有了宽带连接,就能全部 具备协同工作的能力。 这句话中的It是形式主语,真正主语是that引导的从句,翻译时增加了泛指的“人 们”来作主语。 49 例句11: Inmostwirelines,twoconductors,agoandareturn,areusedforsignal transmision.在大多数有线线路中,用两根导线:一根去线和一根回线来传输信号。 本句中的go和return是抽象名词,当它们被赋予某种具体的含义时,需要补充适当 的、具体的名词来表达含义。 例句12: Intheimplementationphase,youcreatetheactualprograms.在实现阶段,建立真 正的程序。 本句中的人称代词you是泛指,常常不译。 例句13: Adatabasesystemisdividedintoseveralmodulestoachievetheoveral functionality.数据库系统通过分成几个模块来完成总体功能。 这里的不定冠词a表示一类,而非数量一,不译出来,译文更简洁,更顺畅。 例句14: Inthedesignphase,thesystemsaredetermined,andthedesignofthefilesand/or thedatabasesiscompleted.设计阶段需要确定系统,完成文件和/或数据库的设计。 英语求形合,并列关系通常加上and,汉语求意合,句中的逻辑关系往往不言自明。 因此,在本句中,thesystemsaredetermined和thedesignofthefilesand/orthe databasesiscompleted两个并列的分句,翻译时去掉了and,使译文更符合汉语的习惯。 50