
In this article I will share information on how to write your IT-book. I'll tell you about the pitfalls, the interaction with the publishing agency, the tax and banks. The process may vary slightly from publisher (and country), but the main points should not change.
How it all began
One evening, I found a letter in my mail that miraculously was not sent to spam. The letter said that the English publisher was interested in my activity in the Open Source project and offered to write me a book (in English). Without thinking, I agreed.
As it turned out, publishers are trying to print new books as often as possible, there are even entire departments involved in dialing. The position of such spammers sounds loud enough, "Author Relationship Executive". The task of such an employee - to find a willing to work, tell him about the conditions and redirect to the next department.
')
Next, the “Commissioning Editor” works with you. Already with this man and his subordinates is working to conclude a contract and writing a book.
the contract

Any Russian contract is scary to sign: a huge number of small fonts and asterisks, if that - no one is to blame. All this is complemented by an absolutely insane legal language. Fortunately, the agency turned out to be English, and the contract could be translated (with a dictionary) and understand that everything is fine: if the publisher suddenly did not like my work, they paid an advance and left the right to a manuscript for me. I promised that I would work well and not drag out with sending chapters.
Fee
The contract stated that I would receive
16% of the net profit from the sale of each book . This means that the publisher will deduct from the cost of the book the price of consumables, taxes (and abroad they are often huge), the cost of advertising and maintaining servers. Further, from the amount received will take 16%, send a bank payment to Russia ... where I will have to pay taxes.
I began to resent even before I looked at the amount of taxes in Russia. The Commissioning Editor responded to ask me how much other publishers pay. The biggest thing that was found was 12% of the net profit, which somewhat calmed me.
Taxes in Russia
Tax legislation is not fully realized. With each reading, different amounts of tax were obtained (43%, 33%, 13%). Complicated by the fact that in 2013 the tax legislation has changed a lot. Now (it seems like) you need to pay 13%, while you can get a tax deduction of 20% of the book’s sales in the first month (I haven’t checked it myself yet).
More need to know in the tax upon receipt of the first fee.Banks
Foreign banks do not really favor Russian. The transfer often goes through 8+ banks, while it is lost somewhere in the middle. I could not receive any payment yet - bank managers understand the problem.
Getting started
Publishers suggest writing in a recipe book format ("Cookbook"). Each recipe consists of the following parts:
* description of the problem (“Introduction”)
* necessary tools and knowledge to solve this problem ("Getting started")
* problem solving ("How to do it")
* explanation of the solution to the problem (“How it works”)
* additional information (“there's more”)
* links ("See also")
You need to start writing with a complete list of recipes , which will be discussed in the book. The list may change slightly in the course of writing, the names of the recipes may (and will!) Change. Try to write recipes so that the name reflects its essence.
In addition to these requirements, I made another rule for myself:
try to write in such a way that it would be interesting not only for beginners, but also for professionals .
In my case, this resulted in the following:
The parts “Introduction”, “Getting started”, “How it works” are mainly aimed at beginners. They describe problems that novices may not have thought about, or do not know the solution. For professionals, there are sections for more than that. They described what is not covered by official documentation: frequently asked questions on Boost mailing lists and how Boost solutions correlate with new C ++ standards (C ++ 11, C ++ 1y / C ++ 14).
I tried to write the section “How to do it” as simply as possible, while not forgetting to point out solutions applicable in this situation from other recipes of the book. See also included references to other chapters of the book, official documentation, drafts of standards (for including this solution in the next C ++ standard) and the opinions of famous people on this subject.
Time to work
Note that writing a book takes quite a long time.
On average, need a pace of 2 pages per day . For me, this resulted in writing sketches on the way to / from work (one and a half hours * 2) and bringing them into proper view on the weekend (at least one and a half days, and forget about the May holidays).
Graphics
The publishing house takes responsibility for drawing diagrams, pictures and a block diagram. You are the author, so you just need to provide sketches of drawings. Immediately, I note that the publisher at the beginning worked poorly and I had to force them to draw the correct drawings from them. See "Make demands / swing rights".
Technical Reviewers
In addition to spell checking, there are also technical reviewers (“technical reviewer”). These people make sure you wrote everything correctly from a technical point of view. I received practical comments about the support of some parts of the C ++ 11 standard by the GCC compiler and instructions for pieces of code that are potentially incomprehensible to the user.
If the topic of the book is quite complex,
the publisher may not have people with the proper qualifications or they will be few. Three or more technical reviewers are needed per book. Then I saved the Boost community: the first person to whom I asked to check the book - agreed. For this, he receives from the publisher a copy of the book and the opportunity to advertise his site in the book and on the publisher’s site.
Spelling
Proofreaders are part of the standard staff of the publisher, so
all the grammar and spelling will be checked at a later stage . But still it is worth using spelling. At least so that the correctors would not hate you.
Make demands / download rights

When working with a publisher, it is better to immediately say that it does not suit you, which you don’t like However, if suddenly the negotiation process has stalled, there is an opportunity for further pressure. The ideal time will be the moment when the whole book is almost ready and the date of sending to print is approved.
For example, I really didn’t like those pictures that were sent three weeks before being sent to print. They were altered more than once - the publishing house was not interested in the failure of the term.
Marketing
Advertising the book is now in full swing, the publisher writes that there is a new book on C ++ and Boost on all resources under its control. There
is also
a limited opportunity to get free copies . To do this, you must agree to leave a review about the book (and you thought most of the reviews are left for a different reason?).
Free chapters
Several chapters of the book laid out by the publisher in open access . I am allowed to translate these chapters into other languages ​​and freely
translate translations, provided there is a link to the original .
List of chapters for open access- Chapter 11: Working with the System
- Introduction
- Listing files in a directory
- Erasing and creating files and directories
- Passing data quickly from one process to another
- Syncing interprocess communications
- Using pointers in shared memory
- The fastest way to read files
- Coroutines - saving the state and postponing the execution
- Chapter 12: Scratching the Tip of the Iceberg
- Introduction
- Visualizing graphs
- Using a true random number generator
- Using portable math functions
- Writing test cases
- Combining multiple test cases in one test module
- Manipulating images
In this regard, the survey: