Location:  Home» Marketing » General AAS » Hacker's Delight  

Hacker's Delight

Hacker's Delight

enlarge enlarge 
Author: Henry S. Warren
Publisher: Addison-Wesley Professional
Category: Book

List Price: $54.99
Buy New: $38.74
You Save: $16.25 (30%)



New (21) Used (7) from $38.47

Rating: 5.0 out of 5 stars 14 reviews
Sales Rank: 65719

Media: Hardcover
Pages: 306
Number Of Items: 1
Shipping Weight (lbs): 1.3
Dimensions (in): 9.3 x 6.5 x 0.9

ISBN: 0201914654
Dewey Decimal Number: 005.1
UPC: 785342914658
EAN: 9780201914658

Publication Date: July 27, 2002
Availability: Usually ships in 1-2 business days
Shipping: International shipping available
Condition: Brand new book delivered from the UK in 10-14 days.

Similar Items:

  • Programming Pearls (2nd Edition) (ACM Press)
  • Concrete Mathematics: A Foundation for Computer Science (2nd Edition)
  • Beautiful Code: Leading Programmers Explain How They Think (Theory in Practice (O'Reilly))
  • Introduction to Algorithms
  • Programming in C (3rd Edition) (Developer's Library)

Editorial Reviews:

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.


Customer Reviews:   Read 9 more reviews...

5 out of 5 stars Bit-banger's delight. More fun than a barrel of monkeys.   September 12, 2008
jose.r-s (Seattle, WA, USA)
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.



5 out of 5 stars This is a fantastic book!   March 23, 2007
Clive (Max) Maxfield (Alabama, USA)
2 out of 5 found this review helpful

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.



5 out of 5 stars Absolute essential   February 28, 2007
wiredweird (Earth, or somewhere nearby)
4 out of 4 found this review helpful

This book is an absolute essential to the right reader. That right reader is either a low-level coder, a high-level logic designer, or someone who builds tools and libraries for same. In other words, not a lot of people. This is hacking at its bit-level finest, though. If you're among those few, or think you might be, or want a good laugh at the people who are, dig in.

It's good for things like counting the number of 1 bits in a word-length integer (hint: if you count the bits, you're doing it the hard way). It's good for things like fast division by an integer constant, or mod to a constant integer modulus (hint: if you perform division by dividing, you're barking up the wrong tree). If you can look into a 32x32 bit multiplication and see a convolution going on, you're way ahead of the game. The only tricks I know that didn't appear here are A) for purposes that almost no one has or B) for machines that almost no one has.

Warren presents the coolest collection of slimy coding tricks ever collected, with full attention to the number of machine cycles and the compiler-writer's unique needs. I've seen a lot, and this is by far the biggest and coolest collection around. I have two complaints, though, a small one and a really big one. The small one is that the author didn't score a direct bullseye on my somewhat offbeat needs. Well, he never tried to - that's just me griping that he didn't write a different book. The big complaint is that pages, lots of them, just fluttered out of this pricey book and onto the floor. GRRR. This takes nothing away from the content of the book, until some critical page flutters off never to be seen again. Still, if you can keep a rubber band around it, this will be one of the deepest mines of coolness in your uber-geek library.

//wiredweird



5 out of 5 stars Fun, interesting and useful   January 24, 2007
Shlomo Yona (Israel)
4 out of 5 found this review helpful

My first introduction to binary operators wizardry was in a 1st year, 1st semester course in Digital Systems at the Technion, IIT. I thought it was fun. While I was trying to write a computer program to compute Karnaugh Maps for me, I run into performance problems, and then some binary hackery helped me get back on the horse.

Since then, whenever I come across some binary trick I write it down with a few examples of usage and sometimes with some reasoning why it works.

Then came "Hacker's Delight" and I felt compelled to buy it.

I wasn't disappointed at all! Not only it contained all of the tricks that I have collected, but also it contains a lot more in depth examples of how these tricks can come in handy when trying to squeeze performance from an implementation or save a few more bytes and bits.

The book also gave me a fresh perspective on the implementation of some well known algorithms with the twist of binary arithmetic. This was very enlightening.

I read the "BASICS" chapter (chapter 2) with a single breath of air, and just couldn't leave it down. Not only it was nice to have all these tricks summarized in one book, but also I liked some of the reasoning and the "so-called" proofs.

Remaining chapters were, as I mentioned before, a fresh look for me on known algorithms. This fresh look was through the glasses of binary arithmetic.

I'd recommend this book to anyone who feels comfortable with binary arithmetic and/or computer organization -- even just for the fun of it!

I'd recommend the book to developers who don't necessarily have a sympathy to this topic, but would like a Copy&Paste solution to some problems they have to tackle.

I really enjoyed reading this book, and I will probably reference it from time to time.



5 out of 5 stars A rich resource for low-level arithmetic tricks   January 23, 2007
calvinnme (Fredericksburg, Va)
3 out of 3 found this review helpful

The term "hacker" in this book means someone who enjoys making computers do interesting tricks regardless of whether it turns out to be useful, not someone who is intent on circumventing computer security. Plus, how relevant would those kind of tips be coming from a book that was written in 2002? Don't let the author's definition of a hacker fool you, though - the tricks in this book are very useful.

This book is a collection of small programming tricks on various subjects. The presentation is very informal, and the methods use very basic computer math. You should know your binary number system backwards and forwards before you start this book. Either C or assembly language is used to demonstrate the hacks in code form. When assembly language is used, it is that of a fictitious machine that is representative of RISC computers. That is because the tricks are meant to be platform independent.

After disposing of basic arithmetic operations early in the book, the author turns his attention to more complex math problems such as calculating square roots. His discussion of the subject is both complex and simple. First, he explains Newton's method of computing square roots through a page full of equations that require some effort to follow. Then he gives an implementation that requires fewer than twenty lines of C code. This is followed by another method that is longer and more cryptic but executes faster, by using a binary search algorithm. Whether you are interested in the equations or merely need the C code to do your job, these solutions are efficient and elegant.

Other topics addressed include Gray codes, the Hilbert curve, and prime numbers. Gray codes are a method of arranging the integers from 1 to N in a list so that each number can be visited exactly once by flipping only one bit at a time. The Hilbert curve is a similar idea expressed geometrically: a single continuous curve which, given a space divided into a grid of squares, touches every square exactly once and does not cross itself. In each case, both the mathematical discussion and the code to solve the problem are provided.

The chapter on prime numbers is the most challenging mathematically but also one of the most interesting. It starts with a concise overview of various mathematicians' efforts to devise ways of finding prime numbers. The author is one of those people who periodically become fascinated by some problem and devote themselves to learning more about it and searching for a solution. The chapter ends not with the usual code sample, but instead with an invitation to continue the search for interesting solutions to the problem.

Clearly, the author views this book not as a finished collection, but rather as a snapshot of work in progress. After decades of interest-driven research, the author has amassed a collection of studies big enough to fill a book, and it is fortunate for the rest of us that he has written one.


.
Hacker's Delight
Your online bookstore for marketing related reading.