Programming Pearls (2nd Edition)

Programming Pearls (2nd Edition)
by Jon Bentley

Programming Pearls (2nd Edition)
List Price: $39.99
Our Price: $24.91
You Save: $15.08 (38%)
Availability: Usually ships in 1-2 business days
Buy Used: from $23.00 (click here)
Category: Book
See more book details and other editions


(Click here)
Buy this book at online book store in your country
Canada | UK | Germany | France

Book Summary Information

Author: Jon Bentley
Edition: Paperback
Audio: English (Unknown); English (Original Language); English (Published)
Published: 1999-10-07
ISBN: 0201657880
Number of pages: 256
Publisher: Addison-Wesley Professional

Book Reviews of Programming Pearls (2nd Edition)

Book Review: The how-to for profile-based tuning
Summary: 5 Stars

Bentley'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.

Summary of Programming Pearls (2nd Edition)

"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
Fourteen years after it was first issued, C++ expert Jon Bentley reinvents a true classic with the second edition of his Programming Pearls. Completely revised and brought up to date with all new code examples in C and C++, this book remains an exceptional tutorial for learning to think like a programmer.

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.

Programming Books

Book Subjects
Most talked about in Programming Books
C Programming Language (2nd Edition) ImageC Programming Language (2nd Edition)
by Brian W. Kernighan, Dennis M. Ritchie
Prentice Hall; Published: 1988-04-01; Paperback; Book
Best price: $34.99
Price in other shops: $67.00
The Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition) ImageThe Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition)
by Art Baker, Jerry Lozano
Prentice Hall; Published: 2000-11-30; Paperback; Book
Best price: $3.84
Price in other shops: $74.99
Verilog HDL (2nd Edition) ImageVerilog HDL (2nd Edition)
by Samir Palnitkar
Prentice Hall; Published: 2003-03-03; Hardcover; Book
Best price: $195.21
Just Java 2 (5th Edition) ImageJust Java 2 (5th Edition)
by Peter Van Der Linden
Pearson Education; Published: 2001-12-21; Paperback; Book
Best price: $24.98
Price in other shops: $49.99
STL Programming from the Ground Up ImageSTL Programming from the Ground Up
by Herbert Schildt
Osborne/McGraw-Hill; Published: 1998-12-01; Paperback; Book
Best price: $17.95
Price in other shops: $43.95
Artificial Intelligence: A Modern Approach (2nd Edition) ImageArtificial Intelligence: A Modern Approach (2nd Edition)
by Stuart Russell, Peter Norvig
Prentice Hall; Published: 2002-12-30; Hardcover; Book
Best price: $64.80
Price in other shops: $132.00
Building Enterprise Information Architectures: Reengineering Information Systems ImageBuilding Enterprise Information Architectures: Reengineering Information Systems
by Melissa Cook, Hewlett-Packard Professional Books
Prentice Hall; Published: 1996-02-01; Paperback; Book
Best price: $8.49
Price in other shops: $39.99
RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press) ImageRHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
by Michael Jang
McGraw-Hill Osborne Media; Published: 2007-06-21; Paperback; Book
Best price: $10.71
Price in other shops: $59.99
Network Security: The Complete Reference ImageNetwork Security: The Complete Reference
by Mark Rhodes-Ousley, Roberta Bragg, Keith Strassberg
McGraw-Hill Osborne Media; Published: 2003-11-17; Paperback; Book
Best price: $29.99
Price in other shops: $62.99
Hacking Linux Exposed, Second Edition ImageHacking Linux Exposed, Second Edition
by Brian Hatch, James Lee
McGraw-Hill Osborne Media; Published: 2002-12-04; Paperback; Book
Best price: $14.04
Price in other shops: $49.99
Similar Books and other products
The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition) ImageThe Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition)
by Frederick P. Brooks
Addison-Wesley Professional; Published: 1995-08-12; Paperback; Book
Best price: $21.47
Price in other shops: $39.99
The Pragmatic Programmer: From Journeyman to Master ImageThe Pragmatic Programmer: From Journeyman to Master
by Andrew Hunt, David Thomas
Addison-Wesley Professional; Published: 1999-10-30; Paperback; Book
Best price: $35.60
Price in other shops: $49.99
The Algorithm Design Manual ImageThe Algorithm Design Manual
by Steven S. Skiena
Springer; Published: 2010-11-05; Paperback; Book
Best price: $67.46
Price in other shops: $89.95
Cracking the Coding Interview: 150 Programming Questions and Solutions ImageCracking the Coding Interview: 150 Programming Questions and Solutions
by Gayle Laakmann McDowell
CreateSpace; Published: 2011-08-22; Paperback; Book
Best price: $34.99
Price in other shops: $39.95
Introduction to Algorithms ImageIntroduction to Algorithms
by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein
The MIT Press; Published: 2009-07-31; Hardcover; Book
Best price: $48.99
Price in other shops: $87.00
The Algorithm Design Manual ImageThe Algorithm Design Manual
by Steven S. Skiena
Springer; Published: 2008-07-26; Hardcover; Book
Best price: $51.99
Price in other shops: $89.95
Algorithms For Interviews ImageAlgorithms For Interviews
by Adnan Aziz, Amit Prakash
CreateSpace; Published: 2010-09-14; Paperback; Book
Best price: $17.00
Price in other shops: $25.00
Hacker's Delight ImageHacker's Delight
by Henry S. Warren
Addison-Wesley Professional; Published: 2002-07-27; Hardcover; Book
Best price: $32.99
Price in other shops: $59.99
Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition (Programmer to Programmer) ImageProgramming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition (Programmer to Programmer)
by John Mongan, Noah Suojanen, Eric Gigučre
Wrox; Published: 2007-04-30; Paperback; Book
Best price: $15.41
Price in other shops: $29.99
Cracking the Coding Interview: 150 Programming Questions and Solutions ImageCracking the Coding Interview: 150 Programming Questions and Solutions
by Gayle Laakmann McDowell
CareerCup; Published: 2011-08-22; Paperback; Book
Best price: $27.91
Price in other shops: $39.95
Book store. Illustrated catalog of books on different categories