One-time purchase -58% $18.75$18.75 FREE delivery April 19 - 20 on orders shipped by Amazon over $35 Ships from: Amazon Sold by: Arizy
Get it faster -54% $20.84$20.84 FREE delivery Friday, April 17 on orders shipped by Amazon over $35 Ships from: Amazon.com Sold by: Amazon.com
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Programming Pearls (ACM Press) 2nd Edition
Purchase options and add-ons
When programmers list their favourite books, Jon Bentley’s collection of programming pearls is commonly included among the classics. Just as natural pearls grow from grains of sand that irritate oysters, programming pearls have grown from real problems that have irritated real programmers. With origins beyond solid engineering, in the realm of insight and creativity, Bentley’s pearls offer unique and clever solutions to those nagging problems. Illustrated by programs designed as much for fun as for instruction, the book is filled with lucid and witty descriptions of practical programming techniques and fundamental design principles. It is not at all surprising that Programming Pearls has been so highly valued by programmers at every level of experience.
What remains the same in this edition is Bentley’s focus on the hard core of programming problems and his delivery of workable solutions to those problems. Whether you are new to Bentley’s classic or are revisiting his work for some fresh insight, the book is sure to make your own list of favourites.
- ISBN-100201657880
- ISBN-13978-0201657883
- Edition2nd
- PublisherAddison-Wesley Professional
- Publication dateSeptember 27, 1999
- LanguageEnglish
- Dimensions9.1 x 6.2 x 0.6 inches
- Print length256 pages
Frequently bought together

