I've written NINE technical books and worked with multiple publishers. I've also done indie publishing.
People like to ask questions about that, so here's a thread on lessons I've learned
Writing books probably won't be especially profitable.
Unless you're selling hundreds or books yourself or tens of thousands through a publisher.
Here is how royalties typically work:
1) You get an advance. Let's say $5000 2) The royalty rate is typically around 10% 3) Royalties must pay off the advance before you get them 4) If the book costs $30 then your royalty per sale is $3 (0.1 * 30)
To pay off an advance of $5000 when the book sells for $30, you would need to sell 1667 copies.
That doesn't sound like a lot, but both of my published books came out 3-4 years ago and they still haven't paid off the advance
Reasons to go with a publisher:
1) Looks good on a resume 2) You might get an editor 3) You might get a publicist 4) You'll definitely have a deadline 5) You get an advance 6) The publisher takes on fulfillment 7) The publisher may promote the book
Reasons to not work with a publisher:
1) They may not provide an editor or publicist 2) A lot of them don't actually promote the book much 3) The deadlines can be crazy 4) You don't have control over your own book 5) You probably won't make much in royalties
Why I like Indie Publishing:
1) I have complete control of the book and what it sells for 2) Royalties for selling books on my own range from 30% - 90% depending on where you sell it 3) I can do book giveaways 4) I can edit the book and publish it on the same day
Tools I use to Write Books:
1) SublimeText (I write in Markdown) 2) @leanpub converts Markdown to epub, mobi and PDF 3) @Grammarly (grammar / spell check) 4) Wingware IDE (Python editor) 5) #Python 6) Git / GitHub 7) Dropbox