That's because the Kindle previewer uses one of the oldest Mobipocket/Kindle viewers to generate the preview.
I've worked a lot on trying to make the content look as good as possible on all possible Kindle versions, the later Kindle versions support HTML5/CSS3 which makes it very easy to make it look like the Print/PDF version.
On the Nexus 7 the formatting is good. Even on the smallest font, you can't get much code on the screen. But most of the code snippets are small and it works.
On the Kindle for PC app it looks great.
On the Cloud Reader (read.amazon.com) it is still awful.And maybe there is nothing you can do about that.
Anyway, thanks for all the hard work. Look forward to reading it.
Thank you! I hope you enjoy the read.
I'm glad to hear it looks good on Nexus 7!
Unfortunately there's not much to do about it, since it lacks support for a lot of things that is needed to make the typesetting for a programming book good.
It's also available on Kindle here: http://www.amazon.com/C-Smorgasbord-ebook/dp/B008Z4TOPK/ref=...