I would like to say only a few words about the book of the same title as this post, by Henry S Warren, Jr, as this is nothing new, probably well-known already and rightly so.
It had two editions so far, the first was in 2002. I bought the second, as pictured above (used, in very good condition, hardcover, sent to me at a fairly low price from the UK).
As a) I am not rich and b) books made of paper take valuable space, I tend to mostly search online for needed information (and sometimes save all relevant docs, images etc, in a categorized folder of my PC for future use) and only buy books that are more than a gathering of information. Even if you see this one as a collection of hacks, a cookbook, tricks to make your job easier, this book is definitely good to have. This is because it explains things. You can probably find all the information you need online these days, and probably you will run onto a trick that will do just fine, but trying to figure out how it was done in order to understand it, will lead to another round of searching, filtering through a number of browser tabs and may end in doing some non-permanent copy-pasting of knowledge in your head, and hardly real understanding. In contrary, everything in this book is neat, tidy, categorized and explained. You can understand the item that interests you right away, or with some reading of the previous subjects.
If you didn’t know, you may have guessed already that it is a book about the intricacies of coding and not about gaining access to other people systems. You would be right: it is about the art and passion of coding and for the people who want to write elegant, compact and efficient code. It is a compilation of useful ways to do things with numbers in a computer. Well everything is numbers in a computer. You may ask “why do I need other ways when my compiler’s math library does more than I could use?” and you wouldn’t be completely wrong. For the people programming say, an income balance application for a PC, this book can be an amusing read, something like solving a crossword puzzle. For people (like me) who try to make little devices (usually 8bit chips with 1k of RAM) do many things as fast as possible and with minimum resources use, this book is a “life-saver” sometimes.
I found “Hacker’s Delight” when I was looking for the best way to get an integer square root. I found many things online, some algorithms that were good from some aspect and not so good from another. After I’ve read the relevant chapter in the book, I can say that I understood better what I needed and what solution I should choose. I admit that firstly I found the book as a pdf, read the part I wanted and bought it later. I really liked it and decided that I wanted to have it in print. I think that the best way to get a book like that, is get it from Amazon. I was lucky several times with used books from there. Some were from libraries that gave them away and had markings on some pages (highlighting markers and notes) but most were very good, like this one.
One more thing. When using programming tricks and optimizations like in this book, to make a piece of software, there is always the danger of making the software unmaintainable. The author is not unaware and on the top of the preface of the book you will find:
Caveat Emptor: The cost of software maintenance increases with the square of the programmer’s creativity.First Law of Programmer Creativity, Robert D. Bliss, 1992
All I can say from my limited experience is that I recommend the book. I haven’t read it cover to cover, no. I need more time than I can spare for that, but I am sure that I will come back to it again some time soon.
Keep having fun you people…