I've been approached by 2 different publishers to author a programming book, based on the strength of a few technical articles I've written. They are both established publishers - think O'Reilly, Packt, Manning, Wrox, etc - and it's darn flattering to be asked. I think it'd be a fun experience, and a feather in my cap. Though I'm under no misconception about the monstrous amount of work it entails.
To those who have been down this road: Before I get into bed with a publisher, what else should I be thinking about? What questions should I be asking? What is a fair, market-rate deal for a first-time technical author writing about a popular subject? What are the areas to negotiate? Thanks HN!
You're going to be shocked and dismayed by the offer they give you. Let's get that out of the way now. This is the model: they'll tell you to not do it for the money, in exactly those words, prior to explaining to you terms which imply that they're not doing it for ~92.5% of the money.
You will likely be offered something akin to a $5k advance and a 8% royalty rate on paperback sales with, perhaps, a modestly higher royalty rate on e-book sales. The advance is guaranteed contingent on milestones. The royalties first "earn out" the advance and then start getting actually paid to you. (i.e. You have to sell $5k/0.08 = $62,500 of books on those terms prior to receiving any additional money.)
Most tech authors do not earn out advances. You should expect to receive just the advance and then occasional minor payments ($1k to $2k) for foreign rights if the book turns out to be so popular that e.g. it gets translated into e.g. Japanese.
If you want to make money in writing books, it is very possible. You'll want to start collecting email addresses, start publishing more things which get more people interested in trading you their email address, publish the book yourself, and sell via your own site/email list. For bonus points, sell packages (book, book + videos, book + videos + code samples) and price much, much higher than you're comfortable with ($49/$99/$249 is popular and works well).
There exist numerous people on HN who have successful businesses doing the second model. Understand that the second model is far more akin to running a business than it is to writing books. This is true of writing books generally, but it is more obviously true when you don't have a publisher to blame for your marketing/sales outcomes.