欢迎来到天天文库
浏览记录
ID:14739347
大小:45.00 KB
页数:13页
时间:2018-07-30
《简约之美-软件设计之道-附录-笔记》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、简约之美-软件设计之道-附录-笔记APPENDIXA附录ATheLawsofSoftwareDesign软件设计的法则Thisappendixsummarizesalloftheactuallawsdiscussedinthisbook:本附录总结了书中讨论的所有可行的法则:1.Thepurposeofsoftwareistohelppeople.1.软件的目的是帮助他人.2.TheEquationofSoftwareDesign:D=(Vn+Vf)/(Ei+Em) where:DStandsforthedesirabilityofthechange.VnStandsf
2、orvaluenow.VfStandsforfuturevalue.EiStandsfortheeffortofimplementation.EmStandsfortheeffortofmaintenance.Thisistheprimarylawofsoftwaredesign.Astimegoeson,thisequationreducesto:D=Vf/EmWhichdemonstratesthatitismoreimportanttoreducetheeffortofmaintenancethanitistoreducetheeffortofimplementa
3、tion.2.软件设计的方程式是:D=(Vn+Vf)/(Ei+Em)其中:D表示变化的合意程度(可行性).Vn表示当前价值.Vf表示未来价值.Ei表示开发成本.Em表示维护成本.这是软件设计的主要法则.随着时间的推移,这个方程式简化为:D=Vf/Em也就是说,相比降低实现成本,降低维护成本更重要.3.TheLawofChange:Thelongeryourprogramexists,themoreprobableitisthatanypieceofitwillhavetochange.3.变化定律:程序存在的时间越久,它的某个部分需要变化的可能性越大.4.TheLawo
4、fDefectProbability:Thechanceofintroducingadefectintoyourprogramisproportionaltothesizeofthechangesyoumaketoit.4.缺陷定律:在程序中新增缺陷的可能性与代码修改量成正比.5.TheLawofSimplicity:Theeaseofmaintenanceofanypieceofsoftwareisproportionaltothesimplicityofitsindividualpieces.5.简洁定律:软件任何一部分的维护难度,反比于该部分的简洁程度.6.The
5、LawofTesting:Thedegreetowhichyouknowhowyoursoftwarebehavesisthedegreetowhichyouhaveaccuratelytestedit.6.测试定律:你对软件行为的了解程度,等于你真正测试它的程度.That’sit.Manymorefactsandideaswerediscussedinthisbook,butthesesixitemsarethelawsofsoftwaredesign.Notethatofallofthese,themostimportanttobearinmindarethepur
6、poseofsoftware,thereducedformoftheEquationofSoftwareDesign,andtheLawofSimplicity.就是这么多.本书讨论了很多的事实和想法,但这6条是软件设计的法则.请注意,其中最重要的是牢记软件的目的,软件设计方程式的简化形式及简洁定律.Ifyouwantedtosumupthemostimportantfactstokeepinmindaboutsoftwaredesignintwosimplesentences,theywouldbe:.Itismoreimportanttoreducetheeffor
7、tofmaintenancethanitistoreducetheeffortofimplementation..Theeffortofmaintenanceisproportionaltothecomplexityofthesystem.Armedwithonlythosetwostatementsandanunderstandingofthepurposeofsoftware,youcouldverypossiblyre-evolvetheentirescienceofsoftwaredesign,providedthatyouals
此文档下载收益归作者所有