I have been blessed to have co-author and published two technical books, Enterprise Java Development on a Budget and Pro Eclipse JST as well as author a children’s book, Bearable Moments. So, I am often asked by others interested in writing a technical book if it is a good idea to pursue. The answer is it depends on what your goals are. If your goal is to make a lot of money, it is not likely you will unless your book is a runaway bestseller and with all the competition in the market it is tough. In addition, compare to writing articles or tutorials for some web magazines the hourly rate break down just does not make writing a book worth it. The other advantages of writing web magazine articles are they take less time to write so you are not stuck with a single topic for 6 months to a year while technology keeps progressing and you feel like you fall behind, your work is searchable via Google and web magazines typically do not charge readers so it is likely to be read by more people.
However, if your goal is a personal challenge or instant credibility than maybe the grueling late nights could be worth it. Authoring a book can open many new doors and provide access to new clients and interesting people.
Ultimately, I am glad I have had the experience and I really enjoyed working with Apress, my publisher. I wish you good luck if you are planning on writing a computer book.