读书人

编程珠玑(英文版?第2版) [平装]

发布时间: 2013-12-19 05:17:56 作者: rapoo

编程珠玑(英文版?第2版) [平装]

编辑推荐

多年以来。当程序员们推选出最心爱的计算机图书时,《编程珠玑》总是位于前列。正如自然界里珍珠出自细沙对牡蛎的磨砺.计算机科学大师Jon Bentley以其独有的洞察力和创造力,从磨砺程序员的实际问题中凝结出一篇篇不朽的编程“珠玑”。这些文章是《ACM通讯》最受欢迎的专栏文章,最终结集为两部书出版。《编程珠玑(英文版第2版)》为第一卷。主要讨论计算机科学中最本质的问题:如何正确选择和高效地实现算法。
在书中,作者选取许多具有典型意义的复杂编程和算法问题。生动描绘了历史上众多大师们在探索解决方案中发生的轶事、走过的弯路和不断精益求精的历程。引导读者开展创新性的思考。书中透彻阐述和总结了许多独特而精妙的设计原则、思考和解决问题的方法以及实用程序设计技巧。解决方案的代码均以C/C++语言编写,不仅有趣。而且有很大的实战示范意义。每章后所附习题极具挑战性和启发性,书末给出了简洁的解答。

媒体推荐

“《编程珠玑》第1版是对我职业生涯早期影响最大的一本书。其中的许多真知灼见多年之后仍然使我受益匪浅。Jon在第2版中对素材进行了大量更新。许多新内容让我耳目一新。”
  ——Steve McConnell,《代码大全》作者
“对每一位遇到的程序员,我都会毫不迟疑地建议他阅读并不断重读这部经典之作。”
  ——Slashdot

作者简介

作者:(美国)本特利(Jon Bentley)

本特利,Jon Bentley,1953年2月20日出生于美国加州长滩。1974年毕业于斯坦福大学数学系,1976年获北卡罗来纳大学博士学位。他先后任职于卡内基-梅隆大学(1976-1982)、贝尔实验室(1982-2001)和Avaya实验室(2001年至今)。在卡内基-梅隆大学任教期间。他培养了许多后来知名的计算机大家。包括Scribe的开发者Brian Reid,Tcl语言设计者John Ousterhout,Java专家Joshua Bloch,Java语言设计者James Gosling,《算法导论》作者之——Charles Leiserson。2004年荣获Dr. Dobb’s程序设计卓越奖。

目录

Part I: PRELIMINARIES
Column 1: Cracking the Oyster
A Friendly ConversationPrecise Problem StatementProgram DesignImplementation SketchPrinciplesProblemsFurther Reading

Column 2: Aha! Algorithms
Three ProblemsUbiquitous Binary SearchThe Power of PrimitivesGetting It Together: SortingPrinciplesProblemsFurther ReadingImplementing an Anagram Program

Column 3: Data Structures Programs
A Survey ProgramForm-Letter ProgrammingAn Array of ExamplesStructuring DataPowerful Tools for Specialized DataPrinciplesProblemsFurther Reading

Column 4: Writing Correct Programs
The Challenge of Binary SearchWriting the ProgramUnderstanding the ProgramPrinciplesThe Roles of Program VerificationProblemsFurther Reading

Column 5: A Small Matter of Programming
From Pseudocode to CA Test HarnessThe Art of AssertionAutomated TestingTimingThe Complete ProgramPrinciplesProblemsFurther ReadingDebugging

Part II: PERFORMANCE

Column 6: Perspective on Performance
A Case StudyDesign LevelsPrinciplesProblemsFurther Reading

Column 7: The Back of the Envelope
Basic SkillsPerformance EstimatesSafety FactorsLittle's LawPrinciplesProblemsFurther ReadingQuick Calculations in Everyday Life

Column 8: Algorithm Design Techniques
The Problem and a Simple AlgorithmTwo Quadratic AlgorithmsA Divide-and-Conquer AlgorithmA Scanning AlgorithmWhat Does It Matter?PrinciplesProblemsFurther Reading

Column 9: Code Tuning7
A Typical StoryA First Aid SamplerMajor Surgery——Binary SearchPrinciplesProblemsFurther Reading

Column 10: Squeezing Space
The KeySimplicityAn Illustrative ProblemTechniques for Data SpaceTechniques for Code SpacePrinciplesProblemsFurther ReadingA Big Squeeze

