You can make $50k too. Just sign up for his free course.
[1] PHP Beyond the Web, http://www.leanpub.com/php
I think it's fine to plug oneself when it's at the end of an ostensibly useful article but a bit more jarring in a "me too" comment. I think the more socially acceptable thing to do is to put your book in your profile and mention that you're working on it. Those who are interested will find it easily. Opinions on this vary, of course.
The thing people should avoid is only commenting to promote their stuff.
They're blog-verts.
(I haven't purchased any of his products, so I'm not here defending him for any particular reason. I'm just a fan.)