Product Description
Veteran programmer Hank Warren shares the tricks he has collected from his considerable experience in the worlds of application and system programming. For anyone who wants to create efficient code. Self-directed study. … More >>
|
|
|
Hacker’s Delight
Comments are closed.

#1 by Clive (Max) Maxfield on February 12, 2010 - 12:22 am
I have a virtual calculator called the DIY Calculator that accompanies my own book “How Computers Do Math” The Definitive Guide to How Computers Do Math : Featuring the Virtual DIY Calculator.
I recently added a “Conundrums, Puzzles, and Posers” section to the “Programs and Subroutines” page on my DIY Calculator website ([...]) and I’ve started to build a collection of simple puzzles for people to play with.
One of the first problems I posed was to count the number of ones in the 8-bit accumulator and to present the result as a binary value. I thought I had discovered the best-possible solution, until someone pointed me in the direction of the “Hacker’s Delight”. (In this context, “Hacker” refers to a hero who is manipulating code; not a nefarious rapscallion who breaks into other people’s computer systems.)
I immediately ordered a copy from Amazon, and took delivery just yesterday as I pen these words. This book is fantastic – I kid you not – on the first page of Chapter 2, for example, I discovered at least five or six capriciously clever tricks that blew my solutions out of the water!
I highly recommend this book.
Rating: 5 / 5
#2 by Dmitry Vostokov on February 12, 2010 - 1:54 am
I’ve just read only section 2-1 (Manipulating Rightmst Bits) and I got much better understanding of binary arithmetic than I had before. As a collection of different computer arithmetic techniques the book is brilliant, but I think the book would have been even better if the auther had included derivations for formulas.
Rating: 5 / 5
#3 by Daniel on February 12, 2010 - 4:51 am
They don’t make them like this anymore. Amid the “Learning XXX in 21 days” and various other computer book for which depth is almost non existent (and are read like eating peanuts), this is a refreshing book that talks about solutions to sometimes common (IMHO) coding problems.
If you enjoy programming gems, or remember that beyond your C code there is a machine that executes your program, this is the book for you. For example, think how would you count the 1 bits in a 32 bit integer – the book has an elegant solution in log(n). Aside from this, the book has about 50 or so problems, with their solutions (and proof).
Bottom line: fine book, worthy to be near my Knoth, R&K and Stroustrup books.
Rating: 5 / 5
#4 by Brian Gordon on February 12, 2010 - 5:13 am
Hacker’s Delight really is delightfully comprehensive, not to mention fantastically dense. It’s really more of a reference but you can certainly read it from cover to cover… but be prepared to be stalled for hours or days on certain pages if you really want to understand why things work.
Be warned: this book is not an introduction to the subject of bit manipulation. It doesn’t explain basic concepts and only falls into prose later in the book; much of it is page after page of mindblowing formulas for every concievable task. Beginners can get through it, but only with serious effort. Although the framework you need to understand bit manipulation is very simple, certain devices come up frequently in code examples, but take awhile to grasp for the uninitiated.
Above all this is a very entertaining -see how many pages you can read without grinning at the magic- and thorough compilation of fascinating little tricks and algorithms. It probably won’t be very useful to a Java programmer or “software engineer”, but in any case it’s good to expand your thinking. If you appreciated HAKMEM, you must get Hacker’s Delight!
Rating: 5 / 5
#5 by jose.r-s on February 12, 2010 - 6:31 am
If you find delight in the optimization of code–and you SHOULD–this is the book for you.
The book contains a great collection of techniques and tricks for highly efficient numerical programming.
Great read.
Rating: 5 / 5