I'm the author of a book published by O'Reilly: http://www.hello-startup.net/

Before I decided to write the book, I talked to a number of friends who were authors and they all basically gave me the same advice:

* It's a massive amount of work, especially if it's your first book. If you're working a full-time job at the same time, depending on the length of the book you have in mind, expect it to take on the order of 2 years.

* It's a different type of work than programming or even blogging. In programming, you get feedback on a near constant basis at all levels: your IDE (sub-second), your compiler (seconds), your test suite (minutes), your co-workers (hours), and customers (days or weeks). This helps keep motivation high and gives you the info you need to improve your work. With a book, unless you make a massive effort to seek it out, you get more or less no feedback whatsoever for months or even years. For a project that takes such a long time, this can really sap your motivation. You have to come back and write a bit every single day, day after day, and yet on any individual day, it feels like you've hardly made any progress at all. You have to be very good at driving yourself and you need to put in an effort to give talks, to send out chapters to friends and family for feedback, to join a writing group, and anything else you can to get the feeling of tangible, incremental progress.

* You won't make much money from it. If your book hits the New York Times best seller list, sure, you can make money. But most tech books don't sell anywhere near that much, and even if you have "decent" sales, when you factor in the massive amount of work (see point #1), it's a comically small return, especially compared to a programmer salary.

* Despite that, every single author I talked to was writing their 2nd, 3rd, or even fourth book, and they all recommended doing it, subject to the caveats above.

As a result, I took the plunge, and I am very happy that I did. The real reasons to write a tech book are:

* It's an unbelievable learning experience. I used to think that experts became authors, but the reality is that authors become experts. I did a ton of research for my book, met a lot of interesting people along the way, read a huge number of books I had been meaning to for years (http://www.hello-startup.net/resources/recommended-reading/), improved my writing skills, got better at marketing, and so on.

* It's a great way to develop ideas. I started a company not long after writing my book (http://www.gruntwork.io/) and many of the ideas for that company came directly from what I learned during the writing process. As a bonus, the book is also a nice sales and marketing tool.

* It opens doors. People treat you just a little differently when they find out you are a "published author." They are more willing to listen. You get more opportunities for jobs, talks, meeting people, and so on.

* It feels good. I love teaching and sharing knowledge. I love seeing something that I created have a positive impact, even a tiny one, on someone's life. I love creating things. It feels wonderful to see positive reviews; to get emails from readers telling you how much the book meant to them; to hold your book in your your hands for the first time; to give your parents a copy; to find it on shelves at bookstores and famous libraries (my book is at Harvard, Oxford, etc!); and so on.