商家名称 | 信用等级 | 购买信息 | 订购本书 |
编程珠玑(英文版?第2版) [平装] | |||
编程珠玑(英文版?第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 Conversation·Precise Problem Statement·Program Design·Implementation Sketch·Principles·Problems·Further Reading
Column 2: Aha! Algorithms
Three Problems·Ubiquitous Binary Search·The Power of Primitives·Getting It Together: Sorting·Principles·Problems·Further Reading·Implementing an Anagram Program
Column 3: Data Structures Programs
A Survey Program·Form-Letter Programming·An Array of Examples·Structuring Data·Powerful Tools for Specialized Data·Principles·Problems·Further Reading
Column 4: Writing Correct Programs
The Challenge of Binary Search·Writing the Program·Understanding the Program·Principles·The Roles of Program Verification·Problems·Further Reading
Column 5: A Small Matter of Programming
From Pseudocode to C·A Test Harness·The Art of Assertion·Automated Testing·Timing·The Complete Program·Principles·Problems·Further Reading·Debugging
Part II: PERFORMANCE
Column 6: Perspective on Performance
A Case Study·Design Levels·Principles·Problems·Further Reading
Column 7: The Back of the Envelope
Basic Skills·Performance Estimates·Safety Factors·Little's Law·Principles·Problems·Further Reading·Quick Calculations in Everyday Life
Column 8: Algorithm Design Techniques
The Problem and a Simple Algorithm·Two Quadratic Algorithms·A Divide-and-Conquer Algorithm·A Scanning Algorithm·What Does It Matter?·Principles·Problems·Further Reading
Column 9: Code Tuning7
A Typical Story·A First Aid Sampler·Major Surgery——Binary Search·Principles·Problems·Further Reading
Column 10: Squeezing Space
The KeySimplicity·An Illustrative Problem·Techniques for Data Space·Techniques for Code Space·Principles·Problems·Further Reading·A Big Squeeze
Part III: THE PRODUCT
Column 11: Sorting 115
Insertion Sort·A Simple Quicksort·Better Quicksorts·Principles·Problems·Further Reading
Column 12: A Sample Problem
The Problem·One Solution·The Design Space·Principles·Problems·Further Reading
Column 13: Searching
The Interface·Linear Structures·Binary Search Trees·Structures for Integers·Principles·Problems·Further Reading·A Real Searching Problem
Column 14: Heaps
The Data Structure·Two Critical Functions·Priority Queues·A Sorting Algorithm·Principles·Problems·Further Reading
Column 15: Strings of Pearls
Words·Phrases·Generating Text·Principles·Problems·Further 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版) [平装]请与您的朋友分享,由于版权原因,读书人网不提供图书下载服务