HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Hacker's Delight

Henry S. Warren Jr. · 2 HN points · 14 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Hacker's Delight" by Henry S. Warren Jr..
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
This book is for anyone who wants to create efficient code. Hacker's Delight will help you learn to program at a higher level - well beyond what is generally taught in schools and training courses - and will advance you substantially further than is possible through ordinary self-study alone.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I'm a rising junior at Yale, and I know Sean well and we both took systems programming together. We definitely covered bit manipulation and bit tricks, as well as number representation and lots of other stuff.

Sean's an incredibly bright guy but he's more interested in building world-changing apps and web dev. as opposed to low-level systems programming. There are other classes here where you have to code in assembly and do all sorts of bit manipulation (OS's comes to mind). The core CS sequence in our school is also in C, which differs notably from other places that use Python, Java, etc.

For anyone who wants to learn more about bit manipulation, Henry Warren's "Hacker's Delight" is a terrific book (http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...).

smikhanov
Why would anyone think they could write world-changing web apps without knowing bit-fiddling techniques?
If you like this sort of bit-level puzzles, this is a nice book: http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201... -- probably the only book at such a low level I remember buying in many years.
Also recommend the book: Hacker's Delight

http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...

adestefan
Programming Pearls is another excellent book in this realm.

http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/...

kragen
Programming Pearls is excellent, but it has very little in common with Hacker's Delight, except that both are excellent books about programming. HD is specifically about the kinds of low-level tricks we're talking about here, while PP generally is not.
Jun 07, 2011 · dpapathanasiou on Bit Twiddling Hacks
"Hacker's Delight" (http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...) is also a good source for these, as well as other techniques.
May 30, 2011 · 2 points, 0 comments · submitted by roka
May 21, 2011 · scorchin on Bit Twiddling Hacks
Whenever a discussion on rearranging bits and bytes comes up, I can't help but recommend Hacker's Delight by Henry S. Warren http://amzn.com/0201914654
anthonyb
Yep, I just got that from Amazon a few days ago. I'm a Python/Web programmer in my day job, but I'm looking to get more into the low level stuff. I recently got a Nerdkit too - lots of fun :)
If you're interested in reading about more of these, and how they work I'd highly suggest reading the book Hacker's Delight by Henry S. Warren[1]. I know that I've used more than a few of the tricks in my day-to-day work.

[1] http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...

swaits
Indeed, a great book. It's also mentioned in the article.
For more of this sort of thing:

http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...

which should be on every serious programmers bookshelf. Take a look, also, at the wonderful MIT HackMem report. Its Wikipedia entry, http://en.wikipedia.org/wiki/HAKMEM, has pointers to online versions. The venerable PDP-10's influence shows, but there's lots of cool stuff there.

Knuth's Art of Computer Programming,read closely, occasionally divulges clever hacks, particularly in the exercises.

For those interested in these types of problems and solutions, check out "Hacker's delight", it's a pretty amazing read:

http://www.amazon.com/dp/0201914654/

Thanks for this write-up RiderOfGiraffes.

I'm one of the HNers that sent in code for the test. The feedback provided by RiderOfGiraffes was useful and the follow up questions were food for thought.

At the time I'd just failed a coding test for a systems programmer role and felt pretty low, which is why I decided to take this on.

In the interview I failed, I fared well in most of the questions, apart from one set involving heavy binary maths — I pretty much forgot basic binary computation from when I did my undergrad course. Following this, it prompted me to buy "Hacker's Delight" by Henry S. Warren. It's a great read if you're into high-performance algorithms http://amzn.com/0201914654

I can't wait to read the next part!

The article is not available at the moment so I am flying a bit blind here.

H. Warren, Hackers Delight has a nice discussion of this problem. One of my favorite books, but I like to do code generators.

http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...

Another great resource for tidbits like this is _Hacker's Delight_, by Henry S. Warren, Jr. It covers a number of other tricks outside of bit twiddling, as well. Worth checking out for anyone who finds this sort of stuff fascinating.

Link: http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...

For those who enjoy these kind of problems I highly recommend "Hacker's delight".

http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...

pkrumins
Seconded. That is an amazing book.

I also recommend this much more complete article on bit hacks:

http://graphics.stanford.edu/~seander/bithacks.html

Clever stuff. If you're interested in such things, best book I've seen is "Hackers Delight" http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...

Author covers really clever techniques to count bits, count non zero bytes like this etc etc. Bit manipulation at its best.

pchristensen
Holy crap, all 15 reviews of that book are 5 stars! That's the best average I've ever seen on Amazon.
axod
I'd give it 5 also. It's a ridiculously clever fun book.

I agree with some of the reviewers though, the title probably means less people manage to find it than if it was called "Bit manipulation bible" or something.

yters
The author's website has all the source code for download:

http://www.hackersdelight.org/

HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.