Customers who viewed this item also viewed
The Practice of Programming (Addison-Wesley Professional Computing Series)PaperbackGet it as soon as Sunday, Apr 19
Coders at Work: Reflections on the Craft of ProgrammingPaperbackFREE Shipping by AmazonGet it as soon as Friday, Apr 17
More Programming Pearls: Confessions of a Coder: Confessions of a CoderPaperbackGet it as soon as Sunday, Apr 26
The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition)David ThomasHardcoverFREE Shipping by AmazonGet it as soon as Friday, Apr 17
Mythical Man-Month, The: Essays on Software Engineering, Anniversary EditionFrederick Brooks Jr.PaperbackGet it as soon as Saturday, Apr 25
Customers also bought or read
- The Practice of Programming (Addison-Wesley Professional Computing Series)
Paperback$49.99$49.99FREE delivery Apr 19 - 23 - Coders at Work: Reflections on the Craft of Programming
Paperback$39.61$39.61FREE delivery Fri, Apr 17 - More Programming Pearls: Confessions of a Coder: Confessions of a Coder
Paperback$44.71$44.71FREE delivery Apr 26 - May 5 - Mythical Man-Month, The: Essays on Software Engineering, Anniversary Edition
Paperback$29.14$29.14Delivery Apr 25 - May 1 - The Algorithm Design Manual (Texts in Computer Science)
Hardcover$64.85$64.85FREE delivery Fri, Apr 17 - Structure and Interpretation of Computer Programs - 2nd Edition (MIT Electrical Engineering and Computer Science)#1 Best SellerCompiler Design
Paperback$60.21$60.21FREE delivery Apr 19 - 22 - The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition)#1 Best SellerSoftware Design & Engineering
Hardcover$41.64$41.64FREE delivery Fri, Apr 17 - Design Patterns: Elements of Reusable Object-Oriented Software#1 Best SellerObject-Oriented Design
Hardcover$30.47$30.47Delivery Apr 21 - 25 - Operating Systems: Three Easy Pieces#1 Best SellerComputer Operating Systems Theory
Paperback$28.27$28.27Delivery Fri, Apr 17 - Cracking the Coding Interview: 189 Programming Questions and Solutions
Paperback$25.79$25.79Delivery Fri, Apr 17 - Working Effectively with Legacy Code (Robert C. Martin Series)
Paperback$53.46$53.46FREE delivery Fri, Apr 17 - Art of Computer Programming, The, Volumes 1-4B, Boxed Set
Hardcover$276.99$276.99FREE delivery Fri, Apr 17 - Software Engineering at Google: Lessons Learned from Programming Over Time
Paperback$36.49$36.49FREE delivery Fri, Apr 17 - The Clean Coder: A Code of Conduct for Professional Programmers
Paperback$41.71$41.71FREE delivery Fri, Apr 17 - Domain-Driven Design: Tackling Complexity in the Heart of Software
Hardcover$64.42$64.42FREE delivery Apr 19 - 22 - Code: The Hidden Language of Computer Hardware and Software
Paperback$33.88$33.88Delivery Fri, Apr 17 - Rust for Rustaceans: Idiomatic Programming for Experienced Developers
Paperback$29.49$29.49Delivery Fri, Apr 17 - Tour of C++, A (C++ In-Depth Series)#1 Best SellerC++ Programming Language
Paperback$39.99$39.99FREE delivery Fri, Apr 17 - The Unix Programming Environment (Prentice-Hall Software Series)
Paperback$83.99$83.99FREE delivery Fri, Apr 17
From the Publisher
A Must-Read for Every Working and Aspiring Programmer
This classic is on just about every single must-read list for programmers including lists featured on Lifehacker, Career Karma, DZone, Coding Jojo, Geeks for Geeks, and more.
"Since programming is really about problem solving, you’ll appreciate the thought process and 'back of the envelope' solutions that Jon Bentley shares in Programming Pearls (2nd Edition). Every chapter ends with a number challenges that are often used in technical job interviews, so make this book part of your job prep."
—Lifehacker's list of "14 Great Ways to Teach Yourself Code"
Editorial Reviews
Amazon.com Review
The "pearls" in question center not only on choosing the right algorithms (like binary searches, sorting techniques, or sparse arrays) but also on showing how to solve problems effectively. Each chapter frames a particular programming task--such as sorting numbers, creating anagrams, or counting the words in a block of text--many drawn from Bentley's experiences in his long career as a developer. The book traces the process of arriving at a fast, efficient, and accurate solution, along with code profiling to discover what works best. After refining the correct answer, each chapter enumerates programming principles that you can use on your own.
The author also challenges you to think like an engineer, and each chapter ends with about a dozen problems to get you thinking creatively about design issues. (Sidebars on such historical topics as the first computer solutions to computer chess, spell-checking, and even architectural design help create a perspective on successful problem solving and make for a truly educational and enjoyable tour of how to become a better programmer.) Bentley also asks the reader to think analytically about the world with "back of the envelope" estimation techniques drawn from engineering. Appendices list the algorithms and code rules covered in the book, plus some sample solutions.
Fans of the first edition of this title will be pleased to see this favorite computer text brought up to date for today's faster hardware. Whether you want to improve your command of algorithms or test your problem-solving skills, the new version of Programming Pearl is a challenging, instructive, and thoroughly entertaining resource. --Richard Dragan
Topics covered: Programming and problem-solving tutorial, sorting algorithms, merge sort, bit vectors, binary searches, program correctness and testing, improving performance, engineering and problem-solving techniques, performance estimates, designing for safety, divide-and-conquer and scanning algorithms, tuning code, tips for more efficient memory usage, insertion sort, quicksort algorithms, sparse arrays, searching algorithms, binary search trees, heaps, priority queues, searching text, and generating random text.
From the Inside Flap
Computer programming has many faces. Fred Brooks paints the big picture in
The Mythical Man Month; his essays underscore the crucial role of management
in large software projects. At a finer grain, Steve McConnell teaches good programming
style in Code Complete. The topics in those books are the key to good software
and the hallmark of the professional programmer. Unfortunately, though, the
workmanlike application of those sound engineering principles isn't always thrilling
-- until the software is completed on time and works without surprise.
About the Book
The columns in this book are about a more glamorous aspect of the profession:
programming pearls whose origins lie beyond solid engineering, in the realm
of insight and creativity. Just as natural pearls grow from grains of sand that
have irritated oysters, these programming pearls have grown from real problems
that have irritated real programmers. The programs are fun, and they teach important
programming techniques and fundamental design principles.
Most of these essays originally appeared in my ''Programming Pearls'' column
in Communications of the Association for Computing Machinery. They were
collected, revised and published as the first edition of this book in 1986.
Twelve of the thirteen pieces in the first edition have been edited substantially
for this edition, and three new columns have been added.
The only background the book assumes is programming experience in a high-level
language. Advanced techniques (such as templates in C++) show up now and then,
but the reader unfamiliar with such topics will be able to skip to the next
section with impunity.
Although each column may be read by itself, there is a logical grouping to
the complete set. Columns 1 through 5 form Part I of the book. They review programming
fundamentals: problem definition, algorithms, data structures and program verification
and testing. Part II is built around the theme of efficiency, which is sometimes
important in itself and is always a fine springboard into interesting programming
problems. Part III applies those techniques to several substantial problems
in sorting, searching and strings.
One hint about reading the essays: don't go too fast. Read them carefully,
one per sitting. Try the problems as they are posed -- some of them look easy
until you've butted your head against them for an hour or two. Afterwards, work
hard on the problems at the end of each column: most of what you learn from
this book will come out the end of your pencil as you scribble down your solutions.
If possible, discuss your ideas with friends and colleagues before peeking at
the hints and solutions in the back of the book. The further reading at the
end of each chapter isn't intended as a scholarly reference list; I've recommended
some good books that are an important part of my personal library.
This book is written for programmers. I hope that the problems, hints, solutions,
and further reading make it useful for individuals. The book has been used in
classes including Algorithms, Program Verification and Software Engineering.
The catalog of algorithms in Appendix 1 is a reference for practicing programmers,
and also shows how the book can be integrated into classes on algorithms and
data structures.
The Code
The pseudocode programs in the first edition of the book were all implemented,
but I was the only person to see the real code. For this edition, I have rewritten
all the old programs and written about the same amount of new code. The programs
are available at this book's web site. The code includes much of the scaffolding
for testing, debugging and timing the functions. The site also contains other
relevant material. Because so much software is now available online, a new theme
in this edition is how to evaluate and use software components.
The programs use a terse coding style: short variable names, few blank lines,
and little or no error checking. This is inappropriate in large software projects,
but it is useful to convey the key ideas of algorithms. Solution 5.1 gives more
background on this style. The text includes a few real C and C++ programs, but
most functions are expressed in a pseudocode that takes less space and avoids
inelegant syntax. The notation for i = 0, n) iterates i from
0 through n-1. In these for loops, left and right parentheses denote
open ranges (which do not include the end values), and left and right square
brackets denote closed ranges (which do include the end values). The phrase
function(i, j) still calls a function with parameters i and j,
and arrayi, j still accesses an array element.
This edition reports the run times of many programs on ''my computer'', a 400MHz
Pentium II with 128 megabytes of RAM running Windows NT 4.0. I timed the programs
on several other machines, and the book reports the few substantial differences
that I observed. All experiments used the highest available level of compiler
optimization. I encourage you to time the programs on your machine; I bet that
you'll find similar ratios of run times.
To Readers of the First Edition
I hope that your first response as you thumb through this edition of the book
is, ''This sure looks familiar.'' A few minutes later, I hope that you'll observe,
''I've never seen that before.''
This version has the same focus as the first edition, but is set in a larger
context. Computing has grown substantially in important areas such as databases,
networking and user interfaces. Most programmers should be familiar users of
such technologies. At the center of each of those areas, though, is a hard core
of programming problems. Those programs remain the theme of this book. This
edition of the book is a slightly larger fish in a much larger pond.
One section from old Column 4 on implementing binary search grew into new Column
5 on testing, debugging and timing. Old Column 11 grew and split into new Columns
12 (on the original problem) and 13 (on set representations). Old Column 13
described a spelling checker that ran in a 64-kilobyte address space; it has
been deleted, but its heart lives on in Section 13.8. New Column 15 is about
string problems. Many sections have been inserted into the old columns, and
other sections were deleted along the way. With new problems, new solutions,
and four new appendices, this edition of the book is 25 percent longer.
Many of the old case studies in this edition are unchanged, for their historical
interest. A few old stories have been recast in modern terms.
Acknowledgments for the First Edition
I am grateful for much support from many people. The idea for a Communications
of the ACM column was originally conceived by Peter Denning and Stuart Lynn.
Peter worked diligently within ACM to make the column possible and recruited
me for the job. ACM Headquarters staff, particularly Roz Steier and Nancy Adriance,
have been very supportive as these columns were published in their original
form. I am especially indebted to the ACM for encouraging publication of the
columns in their present form, and to the many CACM readers who made
this expanded version necessary and possible by their comments on the original
columns.
Al Aho, Peter Denning, Mike Garey, David Johnson, Brian Kernighan, John Linderman,
Doug McIlroy and Don Stanat have all read each column with great care, often
under extreme time pressure. I am also grateful for the particularly helpful
comments of Henry Baird, Bill Cleveland, David Gries, Eric Grosse, Lynn Jelinski,
Steve Johnson, Bob Melville, Bob Martin, Arno Penzias, Marilyn Roper, Chris
Van Wyk, Vic Vyssotsky and Pamela Zave. Al Aho, Andrew Hume, Brian Kernighan,
Ravi Sethi, Laura Skinger and Bjarne Stroustrup provided invaluable help in
bookmaking, and West Point cadets in EF 485 field tested the penultimate draft
of the manuscript. Thanks, all.
Acknowledgments for the Second Edition
Dan Bentley, Russ Cox, Brian Kernighan, Mark Kernighan, John Linderman, Steve
McConnell, Doug McIlroy, Rob Pike, Howard Trickey and Chris Van Wyk have all
read this edition with great care. I am also grateful for the particularly helpful
comments of Paul Abrahams, Glenda Childress, Eric Grosse, Ann Martin, Peter
McIlroy, Peter Memishian, Sundar Narasimhan, Lisa Ricker, Dennis Ritchie, Ravi
Sethi, Carol Smith, Tom Szymanski and Kentaro Toyama. I thank Peter Gordon and
his colleagues at Addison-Wesley for their help in preparing this edition.
0201657880P04062001
From the Back Cover
"The first edition of Programming Pearls was one of the most influential books I read early in my career, and many of the insights I first encountered in that book stayed with me long after I read it. Jon has done a wonderful job of updating the material. I am very impressed at how fresh the new examples seem."
―Steve McConnell
When programmers list their favorite books, Jon Bentley’s collection of programming pearls is commonly included among the classics. Just as natural pearls grow from grains of sand that irritate oysters, programming pearls have grown from real problems that have irritated real programmers. With origins beyond solid engineering, in the realm of insight and creativity, Bentley’s pearls offer unique and clever solutions to those nagging problems. Illustrated by programs designed as much for fun as for instruction, the book is filled with lucid and witty descriptions of practical programming techniques and fundamental design principles. It is not at all surprising that Programming Pearls has been so highly valued by programmers at every level of experience.
In this revision, the first in 14 years, Bentley has substantially updated his essays to reflect current programming methods and environments. In addition, there are three new essays on
• testing, debugging, and timing
• set representations
• string problems
All the original programs have been rewritten, and an equal amount of new code has been generated. Implementations of all the programs, in C or C++, are now available on the Web.
What remains the same in this new edition is Bentley’s focus on the hard core of programming problems and his delivery of workable solutions to those problems. Whether you are new to Bentley’s classic or are revisiting his work for some fresh insight, the book is sure to make your own list of favorites.
0201657880B04062001
Excerpt. © Reprinted by permission. All rights reserved.
About the Book The columns in this book are about a more glamorous aspect of the profession: programming pearls whose origins lie beyond solid engineering, in the realm of insight and creativity. Just as natural pearls grow from grains of sand that have irritated oysters, these programming pearls have grown from real problems that have irritated real programmers. The programs are fun, and they teach important programming techniques and fundamental design principles.
Most of these essays originally appeared in my ``Programming Pearls'' column in Communications of the Association for Computing Machinery. They were collected, revised and published as the first edition of this book in 1986. Twelve of the thirteen pieces in the first edition have been edited substantially for this edition, and three new columns have been added.
The only background the book assumes is programming experience in a high-level language. Advanced techniques (such as templates in C++) show up now and then, but the reader unfamiliar with such topics will be able to skip to the next section with impunity.
Although each column may be read by itself, there is a logical grouping to the complete set. Columns 1 through 5 form Part I of the book. They review programming fundamentals: problem definition, algorithms, data structures and program verification and testing. Part II is built around the theme of efficiency, which is sometimes important in itself and is always a fine springboard into interesting programming problems. Part III applies those techniques to several substantial problems in sorting, searching and strings.
One hint about reading the essays: don't go too fast. Read them carefully, one per sitting. Try the problems as they are posed -- some of them look easy until you've butted your head against them for an hour or two. Afterwards, work hard on the problems at the end of each column: most of what you learn from this book will come out the end of your pencil as you scribble down your solutions. If possible, discuss your ideas with friends and colleagues before peeking at the hints and solutions in the back of the book. The further reading at the end of each chapter isn't intended as a scholarly reference list; I've recommended some good books that are an important part of my personal library.
This book is written for programmers. I hope that the problems, hints, solutions, and further reading make it useful for individuals. The book has been used in classes including Algorithms, Program Verification and Software Engineering. The catalog of algorithms in Appendix 1 is a reference for practicing programmers, and also shows how the book can be integrated into classes on algorithms and data structures.
The Code The pseudocode programs in the first edition of the book were all implemented, but I was the only person to see the real code. For this edition, I have rewritten all the old programs and written about the same amount of new code. The programs are available at this book's web site. The code includes much of the scaffolding for testing, debugging and timing the functions. The site also contains other relevant material. Because so much software is now available online, a new theme in this edition is how to evaluate and use software components.
The programs use a terse coding style: short variable names, few blank lines, and little or no error checking. This is inappropriate in large software projects, but it is useful to convey the key ideas of algorithms. Solution 5.1 gives more background on this style. The text includes a few real C and C++ programs, but most functions are expressed in a pseudocode that takes less space and avoids inelegant syntax. The notation for i = [0, n) iterates i from 0 through n-1. In these for loops, left and right parentheses denote open ranges (which do not include the end values), and left and right square brackets denote closed ranges (which do include the end values). The phrase function(i, j) still calls a function with parameters i and j, and array[i, j] still accesses an array element.
This edition reports the run times of many programs on ``my computer'', a 400MHz Pentium II with 128 megabytes of RAM running Windows NT 4.0. I timed the programs on several other machines, and the book reports the few substantial differences that I observed. All experiments used the highest available level of compiler optimization. I encourage you to time the programs on your machine; I bet that you'll find similar ratios of run times.
To Readers of the First Edition I hope that your first response as you thumb through this edition of the book is, ``This sure looks familiar.'' A few minutes later, I hope that you'll observe, ``I've never seen that before.''
This version has the same focus as the first edition, but is set in a larger context. Computing has grown substantially in important areas such as databases, networking and user interfaces. Most programmers should be familiar users of such technologies. At the center of each of those areas, though, is a hard core of programming problems. Those programs remain the theme of this book. This edition of the book is a slightly larger fish in a much larger pond.
One section from old Column 4 on implementing binary search grew into new Column 5 on testing, debugging and timing. Old Column 11 grew and split into new Columns 12 (on the original problem) and 13 (on set representations). Old Column 13 described a spelling checker that ran in a 64-kilobyte address space; it has been deleted, but its heart lives on in Section 13.8. New Column 15 is about string problems. Many sections have been inserted into the old columns, and other sections were deleted along the way. With new problems, new solutions, and four new appendices, this edition of the book is 25 percent longer.
Many of the old case studies in this edition are unchanged, for their historical interest. A few old stories have been recast in modern terms.
Acknowledgments for the First Edition I am grateful for much support from many people. The idea for a Communications of the ACM column was originally conceived by Peter Denning and Stuart Lynn. Peter worked diligently within ACM to make the column possible and recruited me for the job. ACM Headquarters staff, particularly Roz Steier and Nancy Adriance, have been very supportive as these columns were published in their original form. I am especially indebted to the ACM for encouraging publication of the columns in their present form, and to the many CACM readers who made this expanded version necessary and possible by their comments on the original columns.
Al Aho, Peter Denning, Mike Garey, David Johnson, Brian Kernighan, John Linderman, Doug McIlroy and Don Stanat have all read each column with great care, often under extreme time pressure. I am also grateful for the particularly helpful comments of Henry Baird, Bill Cleveland, David Gries, Eric Grosse, Lynn Jelinski, Steve Johnson, Bob Melville, Bob Martin, Arno Penzias, Marilyn Roper, Chris Van Wyk, Vic Vyssotsky and Pamela Zave. Al Aho, Andrew Hume, Brian Kernighan, Ravi Sethi, Laura Skinger and Bjarne Stroustrup provided invaluable help in bookmaking, and West Point cadets in EF 485 field tested the penultimate draft of the manuscript. Thanks, all.
Acknowledgments for the Second Edition Dan Bentley, Russ Cox, Brian Kernighan, Mark Kernighan, John Linderman, Steve McConnell, Doug McIlroy, Rob Pike, Howard Trickey and Chris Van Wyk have all read this edition with great care. I am also grateful for the particularly helpful comments of Paul Abrahams, Glenda Childress, Eric Grosse, Ann Martin, Peter McIlroy, Peter Memishian, Sundar Narasimhan, Lisa Ricker, Dennis Ritchie, Ravi Sethi, Carol Smith, Tom Szymanski and Kentaro Toyama. I thank Peter Gordon and his colleagues at Addison-Wesley for their help in preparing this edition.
Product details
- Publisher : Addison-Wesley Professional
- Publication date : September 27, 1999
- Edition : 2nd
- Language : English
- Print length : 256 pages
- ISBN-10 : 0201657880
- ISBN-13 : 978-0201657883
- Item Weight : 5.6 ounces
- Dimensions : 9.1 x 6.2 x 0.6 inches
- Best Sellers Rank: #58,371 in Books (See Top 100 in Books)
- #15 in Microsoft Programming (Books)
- #38 in Software Development (Books)
- #96 in Computer Software (Books)
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Generated from the text of customer reviewsSelect to learn more
Reviews with images
I got a poor quality edition
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on July 27, 2002Format: PaperbackVerified PurchaseBentley's classic, "Programming Pearls", makes an important point, namely that you won't get good performance without careful coding and profile-based tuning. And it's made clearly, concisely and with compelling examples. The choice of language (C), and the choice of problems (those from computer science 101 we all think we know cold) betrays the sophistication of Bentley's analyses.
Suppose, for the sake of argument, that you have a binary search that's holding up your loop. Or your Huffman coding just isn't snappy enough? "How is that possible?", you might say, fresh out of computer-science 201, "Didn't we just prove these algorithms are optimal?" Well yes, asymptotically up to an arbitrary constant multiplier. But this is the real world, and your code needs to go faster. If this sounds like your predicament, pull up a chair and read "Programming Pearls"; if it's not, you might wonder what all the fuss is about.
Next, fire up your favorite hardware (Sparc or x86 or PowerPC), favorite language (Perl, Java, or even C), favorite release of that language, along with your favorite interpreter or compiler (Hotspot or standard? GCC or Visual C++). And you'll need a profiler; might as well treat yourself to a good one if you're serious. Then fire up your code with a representative range realistic test data and observe what happens. Function by function, byte by byte. Then try to be as clever as Bentley in (a) figuring out why, (b) trying a range of alternatives, and (c) making it all go faster with minor tuning. Typically, you'll find a single bottleneck taking an order of magnitude more time than everything else, and work on that. Repeat until fast enough.
As well as this simple, yet surprisingly effective and realistic methodology, Bentley provides a range of concrete tips on making things go faster, from tweaking data structures to unfolding loops (especially precomputing low-order cases) to using accumulators and caching, all with an eye to underlying memory, communication and CPU resources.
Real code that has to run fast, like the code that we write at my current company for signal processing, speech recognition and speech synthesis, typically looks like the end-product of Bentley's refactorings. And it gets that way following exactly the path he lays out: analyze the problem, choose the right algorithm (or the right few to evaluate), and then tune it up using profiling.
"Programming Pearls" is the beginning of the road. You will need to look elsewhere for topics such as compression for memory saving, numerical algorithms, effective concurrency and memory sharing, efficient buffered I/O, garbage collection, and the wide range of dynamic programming and heuristic techniques.
- Reviewed in the United States on January 24, 2014Format: PaperbackVerified PurchaseIn my experience it is a good book for students , and also for professionals, who want the excellence in programming. All the concepts can be applied in every platform.
I followed Jon since he started writing at the CACM with his column "Programming Pearls". Now, in the second edition it is actualized, and I have all those columns with theory and exercises together.
- Reviewed in the United States on April 25, 2004Format: PaperbackVerified PurchaseI bought the 2nd edition of the book.
This book takes you to the Basics of Programming: Problem definition, Algorithm design , choosing the correct data structures, Assertions, Performance considerations during Design and coding, Code Tuning, Squeezing the space.
Though the examples are mainly based on searching and sorting and other primitive programming problems, the fundamental concepts and conclusions at the end of each column, are still valuable and hold true as they are 2 decades ago.
The examples and the exercises are challenging and enjoyable. But, don't expect things related to modern programming like related to High Level Programming languages or Databases, this is purely a Basics book focussing on techniques of solving the problems the simplest and the best way.
Some of the gem quotes or conclusions from the book are:
"Coding skill is just one small part of writing correct programs. The majority of the task is problem definition, algorithm design and data structure selection."
"Defining the problem is about ninety percent of the battle"
Characteristics of a good Aircraft(or a good program) - "Simple, few parts, easy to maintain, very strong"
"A designer knows he has arrived perfection not when there is no longer anything to add, but when there is no longer anything to takeaway."
"Good programmers sit back and wait for an insight rather than rushing forward with their first idea"
"A proper view of data does indeed structure programs. Before writing code good programmers thoroughly understand the input, the output and the intermediate data structures around"
- Reviewed in the United States on June 16, 2008Format: PaperbackVerified PurchaseIf this book doesn't get you excited about programming, I don't know what will. Bentley writes about programming problems that are as glamorous as hollywood. The collective wisdom of the Bell labs super-stars shines through in the background information and problems which the author picked.
I went back and read some of the columns from the ACM magazine which this book originated from. The book is definitely more up-to-date and readable.
I cannot over-emphasize the value of trying out the problems in the book without cheating and looking at the answers or hints. Great way to prepare programming interview questions, whether you're an interviewer or interviewee.
- Reviewed in the United States on June 15, 2025Format: PaperbackVerified Purchasenice book, well printed
- Reviewed in the United States on July 2, 2010Format: PaperbackVerified PurchaseIf you want to learn about the latest web programming frameworks, design patterns, J2EE, .NET, CSS, RoR, etc. then please stay away from this book. Once you think you mastered it all, became a professional programmer with also a nice CS degree under your belt come back and start to read this book for pure pleasure and wisdom. It is with high probability that you'll have both and more than you could have imagined.
Bentley's classic work is still relevant but not in ways most programmers will imagine at the beginning. You'll probably never go and write your own search routines and re-implement classical data structures (you'll use the one that comes with the standard libraries of your language of choice) but you'll always meet some problems which will puzzle you with interesting constraints. This is what Programming Pearls is all about. Study the examples for fun and maybe laugh at them for their simplicity but then remember to applied the strong principles in that book to your daily technical problems (programming related or not).
Top reviews from other countries
Mr. Adrian McmenaminReviewed in the United Kingdom on October 26, 20145.0 out of 5 stars This will change the way you think
Format: PaperbackVerified PurchaseThis book does require a bit of effort: the first time I picked it up I thought: "I'm way beyond this". But that was mistaken - because although you may feel you are been treated to simple stuff, in reality it is profound. Truly, a book that stays with you for your programming life.
HimanshuReviewed in India on February 18, 20255.0 out of 5 stars must read book for any software programmer
i am reading this after almost 12 years, it is a must for any software programmer
Jerome WilliamsReviewed in Canada on August 25, 20165.0 out of 5 stars Will surely make you a better programmer, regardless of experience
Format: PaperbackVerified PurchaseWow, there are so many simple tricks and detailed explanations. Will surely make you a better programmer, regardless of experience.
I. BreschiReviewed in France on November 22, 20145.0 out of 5 stars Excellent !
Format: PaperbackVerified PurchaseI have not finished reading it but I really appreciate the format and the content.
It is something to read and read again to refresh old knowledge and discover new ideas.
Thanks!
-
Alessandro MartinReviewed in Spain on July 19, 20155.0 out of 5 stars Un fantastico libro
Format: PaperbackVerified PurchaseEste libro suele aparecer en listas del tipo "10 mejores libros de programacion" y por muy buenas razones: es realmente una caja de sabiduria y un clasico. Lastima que no se consiga en version digital.

















