关闭

关闭

封号提示

内容

首页 Debug It! Find Repair and Prevent Bugsin Your C…

Debug It! Find Repair and Prevent Bugsin Your Code Paul Butcher.pdf

Debug It! Find Repair and Preve…

上传者: macware 2014-02-14 评分1 评论0 下载1 收藏0 阅读量681 暂无简介 简介 举报

简介:本文档为《Debug It! Find Repair and Prevent Bugsin Your Code Paul Butcherpdf》,可适用于软件工程领域,主题内容包含WhatReadersAreSayingAboutDebugIt!Pauldoesanexcellentjobofexplainingthetech符等。

WhatReadersAreSayingAboutDebugIt!Pauldoesanexcellentjobofexplainingthetechnical,intellectual,andpsychologicalaspectsofallphasesofdebugging:preventingbugsinthefirstplace,diagnosingandfixingbugs,andmakingsurethatthesamebugsdon’thappenagainApplyinganyoralloftheideasfromthisbookwillimprovetheoverallqualityofyoursoftwareprojectsSure,thetechnicalissuesarewellcoveredbuthowPaulalsoexplainsthepsychologicalanglesiswhatmakesthisbookexceptionalFredericDaoudAuthor,StripesandJavaWebDevelopmentIsFunAgainIwholeheartedlyrecommendthisbooktosoftwareengineersgenerallybutmorespecificallytoteamleadswhoneedtoknowhowtosetuptheirteamsforbestpracticeAllanMcLeodFounderandCTO,IsaaccSoftwareDebugIt!doesagreatjobofsettingthescenefordebuggingandgettingyouintotherightmindsetwhilealsotalkingaboutthecomplicationsthatcanariseoncethebugisfoundandsquashedIt’sworthalookfortheanecdotesalone,toseethelengthsthatpeoplegotowhentryingtounderstandtrulybizarredefectsJonDickinsonAuthor,GrailsWebApplicationDevelopmentDebugginghasbeenafolkartforsolongthatit’sgreattohavesomeoneputallthetriedandtruetechniquestogetherDebugIt!istheperfectbooktopulloutwhenyou’redisillusionedwiththebrainbreakingprocessofcreatinggoodsoftwareWiththistoolchestofassertions,logging,refactoring,andothergoodstuff,you’llfeellikeyou’reSherlockHolmesandsolvingthecaseisinevitableCraigRieckeAuthor,MasteringDojo:JavaScriptandAjaxToolsforGreatWebExperiencesPreparedexclusivelyforRobertWalshDownloadatWoweBookComThisbookislikeacompanionvolumetoThePragmaticProgrammer,applyingthesamefocusoncraftsmanshiptothedebuggingprocessIanDeesAuthor,ScriptedGUITestingwithRubyPaulButcherhasbroughtlongoverdueattentiontothemethodsofdebugging,afundamentalactivityforeverysoftwaredeveloperyetonethatremainsanexerciseofintuitionandguessworkformostintheprofessionPaul’sgentlewritingstylebeliesthedisciplineinhistechniqueBeforeyouknowit,you’llbeanengineerinsteadofahackerBillKarwinSoftwareEngineer,KarwinSoftwareSolutions,LLCPreparedexclusivelyforRobertWalshDownloadatWoweBookComPreparedexclusivelyforRobertWalshDownloadatWoweBookComDebugIt!Find,Repair,andPreventBugsinYourCodePaulButcherThePragmaticBookshelfRaleigh,NorthCarolinaDallas,TexasPreparedexclusivelyforRobertWalshDownloadatWoweBookComManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andThePragmaticProgrammers,LLCwasawareofatrademarkclaim,thedesignationshavebeenprintedininitialcapitallettersorinallcapitalsThePragmaticStarterKit,ThePragmaticProgrammer,PragmaticProgramming,PragmaticBookshelfandthelinkinggdevicearetrademarksofThePragmaticProgrammers,LLCEveryprecautionwastakeninthepreparationofthisbookHowever,thepublisherassumesnoresponsibilityforerrorsoromissions,orfordamagesthatmayresultfromtheuseofinformation(includingprogramlistings)containedhereinOurPragmaticcourses,workshops,andotherproductscanhelpyouandyourteamcreatebettersoftwareandhavemorefunFormoreinformation,aswellasthelatestPragmatictitles,pleasevisitusathttp:wwwpragprogcomCopyrightPaulButcherAllrightsreservedNopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmitted,inanyform,orbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,withoutthepriorconsentofthepublisherPrintedintheUnitedStatesofAmericaISBN:XISBN:PrintedonacidfreepaperPprinting,NovemberVersion:PreparedexclusivelyforRobertWalshDownloadatWoweBookComContentsPrefaceAboutThisBookAcknowledgmentsITheHeartoftheProblemAMethodintheMadnessDebuggingIsMoreThan“MakingtheBugGoAway”TheEmpiricalApproachTheCoreDebuggingProcessFirstThingsFirstPutItinActionReproduceReproduceFirst,AskQuestionsLaterControllingtheSoftwareControllingtheEnvironmentControllingInputsRefiningYourReproductionWhatIfYouReallyCan’tReproduceItPutItinActionDiagnoseStandBackI’mGoingtoTryScienceStratagemsDebuggersPitfallsMindGamesValidateYourDiagnosisPutItinActionPreparedexclusivelyforRobertWalshDownloadatWoweBookComCONTENTSFixClearingtheDecksTestingFixtheCause,NottheSymptomsRefactoringCheckingInGetYourCodeReviewedPutItinActionReflectHowDidItEverWorkWhatWentWrongIt’llNeverHappenAgainClosetheLoopPutItinActionIITheBiggerPictureDiscoveringThatYouHaveaProblemTrackingBugsWorkingwithUsersWorkingwithSupportStaffPutItinActionPragmaticZeroToleranceBugsTakePriorityTheDebuggingMindSetDiggingYourselfOutofaQualityHolePutItinActionIIIDebugFuSpecialCasesPatchingExistingReleasesBackwardCompatibilityConcurrencyHeisenbugsPerformanceBugsEmbeddedSoftwareBugsinThirdPartySoftwarePutItinActionReporterratumthiscopyis(Pprinting,November)PreparedexclusivelyforRobertWalshDownloadatWoweBookComCONTENTSTheIdealDebuggingEnvironmentAutomatedTestingSourceControlAutomaticBuildsPutItinActionTeachYourSoftwaretoDebugItselfAssumptionsandAssertionsDebuggingBuildsResourceLeaksandExceptionHandlingPutItinActionAntipatternsPriorityInflationPrimaDonnaMaintenanceTeamFirefightingRewriteNoCodeOwnershipBlackMagicPutItinActionAResourcesASourceControlandIssueTrackingSystemsABuildandContinuousIntegrationToolsAUsefulLibrariesAOtherToolsBBibliographyIndexReporterratumthiscopyis(Pprinting,November)PreparedexclusivelyforRobertWalshDownloadatWoweBookComPrefaceI’vealwaysbeenmystifiedwhysofewbooksareavailableondebuggingYoucanbuyanynumberoneveryotheraspectofsoftwareengineeringsuchasdesign,codeconstruction,requirementscapture,methodologiesthelistisendlessAndyet,forsomereason,debugginghasbeenalmost(notquitebutverynearly)ignoredbyauthorsandpublishersIhopethatthisbookcanhelpremedythesituationIfyouwritecode,it’sacertaintythatatsomepoint(possiblyverysoonafterward)you’regoingtohavetodebugitDebuggingis,morethananythingelse,anintellectualprocessitdoesn’ttakeplacewithinadebuggeroryourcodebutinsideyourmindReachinganunderstandingoftherootcauseoftheproblemisthecornerstoneuponwhicheverythingelsedependsOvertheyears,I’vebeenfortunatetoworkwithanumberofincrediblytalentedteamsonawiderangeofsoftwareI’veworkedatalllevelsofabstractionfrommicrocodeonbitsliceprocessorsthroughdevicedrivers,embeddedcode,mainstreamdesktopsoftware,andwebapplicationsIhopethatIcanpassalongsomeofthelessonsI’velearnedfrommycolleaguesalongthewayAboutThisBookThisbookisdividedintothreeparts,eachofwhichconsidersaparticularaspectofdebugging:“TheHeartoftheProblem”:Thispartintroducestheempiricalapproach,whichleveragesoursoftware’suniqueabilitytoshowuswhat’sgoingon,andthecoredebuggingmethod(reproduce,diagnose,fix,reflect)thatreliesuponitPreparedexclusivelyforRobertWalshDownloadatWoweBookComACKNOWLEDGMENTS“TheBiggerPicture”:Howdowefindoutthatthere’saproblemthatneedsfixinginthefirstplaceAndhowdoesdebuggingintegrateintothewidersoftwaredevelopmentprocess“DebugFu”:Inthethirdandfinalpart,we’llturnourattentiontoanumberofadvancedtopics:•Althoughtheapproachesdiscussedearlierinthebookapplytoallbugs,certaintypesofbugsbenefitfromspecialtreatment•DebuggingstartslongbeforetheiratetelephonecallfromtheuseraffectedbyitWhattoolsandprocessescanweputinplaceaheadoftimetohelpwhenthephonerings•Finally,we’llconsideranumberofcommonpitfallstoavoidAcknowledgmentsIt’snotuntilIembarkeduponthetaskofwritingabookofmyownthatIrealizedthetrueimportanceoftheacknowledgmentssectionMynamemightbeonthefrontcover,butitwouldn’thavecometofruitionwithoutthehelpofmanyandtheforbearanceofmanymoreThankstoeveryonewhojoinedthebook’semaildiscussionlistandprovidedinspiration,criticism,andencouragementAndrewEacott,DanielWinterstein,FreelandAbbott,GarySwanson,JorgeHernandez,ManuelCastro,MikeSmith,PaulMcKibbinandSamHallidayParticularthankstoDaveStrauss,DominicBinks,FrederickCheung,MarcusGröber,SeanEllis,VandyMassey,MatthewJacobs,BillKarwin,andJeremySydikwhohavekindlyallowedmetosharetheiranecdotesandinsightswithyouThanksalsotoAllanMcLeod,BenCoppin,MiguelOliveira,NeilEccles,NickHeudecker,RonGreen,CraigRiecke,FredDaoud,IanDees,EvanDickinson,LyleJohnson,BillKarwin,andJeremySydikfortakingthetimetoparticipateintechnicalreviewTomyeditor,JackieCarter,thankyouforbeingsopatientwithafirsttimeauthorlearningtheropes,andthankstoDaveandAndyfortakingthechanceReporterratumthiscopyis(Pprinting,November)PreparedexclusivelyforRobertWalshDownloadatWoweBookComACKNOWLEDGMENTSApologiestomycolleaguesatTexpertswhohavehadtoenduremetalkingaboutnothingbutthebookfortoolong(don’tworryI’llgetanewracecarsoon,andthenyou’llhavetoenduremetalkingaboutthatinstead)Andtomyfamily,sorryforthelongeveningsandweekendsduringwhichI’vebeenincommunicado,andthanksforthesupportFinally,thankyoutoeveryoneI’vehadtheprivilegeofworkingwithovertheyearsThebestaspectofacareerinsoftwaredevelopmentisthecaliberofthepeople,andI’vebeenparticularlyluckytoworkwithatrulygreatselectionPaulButcherAugustpaulpaulbutchercomReporterratumthiscopyis(Pprinting,November)PreparedexclusivelyforRobertWalshDownloadatWoweBookComPartITheHeartoftheProblemPreparedexclusivelyforRobertWalshDownloadatWoweBookComChapterAMethodintheMadnessSo,yoursoftwaredoesn’tworkNowwhatSomedevelopersseemtohaveaknackofunerringlyzeroinginontherootcauseofabug,whereasothersthrasharoundapparentlyaimlesslyandwithoutconcreteresultsWhatseparatesthefirstgroupfromthesecondInthischapter,wewillexamineadebuggingmethodthathasbeenrepeatedlyproveninthetrenchesofprofessionalsoftwaredevelopmentIt’snotasilverbulletyou’restillgoingtohavetorelyonyourintellect,intuition,detectiveskills,and,yes,evenalittleluckButitwillallowyoutotargetyoureffortsmosteffectively,avoidchasingphantoms,andgettotheheartoftheproblemasquicklyaspossibleSpecifically,we’llcoverthefollowing:•Thedifferencebetweendebuggingand“makingthebuggoaway”•Theempiricalapproachusingthesoftwareitselftoshowyouwhat’sgoingon•Thecoredebuggingprocess(reproduce,diagnose,fix,reflect)•FirstthingsfirstthingstothinkaboutbeforedivinginDebuggingIsMoreThan“MakingtheBugGoAway”Askaninexperiencedprogrammertodefinedebugging,andtheymightanswerthatitis“findingafix”Infact,thatisonlyoneofseveralgoals,andnoteventhemostimportantofthemPreparedexclusivelyforRobertWalshDownloadatWoweBookComDEBUGGINGISMORETHAN“MAKINGTHEBUGGOAWAY”Effectivedebuggingrequiresthatwetakethesesteps:WorkoutwhythesoftwareisbehavingunexpectedlyFixtheproblemAvoidbreakinganythingelseMaintainorimprovetheoverallquality(readability,architecture,testcoverage,performance,andsoon)ofthecodeEnsurethatthesameproblemdoesnotoccurelsewhereandcannotoccuragainOfthese,byfarthemostimportantisthefirstidentifyingtherootcauseoftheproblemisthecornerstoneuponwhicheverythingelsedependsUnderstandingIsEverythingInexperienceddevelopers(andsometimes,unfortunately,thoseofuswhoshouldknowbetter)oftenskipdiagnosisaltogetherInstead,theyimmediatelyimplementwhattheythinkmightbeafixIfthey’relucky,itwon’twork,andalltheywillhavedoneiswastetheirtimeTherealdangercomesifitworks,orseemstowork,becausenowthey’vemadeachangetothesourcethattheydon’treallyunderstandItmightfixthebug,butthereisarealchancethatinrealityitisonlymaskingthetrueunderlyingcauseWorse,thereisagoodchancethatthiskindofchangewillintroduceregressionsbreakingsomethingthatusedtoworkcorrectlybeforehandWastedTimeandEffortSomeyearsago,IfoundmyselfworkinginateamcontaininganumberofveryexperiencedandtalenteddevelopersMostoftheirexperiencewaswithUNIX,butwhenIjoinedtheteam,theywereinthelatestagesofportingthesoftwaretoWindowsOneofthebugsfoundduringtheportwasaperformanceissuewhenrunningmanythreadssimultaneouslySomethreadswerebeingstarved,whileotherswererunningjustfineGiventhateverythingworkedjustfineunderUNIX,theproblemwasclearlybrokenthreadinginWindows,sothedecisionwasmadetoimplementacustomthreadschedulingsystemandavoidusingthatprovidedbytheoperatingsystemThiswouldbealotofwork,obviously,butquitewithinthecapabilitiesofateamofthiscaliberReporterratumthiscopyis(Pprinting,November)PreparedexclusivelyforRobertWalshDownloadatWoweBookComTHEEMPIRICALAPPROACHIjoinedtheteamwhentheyweresomewayintotheimplementation,andsureenough,threadswerenolongersufferingfromstarvationButthreadschedulingissubtle,andtheywerestillworkingthroughanumberofissuesthathadbeencausedbythechange(notleastofwhichwasthatthechangeshadslowedthewholesystemdownsomewhat)Iwasintriguedbythisbug,becauseI’dpreviouslyexperiencednoproblemswithWindows’threadingAlittleinvestigationdemonstratedthattheperformanceissuewascausedbythefactthatWindowsimplementsadynamicthreadpriorityboostThebugcouldbefixedbydisablingthiswithasinglelineofcode(acalltoSetThreadPriorityBoost())ThemoralTheteamhaddecidedthatWindows’threadswerebrokenwithoutreallyinvestigatingthebehaviortheywereseeingInpart,thismighthavebeenaculturalissueWindowsdoesn’thaveagoodreputationamongUNIXhackersNevertheless,iftheyhadtakenthetimetoidentifytherootcause,theywouldhavesavedthemselvesagreatdealofworkandavoidedintroducingcomplicationsthatmadethesystembothlessefficientandmoreerrorproneWithoutfirstunderstandingthetruerootcauseofthebug,weareoutsidetherealmsofsoftwareengineeringanddelvinginsteadintovoodooprogrammingorprogrammingbycoincidenceTheEmpiricalApproachTherearemanydifferentapproachesyoucanadopttogaintheunderstandingyouseekAndaslongastheapproachyouchoosegetsyouclosertoyourgoal,ithasserveditspurposeHavingsaidthat,itturnsoutthatinmostinstancesoneparticularapproach,theempiricalapproach,tendstobebyfarthemostproductiveConstructexperiments,andobservetheresultsEmpiricismreliesuponobservationorexperience,ratherthantheoryorpurelogicInthecontextofdebugging,thismeansdirectlyobservingthebehaviorofthesoftwareYes,youcouldreadtheentiresourcecodeandusepurereasontoworkoutwhat’sgoingon(andonoccasionyoumayhavenootherchoice),“Theusebygues

类似资料

编辑推荐

[老子新译].任继愈.扫描版.pdf

工业常用紧固件优选手册.pdf

消防基础知识讲义.ppt

宠冠六宫之亡国公主.txt

抗日战争史话.pdf

职业精品

精彩专题

中秋节除了赏月,你还想怎么过?

“仰头望明月,寄情千里光”,算算你有多久没回家了。庆幸这个中秋节赶上了国庆节,不用悲伤“故乡再无春夏,只有秋冬”,独自一人赏月,8天长假,回家一趟,妥妥的!

用户评论

0/200
    暂无评论
上传我的资料

精选资料

热门资料排行换一换

  • 十九世纪英国文论选(盛宁等译).…

  • 中国佛教史 第三卷.pdf

  • 大刀记第三卷.pdf

  • 大刀记第二卷.pdf

  • 孟子译注.doc

  • 朱子文集上册[宋]朱熹_商务印书…

  • 中国思想传统及其现代变迁.pdf

  • 催化重整装置技术问答.pdf

  • 明洪武年间明朝与高丽王朝关系略论…

  • 资料评价:

    / 218
    所需积分:2 立即下载

    意见
    反馈

    返回
    顶部