Bit fiddling: Exercise that grey matter

It’s been nearly two months since my last post. I was seriously low on motivation. I thought I’d try changing the format a little back: add a little more personal narrative and write about things I’m currently reading instead of something I read a while back and must research again.

Let’s start with some bit hacks. I’m currently reading this book Hacker’s Delight. Make no mistake, you are probably never going to use this stuff in your professional code. The first law of programmer creativity is that “The cost of software maintenance increases with the square of the programmer’s creativity.”. But it’s a good exercise for your brain cells and it’s nice to know that you can understand your code down to the bit-level. So let’s do some exercises.

Continue reading