资源描述:
《An Exploration of Clean Code (Draft).pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、AnExplorationofCleanCodeAbraGurnett,GregCaufield,DustinFrisch,ChrisMilburn,andMandipParmarAbstract—Thispaperpresentsthebasicsforwritingcleanwhattheybelievewillleadtothequickestandeasiestcodeinavarietyoflanguages.Wewilldiscusswhycleancodemethod.Theresultduetorusheddevelopmentisamess,is
2、important,whatitis,andhowitcanbeimplementedinawhichhasnotraceofcleanlinessandishardtofollow.varietyoflanguages(suchasC++andJava).Cleancodecreatessuccessfulprojectsandcanevensavelives.Therewereaseriesofincidentsfrom1985–1987,Keywords-CleanCodewhichkilledatleastfivepeople,andseriouslyin
3、juredmanyothers.EngineerscreatedaprogramfortheTherac-25I.INTRODUCTIONmedicalaccelerator,whichprovidedradiationtherapyforInthispaper,wewilltellyou,thereader,aboutcleanmanypatientsandhelpedpreventcancerfromreoccurring.codeandwhyitisimportanttodevelopment.TheThecodefortheTherac-25wasbuil
4、tuponcodefortheimportanceofcleancodeisbecomingincreasinglyolderversionsofthemachine,andwasconsideredtobeaimportantinindustryandduringdevelopment.Inthepastbettertherapysystemfromwhatwaspreviouslyavailable.fewyearsprojectshavegottenincreasinglylargerwhichTheimprovementstothesystemallowe
5、dittodelivertwomeanssubstantiallymorecode.Withtheselargeunwieldydifferenttypesofradiation,comparedtotheoldersystemscodebasescleancodeistrulyessentialtoasuccessfulwhichcoulddeliverjustone.Thenewermachinescouldproduct.eithersendoutlow-powerelectronbeams,calledbetaparticles,orhigherpower
6、X-rays.ThenewsystemplacedmorerelianceonsoftwarethentheoldersystemssinceitgotII.WHYCLEANCODE?ridoftheelectromechanicalsafetyinterlocks[2].TheuseofWhendevelopingcode,fortheagilemethodespecially,messycodeinthenewsystem,ledtoaninexperiencedcleancodeisthekeytoasuccessfulprogram.Cleancodeis
7、programmercreatingaraceconditionwithintheprogram.codewhichiseasytofollowandneatlywrittenandTheraceconditionoccurredbecausetheprogrammercouldseparatedsothatthereaderdoesn’thavetroublefollowingitnotforeseetheintersectionofthetwobeams,whentheuserorbecomeconfusedastowhatisbeingaccomplishe
8、d.ope