
Programming Pearls
by Jon Bentley · first published 1999
315mentions
158recommended by
245HN commenters
2007–2026first – last mentioned
64% recommend35% neutral0% critical
Why HN recommends it
Concise, accessible problems that teach practical algorithm engineering and back-of-envelope thinking, with the anagrams example a favorite; suits interview prep and programmers wanting a healthy approach to the craft.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








…to read programming books, you might want narrative texts rather than "practical" books, since the practical ones require you to also have a computer, and work through the examples and such. Books like Programming Pearls, Beautiful Code, etc. tell stories about code, rather than just show you code (though there are probably moments in either book where the best course of action is to try applying what you've read about).
on “Ask HN: Programming books to read while on vacation?” ↗…the time was a 9660 baud link according to a dated, but fascinating, compendium of networking at the time (lost somewhere in the Krell stacks, I'll dig a reference on request). Jon Bentley's classic Programming Pearls discusses the problem of transferring graphical data images between Mountain View and Santa Cruz, California, in the 1970s. The high-bandwidth, cost-effective, sufficiently reliable solution? Carrier…
on “The bandwidth of a Boeing 747 and its impact on web browsing” ↗…own tastes. Maybe some of these are on the list, but I found it hard to scroll past a certain point as well: - Expert C Programming: Deep C Secrets - The Nature of Computation - The Little Schemer - Programming Pearls
on “Reddit's favorite programming books, from 3.5B comments” ↗My take on some which I think should be atleast read once: 1) The unix programming environment 2) The design of the unix operating system 3) The Pragmatic Programmer 4) Programming Pearls 5) Computer Systems: A Programmers Prespective 6) K & R C 7) The art of Unix Programming. PS: I admit my bias towards systems.
on “Ask HN: Books you should have read when you start a career in SE / CS?” ↗> I find most programming books to be boring and discursive. I was of the same opinion until I read "Programming Pearls" by Jon bentley. The way it opens up a problem statement, thereby making you think is truly fascinating. If you haven't read it, please do.
on “Which programming book you just couldn’t stop reading from start to end?” ↗If you have time, get Programming Pearls by Jon Bentley (http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/...)
on “Ask HN: good, quick algorithms course to prepare for big tech interviews?” ↗A couple more gems: Douglas Crockford's JavaScript: The Good Parts and Jon Bentley's Programming Pearls. By the way, I find it ironic and disappointing when O'Reilly's "nutshell" books run to 700 pages.
on “Why read and write tech books?” ↗…getting). Algorithm Design by Klein and Tardos. How to Think About Algorithms by Jeff Edmonds. Jeff Erickson's lecture notes on algorithms: http://www.cs.uiuc.edu/~jeffe/teaching/algorithms/ Jon Bentley's Programming Pearls is about what I'd call algorithm engineering. The algorithms are never anything fancy but it's a good example of algorithms applied to real-world problems. It's possibly the best single book on programming…
on “Damn Cool Algorithms: Homomorphic Hashing” ↗…about management etc. 1. SCIP (Structure and Interpretation of Computer Programs) 2. Introduction to Algorithms (Cormen, Leiserson, Rivest, Stein) 3. The Art of Computer Programming (Vol 1-3). 4. Programming Pearls
on “Ask HN: What are some good books to read as a developer?” ↗Programming Pearls by Joe Bentley. And its followup. It's old but it does get you thinking about things. I'd also recommend The Linux Programming Interface by Michael Kerrisk as it teaches so much about what makes modern…
on “Ask HN: What language-agnostic programming books should I read?” ↗Programming Pearls. Great short book to get you thinking creatively and how to dissect algorithmic problems, language agnostic with pseudocode examples. Non-programming but still highly relevant for a professional programmer:…
on “Ask HN: What language-agnostic programming books should I read?” ↗…lot of them by searching sites like HN, Reddit, and Stack Overflow for lists of the best computer science and software engineering books. A few examples that tend to show up on these lists: - Bentley, "Programming Pearls" - Kernighan and Pike, "The Practice of Programming" - McConnell, "Code Complete" - Brooks, "The Mythical Man-Month" - Abelson and Sussman, "Structure and Interpretation of Computer Programs" - Gamma…
on “Ask HN: Are older programming books useful?” ↗…more. Mastering Regular Expressions by Jeffrey E. F. Friedl. You get what's on the tin with this one. I've used RE's to great effect throughout my career and I mostly have this book to thank for it. Programming Pearls by Jon Bentley. A humbling book. I read it and think "that's really clever, I would not have thought of that." These are the ones that spring to mind. I'd have to peruse my bookshelf to see if I'm missing…
on “Ask HN: Which books do you consider real gems in your field of work/study?” ↗…to list my top it would start with: Numerical recipes, TAOCP, the dragon book (compilers), genetic programming by koza, the C programming language by K&P, the unix programming environment also by K&P, Programming pearls by Bentley and finally a stack of math books that are not really unique by name but are used often (statistics, linear algebra, etc). However, the aforementioned books are influential to me since I code…
on “Books that Have Influenced Me” ↗…http://en.wikipedia.org/wiki/The_C_Programming_Language The Elements of Programming Style, http://en.wikipedia.org/wiki/The_Elements_of_Programming_Sty... Writing Efficient Programs, http://en.wikipedia.org/wiki/Jon_Bentley Programming Pearls, http://netlib.bell-labs.com/cm/cs/pearls/ The UNIX Programming Environment, http://en.wikipedia.org/wiki/The_UNIX_Programming_Environmen... And, er, Learning Python, http://en.wikipedia.org/wiki/Learning_Python
on “Ask HN: Simple exercises for a python beginner?” ↗