There are two big issues with programming books and eReaders:
- Formatting of code
- Size of screen
From my experience on the Kindle, code blocks get mangled and split apart which makes it difficult to read and understand. Many books have purposely pushed/pulled text around code blocks to format it properly.
The best way to retain the formatting (that I've seen) is to have the eBook in PDF format. This way, the text is "exactly" like the book. This is where size comes in. The smaller Kindle (and I would assume Nook) are too small to render the full page on the screen. It's like taking a full-page text book and shrinking it to the size of a paperback. Unless you have excellent eye sight, the text is just too small.
One way to solve this is to go with the larger Kindle DX. This will get the PDF to be about the same size as the original book. In fact, if you look at certain books in the Amazon Kindle store, you may notice a little warning that the book is "enhanced for DX" (or something like that). That is a good indication there is special formatting that needs the big screen.
Personally, for all other books, I buy Kindle. Programming books are still paper (until the price of the Kindle DX comes down).