加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 [英文]代码之美

[英文]代码之美.pdf

[英文]代码之美

albert
2009-04-19 0人阅读 举报 0 0 暂无简介

简介:本文档为《[英文]代码之美pdf》,可适用于IT/计算机领域

BeautifulCodeOtherresourcesfromO’ReillyRelatedtitlesAppliedSoftwareProjectManagementTheArtofProjectManagementDatabaseinDepthEssentialBusinessProcessModelingHeadFirstDesignPatternsHeadFirstObjectOrientedAnalysisDesignMasteringRegularExpressionsTheMythsofInnovationPrefactoringProcessImprovementEssentialsoreillycomoreillycomismorethanacompletecatalogofO’ReillybooksYou’llalsofindlinkstonews,events,articles,weblogs,samplechapters,andcodeexamplesoreillynetcomistheessentialportalfordevelopersinterestedinopenandemergingtechnologies,includingnewplatforms,programminglanguages,andoperatingsystemsConferencesO’ReillybringsdiverseinnovatorstogethertonurturetheideasthatsparkrevolutionaryindustriesWespecializeindocumentingthelatesttoolsandsystems,translatingtheinnovator’sknowledgeintousefulskillsforthoseinthetrenchesVisitconferencesoreillycomforourupcomingeventsSafariBookshelf(safarioreillycom)isthepremieronlinereferencelibraryforprogrammersandITprofessionalsConductsearchesacrossmorethan,booksSubscriberscanzeroinonanswerstotimecriticalquestionsinamatterofsecondsReadthebooksonyourBookshelffromcovertocoverorsimplyfliptothepageyouneedTryittodayforfreeBeijing•Cambridge•Farnham•Köln•Paris•Sebastopol•Taipei•TokyoBeautifulCodeEditedbyAndyOramandGregWilsonBeautifulCodeEditedbyAndyOramandGregWilsonCopyright©O’ReillyMedia,IncAllrightsreservedPrintedintheUnitedStatesofAmericaPublishedbyO’ReillyMedia,IncGravensteinHighwayNorth,Sebastopol,CAO’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluseOnlineeditionsarealsoavailableformosttitles(safarioreillycom)Formoreinformation,contactourcorporateinstitutionalsalesdepartment:()orcorporateoreillycomProductionEditor:MarloweShaefferCopyeditor:SandersKleinfeldProofreader:SohailaAbdulaliIndexer:EllenTroutmanZaigCoverDesigner:RandyComerInteriorDesigner:MarciaFriedmanIllustrator:JessamynReadPrintingHistory:June:FirstEditionTheO’ReillylogoisaregisteredtrademarkofO’ReillyMedia,IncBeautifulCodeandrelatedtradedressaretrademarksofO’ReillyMedia,IncManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andO’ReillyMedia,Incwasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcapsWhileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedhereinThisbookusesRepKover™,adurableandflexiblelayflatbindingISBN:ISBN:CAllroyaltiesfromthisbookwillbedonatedtoAmnestyInternationalviiCONTENTSCHAPTERFOREWORDxvbyGregWilsonPREFACExviiAREGULAREXPRESSIONMATCHERbyBrianKernighanThePracticeofProgrammingImplementationDiscussionAlternativesBuildingonItConclusionSUBVERSION’SDELTAEDITOR:INTERFACEASONTOLOGYbyKarlFogelVersionControlandTreeTransformationExpressingTreeDifferencesTheDeltaEditorInterfaceButIsItArtAbstractionAsaSpectatorSportConclusionsTHEMOSTBEAUTIFULCODEINEVERWROTEbyJonBentleyTheMostBeautifulCodeIEverWroteMoreandMorewithLessandLessPerspectiveWhatIsWritingConclusionAcknowledgmentsFINDINGTHINGSbyTimBrayOnTimeProblem:WeblogDataProblem:WhoFetchedWhat,WhenSearchintheLargeConclusionviiiCONTENTSCORRECT,BEAUTIFUL,FAST(INTHATORDER):LESSONSFROMDESIGNINGXMLVERIFIERSbyElliotteRustyHaroldTheRoleofXMLValidationTheProblemVersion:TheNaïveImplementationVersion:ImitatingtheBNFGrammarO(N)Version:FirstOptimizationO(logN)Version:SecondOptimization:Don’tCheckTwiceVersion:ThirdOptimizationO()Version:FourthOptimization:CachingTheMoraloftheStoryFRAMEWORKFORINTEGRATEDTEST:BEAUTYTHROUGHFRAGILITYbyMichaelFeathersAnAcceptanceTestingFrameworkinThreeClassesTheChallengeofFrameworkDesignAnOpenFrameworkHowSimpleCananHTMLParserBeConclusionBEAUTIFULTESTSbyAlbertoSavoiaThatPeskyBinarySearchIntroducingJUnitNailingBinarySearchConclusionONTHEFLYCODEGENERATIONFORIMAGEPROCESSINGbyCharlesPetzoldTOPDOWNOPERATORPRECEDENCEbyDouglasCrockfordJavaScriptSymbolTableTokensPrecedenceExpressionsInfixOperatorsPrefixOperatorsAssignmentOperatorsConstantsScopeStatementsCONTENTSixFunctionsArrayandObjectLiteralsThingstoDoandThinkAboutTHEQUESTFORANACCELERATEDPOPULATIONCOUNTbyHenrySWarren,JrBasicMethodsDivideandConquerOtherMethodsSumandDifferenceofPopulationCountsofTwoWordsComparingthePopulationCountsofTwoWordsCountingtheBitsinanArrayApplicationsSECURECOMMUNICATION:THETECHNOLOGYOFFREEDOMbyAshishGulhatiTheHeartoftheStartUntanglingtheComplexityofSecureMessagingUsabilityIstheKeyTheFoundationTheTestSuiteTheFunctioningPrototypeCleanUp,PlugIn,RockOnHackingintheHimalayasTheInvisibleHandMovesSpeedDoesMatterCommunicationsPrivacyforIndividualRightsHackingtheCivilizationGROWINGBEAUTIFULCODEINBIOPERLbyLincolnSteinBioPerlandtheBio::GraphicsModuleTheBio::GraphicsDesignProcessExtendingBio::GraphicsConclusionsandLessonsLearnedTHEDESIGNOFTHEGENESORTERbyJimKentTheUserInterfaceoftheGeneSorterMaintainingaDialogwiththeUserovertheWebALittlePolymorphismCanGoaLongWayFilteringDowntoJusttheRelevantGenesTheoryofBeautifulCodeintheLargeConclusionxCONTENTSHOWELEGANTCODEEVOLVESWITHHARDWARE:THECASEOFGAUSSIANELIMINATIONbyJackDongarraandPiotrLuszczekTheEffectsofComputerArchitecturesonMatrixAlgorithmsADecompositionalApproachASimpleVersionLINPACK’sDGEFASubroutineLAPACKDGETRFRecursiveLUScaLAPACKPDGETRFMultithreadingforMultiCoreSystemsAWordAbouttheErrorAnalysisandOperationCountFutureDirectionsforResearchFurtherReadingTHELONGTERMBENEFITSOFBEAUTIFULDESIGNbyAdamKolawaMyIdeaofBeautifulCodeIntroducingtheCERNLibraryOuterBeautyInnerBeautyConclusionTHELINUXKERNELDRIVERMODEL:THEBENEFITSOFWORKINGTOGETHERbyGregKroahHartmanHumbleBeginningsReducedtoEvenSmallerBitsScalingUptoThousandsofDevicesSmallObjectsLooselyJoinedANOTHERLEVELOFINDIRECTIONbyDiomidisSpinellisFromCodetoPointersFromFunctionArgumentstoArgumentPointersFromFilesystemstoFilesystemLayersFromCodetoaDomainSpecificLanguageMultiplexingandDemultiplexingLayersForeverCONTENTSxiPYTHON’SDICTIONARYIMPLEMENTATION:BEINGALLTHINGSTOALLPEOPLEbyAndrewKuchlingInsidetheDictionarySpecialAccommodationsCollisionsResizingIterationsandDynamicChangesConclusionAcknowledgmentsMULTIDIMENSIONALITERATORSINNUMPYbyTravisEOliphantKeyChallengesinNDimensionalArrayOperationsMemoryModelsforanNDimensionalArrayNumPyIteratorOriginsIteratorDesignIteratorInterfaceIteratorUseConclusionAHIGHLYRELIABLEENTERPRISESYSTEMFORNASA’SMARSROVERMISSIONbyRonaldMakTheMissionandtheCollaborativeInformationPortalMissionNeedsSystemArchitectureCaseStudy:TheStreamerServiceReliabilityRobustnessConclusionERP:DESIGNINGFORMAXIMUMADAPTABILITYbyRogerioAtemdeCarvalhoandRafaelMonneratGeneralGoalsofERPERPTheUnderlyingZopePlatformERPProjectConceptsCodingtheERPProjectConclusionxiiCONTENTSASPOONFULOFSEWAGEbyBryanCantrillDISTRIBUTEDPROGRAMMINGWITHMAPREDUCEbyJeffreyDeanandSanjayGhemawatAMotivatingExampleTheMapReduceProgrammingModelOtherMapReduceExamplesADistributedMapReduceImplementationExtensionstotheModelConclusionFurtherReadingAcknowledgmentsAppendix:WordCountSolutionBEAUTIFULCONCURRENCYbySimonPeytonJonesASimpleExample:BankAccountsSoftwareTransactionalMemoryTheSantaClausProblemReflectionsonHaskellConclusionAcknowledgmentsSYNTACTICABSTRACTION:THESYNTAXCASEEXPANDERbyRKentDybvigBriefIntroductiontosyntaxcaseExpansionAlgorithmExampleConclusionLABORSAVINGARCHITECTURE:ANOBJECTORIENTEDFRAMEWORKFORNETWORKEDSOFTWAREbyWilliamROtteandDouglasCSchmidtSampleApplication:LoggingServiceObjectOrientedDesignoftheLoggingServerFrameworkImplementingSequentialLoggingServersImplementingConcurrentLoggingServersConclusionINTEGRATINGBUSINESSPARTNERSTHERESTFULWAYbyAndrewPatzerProjectBackgroundExposingServicestoExternalClientsRoutingtheServiceUsingtheFactoryPatternExchangingDataUsingEBusinessProtocolsConclusionCONTENTSxiiiBEAUTIFULDEBUGGINGbyAndreasZellerDebuggingaDebuggerASystematicProcessASearchProblemFindingtheFailureCauseAutomaticallyDeltaDebuggingMinimizingInputHuntingtheDefectAPrototypeProblemConclusionAcknowledgmentsFurtherReadingTREATINGCODEASANESSAYbyYukihiroMatsumotoWHENABUTTONISALLTHATCONNECTSYOUTOTHEWORLDbyArunMehtaBasicDesignModelInputInterfaceEfficiencyoftheUserInterfaceDownloadFutureDirectionsEMACSPEAK:THECOMPLETEAUDIODESKTOPbyTVRamanProducingSpokenOutputSpeechEnablingEmacsPainlessAccesstoOnlineInformationSummaryAcknowledgmentsCODEINMOTIONbyLauraWingerdandChristopherSeiwaldOnBeing“Bookish”AlikeLookingAlikeThePerilsofIndentationNavigatingCodeTheToolsWeUseDiffMerge’sCheckeredPastConclusionAcknowledgmentsFurtherReadingxivCONTENTSWRITINGPROGRAMSFOR“THEBOOK”byBrianHayesTheNonroyalRoadWarningtoParenthophobesThreeinaRowTheSlipperySlopeTheTriangleInequalityMeanderingOn“Duh!”IMean“Aha!”ConclusionFurtherReadingAFTERWORDbyAndyOramCONTRIBUTORSINDEXxvChapterForewordGregWilsonIGOTMYFIRSTJOBASAPROGRAMMERINTHESUMMEROFTwoweeksafterIstarted,oneofthesystemadministratorsloanedmeKernighanandPlauger’sTheElementsofProgrammingStyle(McGrawHill)andWirth’sAlgorithmsDataStructures=Programs(PrenticeHall)Theywerearevelationforthefirsttime,IsawthatprogramscouldbemorethanjustinstructionsforcomputersTheycouldbeaselegantaswellmadekitchencabinets,asgracefulasasuspensionbridge,oraseloquentasoneofGeorgeOrwell’sessaysTimeandagainsincethatsummer,Ihaveheardpeoplebemoanthefactthatourprofessiondoesn’tteachstudentstoseethisArchitectsaretaughttolookatbuildings,andcomposersstudyoneanother’sscores,butprogrammerstheylookateachother’sworkonlywhenthere’sabugtofixeventhen,theytrytolookataslittleaspossibleWetellstudentstousesensiblevariablenames,introducethemtosomebasicdesignpatterns,andthenwonderwhysomuchofwhattheywriteissouglyThisbookisourattempttofixthisInMay,Iaskedsomewellknown(andnotsowellknown)softwaredesignerstodissectanddiscussthemostbeautifulpieceofcodetheyknewAsthisbookshows,theyhavefoundbeautyinmanydifferentplacesForxviFOREWORDsome,itlivesinthesmalldetailsofelegantlycraftedsoftwareOthersfindbeautyinthebigpictureinhowaprogram’sstructureallowsittoevolvegracefullyovertime,orinthetechniquesusedtobuilditWherevertheyfindit,IamgratefultoourcontributorsfortakingtimetogiveusatourIhopethatyouenjoyreadingthisbookasmuchasAndyandIhaveenjoyededitingit,andthatitinspiresyoutocreatesomethingbeautiful,tooxviiChapterPrefaceBEAUTIFULCODEWASCONCEIVEDBYGREGWILSONINasawaytoelicitinsightsfromleadingsoftwaredevelopersandcomputerscientistsTogether,heandhiscoeditor,AndyOram,approachedexpertswithdiversebackgroundsfromallovertheworldTheyreceivedafloodofresponses,partlybecauseroyaltiesfromthebookarebeingdonatedtoAmnestyInternationalTheresultsoftheprojectappearinthisvolumeAswiderangingasthisbookis,itrepresentsjustasmallfractionofwhatishappeninginthismostexcitingoffieldsThousandofotherprojects,equallyinterestingandeducational,arebeingmovedforwardeverydaybyotherprogrammerswhomwedidnotcontactFurthermore,manyexcellentpractitionerswhowereaskedforchaptersdonotappearinthisbookbecausetheyweretoobusyatthetime,preferrednottocontributetoAmnestyInternational,orhadconflictingobligationsTobenefitfromtheinsightsofallthesepeople,wehopetodofurtherbooksalongsimilarlinesinthefutureHowThisBookIsOrganizedChapter,ARegularExpressionMatcher,byBrianKernighan,showshowdeepinsightintoalanguageandaproblemcanleadtoaconciseandelegantsolutionxviiiPREFACEChapter,Subversion’sDeltaEditor:InterfaceAsOntology,byKarlFogel,startswithawellchosenabstractionanddemonstratesitsunifyingeffectsonthesystem’sfurtherdevelopmentChapter,TheMostBeautifulCodeINeverWrote,byJonBentley,suggestshowtomeasureaprocedurewithoutactuallyexecutingitChapter,FindingThings,byTimBray,drawstogethermanystrandsinComputerScienceinanexplorationofaproblemthatisfundamentaltomanycomputingtasksChapter,Correct,Beautiful,Fast(inThatOrder):LessonsfromDesigningXMLVerifiers,byElliotteRustyHarold,reconcilestheoftenconflictinggoalsofthoroughnessandgoodperformanceChapter,FrameworkforIntegratedTest:BeautyThroughFragility,byMichaelFeathers,presentsanexamplethatbreakstherulesandachievesitsownelegantsolutionChapter,BeautifulTests,byAlbertoSavoia,showshowabroad,creativeapproachtotestingcannotonlyeliminatebugsbutturnyouintoabetterprogrammerChapter,OntheFlyCodeGenerationforImageProcessing,byCharlesPetzold,dropsdownaleveltoimproveperformancewhilemaintainingportabilityChapter,TopDownOperatorPrecedence,byDouglasCrockford,revivesanalmostforgottenparsingtechniqueandshowsitsnewrelevancetothepopularJavaScriptlanguageChapter,TheQuestforanAcceleratedPopulationCount,byHenrySWarren,Jr,revealstheimpactthatsomecleveralgorithmscanhaveonevenaseeminglysimpleproblemChapter,SecureCommunication:TheTechnologyOfFreedom,byAshishGulhati,discussesthedirectedevolutionofasecuremessagingapplicationthatwasdesignedtomakesophisticatedbutoftenconfusingcryptographictechnologyintuitivelyaccessibletousersChapter,GrowingBeautifulCodeinBioPerl,byLincolnStein,showshowthecombinationofaflexiblelanguageandacustomdesignedmodulecanmakeiteasyforpeoplewithmodestprogrammingskillstocreatepowerfulvisualizationsfortheirdataChapter,TheDesignoftheGeneSorter,byJimKent,combinessimplebuildingblockstoproducearobustandvaluabletoolforgeneresearchersChapter,HowElegantCodeEvolveswithHardware:TheCaseofGaussianElimination,byJackDongarraandPiotrLuszczek,surveysthehistoryofLINPACKandrelatedmajorsoftwarepackagestoshowhowassumptionsmustconstantlybereevaluatedinthefaceofnewcomputingarchitecturesChapter,TheLongTermBenefitsofBeautifulDesign,byAdamKolawa,explainshowattentiontogooddesignprinciplesmanydecadesagohelpedCERN’swidelyusedmathematicallibrary(thepredecessorofLINPACK)standthetestoftimePREFACExixChapter,TheLinuxKernelDriverModel:TheBenefitsofWorkingTogether,byGregKroahHartman,explainshowmanyeffortsbydifferentcollaboratorstosolvedifferentproblemsledtothesuccessfulevolutionofacomplex,multithreadedsystemChapter,AnotherLevelofIndirection,byDiomidisSpinellis,showshowtheflexibilityandmaintainabilityoftheFreeBSDkernelispromotedbyabstractingoperationsdoneincommonbymanydriversandfilesystemmodulesChapter,Python’sDictionaryImplementation:BeingAllThingstoAllPeople,byAndrewKuchling,explainshowacarefuldesigncombinedwithaccommodationsforafewspecialcasesallowsalanguagefeaturetosupportmanydifferentusesChapter,MultidimensionalIteratorsinNumPy,byTravisEOliphant,takesyouthroughthedesignstepsthatsucceedinhidingcomplexityunderasimpleinterfaceChapter,AHighlyReliableEnterpriseSystemforNASA’sMarsRoverMission,byRonaldMak,usesindustrystandards,bestpractices,andJavatechnologiestomeettherequirementsofaNASAexpeditionwherereliabilitycannotbeindoubtChapter,ERP:DesigningforMaximumAdaptability,byRogerioAtemdeCarvalhoandRafaelMonnerat,showshowapowerfulERPsystemcanbedevelopedwithfreesoftwaretoolsandaflexiblearchitectureChapter,ASpoonfulofSewage,byBryanCantrill,letsthereaderaccompanytheauthorthroughahairraisingbugscareandacleversolutionthatviolatedexpectationsChapter,DistributedProgrammingwithMapReduce,byJeffDeanandSanjayGhemawat,describesasystemthatprovidesaneasytouseprogrammingabstractionforlargescaledistributeddataprocessingatGooglethatautomaticallyhandlesmanydifficultaspectsofdistributedcomputation,includingautomaticparallelization,loadbalancing,andfailurehandlingChapter,BeautifulConcurrency,bySimonPeytonJones,removesmuchofthedifficultyofparallelprogramsthroughSoftwareTransactionalMemory,demonstratedhereusingHaskellChapter,SyntacticAbstraction:ThesyntaxcaseExpander,byRKentDybvig,showshowmacrosakeyfeatureofmanylanguagesandsystemscanbeprotectedinSchemefromproducingerroneousoutputChapter,LaborSavingArchitecture:AnObjectOrientedFrameworkforNetworkedSoftware,byWilliamROtteandDouglasCSchmidt,appliesarangeofstandardobjectorienteddesigntechniques,suchaspatternsandframeworks,todistributedloggingto

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/49

[英文]代码之美

仅供在线阅读

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利