Part III: THE PRODUCT

Column 11: Sorting 115
Insertion SortA Simple QuicksortBetter QuicksortsPrinciplesProblemsFurther Reading

Column 12: A Sample Problem
The ProblemOne SolutionThe Design SpacePrinciplesProblemsFurther Reading

Column 13: Searching
The InterfaceLinear StructuresBinary Search TreesStructures for IntegersPrinciplesProblemsFurther ReadingA Real Searching Problem

Column 14: Heaps
The Data StructureTwo Critical FunctionsPriority QueuesA Sorting AlgorithmPrinciplesProblemsFurther Reading

Column 15: Strings of Pearls
WordsPhrasesGenerating TextPrinciplesProblemsFurther Reading

Epilog to the First Edition
Epilog to the Second Edition

Appendix 1: A Catalog of Algorithms
Appendix 2: An Estimation Quiz
Appendix 3: Cost Models for Time and Space
Appendix 4: Rules for Code Tuning
Appendix 5: C++ Classes for Searching

Hints for Selected Problems
Solutions to Selected Problems
Index

序言

计算机编程有很多方面。Fred Brooks在《人月神话》一书中为我们描绘了全景,他的文章强调了管理在大型软件项目中所起的关键作用。而Steve McConnell在《代码大全》一书中更具体地传授了良好的编程风格。这两本书所讨论的是好软件的关键因素和专业程序员应有的特征。遗憾的是,仅仅熟练地运用这些可靠的工程原理,不见得一定能够如期完成软件并顺利运行。
关于本书
本书描述了计算机编程更具魅力的一面:在可靠的工程之外,在洞察力和创造力范围内结晶而出的编程珠玑。正如自然界中的珍珠来自干磨砺牡蛎的细沙一样,这些编程珠玑来自于磨砺程序员的实际问题。书中的程序都很有趣,传授了重要的编程技巧和基本的设计原理。
本书大部分内容最初发表在《ACM通讯》中我主持的“编程珠玑”专栏。这些内容经过汇总和修订,在1986年结集出版,成为了本书的第1版。第1版的13篇文章中,有12篇都在本版中做了大幅修订;此外,本版还补充了3篇新的内容。阅读本书只需要读者具有某种高级语言的编程经验。书中偶尔会出现一些高级技术(如C++中的模板等),对此不熟悉的读者可以跳过这些内容,基本上不影响阅读。
本书每一章都独立成篇,各章之间却又有着逻辑分组。第1章至第5章构成本书的第一部分,这部分回顾了编程的基本原理:问题定义、算法、数据结构以及程序验证和测试。第二部分围绕效率这个主题展开。效率问题有时本身就很重要,又永远都是进入有趣编程问题的绝佳跳板。第三部分用这些技术来解决排序、搜索和字符串等重要问题。
阅读本书的一个提示:不要读得太快。要仔细阅读,一次读一章。要尝试解答书中提出的问题——有些问题需要集中精力思考一两个小时才会想清楚。然后,要努力解答每章末尾的习题:当读者写下答案时,从本书学到的大部分知识就会跃然纸上。

文摘

插图:



Algorithm Tuning. The simple algorithm always uses small time steps to handle the rare case that two particles come close to one another. The tree data structure allows such pairs to be recognized and handled by a special function. That doubles the time step size and thereby halves the run time of the program.
Data Structure Reorganization. The tree that represents the initial set of objects is quite poor at representing later sets. Reconfiguring the data structure at each time step costs a little time, but reduces the number of local calculations and thereby halves the total run time.
Code Tuning. Due to additional numerical accuracy provided by the tree, 64-bitdouble-precision floating point numbers could be replaced by 32-bit single-precision numbers; that change halved the run time. Profiling the program showed that 98 percent of the run time was spent in one function; rewriting that code in assembly language increased its speed by a factor of 2.5.
Hard ware. After all the above changes, the program still required two days of time on a departmental machine that cost a quarter of a million dollars, and several runs of the program were desired. Appel therefore moved the program to a slightly more expensive machine equipped with a floating point accelerator, which halved its run time again.

喜欢编程珠玑(英文版?第2版) [平装]请与您的朋友分享,由于版权原因,读书人网不提供图书下载服务

读书人网 >程序设计

热点推荐