Programming Pearls

Programming Pearls - Jon Bentley

Excellent.

Few books have made me ex­claim with de­light upon re­ceiv­ing them from Amazon. Let me briefly com­pare Programming Pearls to some fa­vorite al­go­rithm books:

  • CLRS: theoretically, this truly is an introduction” text­book about al­go­rithms. It serves as an ex­ten­sive ref­er­ence full of de­tails. However, the writ­ing style and pseudo-code don’t par­tic­u­larly im­press me.

  • Algorithms, Sedgewick: one of the best text­books ever. The code is runnable, and the analy­sis is both in­ter­est­ing and rig­or­ous (unlike CLRSs Big-O ap­proach, Sedgewick’s method yields nearly ex­act analy­sis). The proofs of cor­rect­ness and com­plex­ity are ac­ces­si­ble, and the il­lus­tra­tions are fas­ci­nat­ing. One draw­back: the pa­per is so thin it tears eas­ily while note-tak­ing.

  • TAoCP: completely clas­si­cal style and heav­ily math­e­mat­i­cal analy­sis.

  • Elements of Programming Interviews: A cook­book for prac­tic­ing al­go­rithms. It leaves no par­tic­u­lar im­pres­sion on me.

Programming Pearls stands in stark con­trast to the afore­men­tioned books. It of­fers an en­gi­neer’s per­spec­tive on ap­ply­ing al­go­rithms at work and solv­ing real prob­lems. More pre­cisely, this book chron­i­cles Jon Bentley’s ad­ven­tures—a renowned com­puter sci­en­tist known for the kd-tree and his Programming Pearls columns that gained fame dur­ing the 80s. (Don Knuth even sent lit­er­ate pro­gram­ming code to Bent­ley to in­tro­duce the con­cept.)

Though the book is slim com­pared to other programming” or algorithms” books, it con­tains many pearls” within. The writ­ing style is re­laxed yet en­gag­ing, in­ter­spersed with rig­or­ous ap­proaches, ex­ten­sive ref­er­ences, and in­trigu­ing puz­zles worth at­tempt­ing. What makes this book spe­cial is how the au­thor ap­plies sci­en­tific meth­ods to in­dus­trial prob­lems, of­fer­ing an en­gi­neer’s unique view­point on al­go­rithms.

Perhaps Steve McConnell al­ready gave the best de­scrip­tion about this book:

… Programming Pearls was one of the most in­flu­en­tial books I read early in my ca­reer, and many of the in­sights I first en­coun­tered in that book stayed with me long af­ter I read it. …