My largest independent project, the weighty volume Pro Android Web Game Apps, was published not only in electronic form, but also in the flesh. In this post I want to share my experience - to tell about how technical books are born - from ideas and negotiations with publishers to the approval of the cover and print.

First steps and a conversation with the publisher
When the thought of a book first came to my mind, I didn’t even want to voice it. 99% of my ideas were already invented by someone; you just need to look in the right way. This time it was wrong - google did not return anything except blogs or sketchy notes - nothing really fundamental. So the idea has a chance. If so, why not try?
')
The process “for new authors” is almost the same for all major publishers: describe your idea to us, explain why you should implement it and don’t call us, we will call you. To begin negotiations, you need to write 2-3 pages in a free style about you and your book. Three of the five publishers to whom I wrote responded that my topic is not included in the development strategy for the next year. Two more publishing houses - Apress and Manning answered that they are interested. Apress responded faster and in just a few hours I started working with them.
At this stage, my main problem was language. I speak quite well, and I can tolerably discuss the release of the project, football or the game of Emma Watson, but the book is quite another. Any inaccuracy will once again remind you that the author writes in a non-native language.
Paul, my good friend from England, helped me. At first, he checked absolutely everything I write - even small letters to the publisher. When we signed the contract, Paul reread the chapters and made sure that the text was pleasant to read even to a teacher of English literature from Cambridge. I didn’t give Paul edits my own writing. From the first day, publishers knew that I didn’t write myself and approved such a “tandem”.
The first serious document that we issued was a formal proposal for the publisher. Unlike the first letter, which is written in the spirit of “I have an idea how it is to you”, the formal proposal is a large and detailed text that looks more like a business plan. Everything is indicated here: the structure, the title and a brief description of each chapter, the number of illustrations, an analysis of other similar books is given (you need to know the competitors by sight). This paper is considered by the Board of Editors, on which the fate of your contract directly depends.
I was lucky - my offer passed and I signed the contract. I will say right away - the terms of the contract are quite tough, take at least the fact that the publisher has the right to transfer the already completed part of the book to another author for “adding”, if you do not cope in time. In practice, however, this does not happen. I dragged out my project much more than it cost, but they didn’t apply draconian sanctions to me.
Everyone is always interested in the issue of the author’s remuneration. You can not expect to buy a yacht with the profits from the book - there is enough money except for a holiday somewhere in Turkey with its other half. The total amount of the fee is about $ 4,000 for a book of this size. The fee is issued against future sales - that is, in order to start making a profit in excess of this amount, the publisher must sell several hundred copies. Subtracting taxes and fees to artists and other expenses from this amount ... I think I still earned the iPad from which I am writing this note.
From draft to book
The most interesting stage begins when the contract is approved, the details are agreed and you sit down to write. Here is a blank sheet, a plan for 500 pages and half a year or a year of donated free time.
The book is divided into chapters. A chapter is an atomic piece of a project that you and your publishers will work with. For example, to evaluate progress, it is estimated how many chapters the technical editor approved, how many chapters the copy editor read, and so on. Pages do not matter; as lines of code - no matter how much you wrote, if the functionality does not work yet.
Each chapter goes through several stages. There are more than a dozen of them: from a draft (initial draft) to a printed and prepared PDF. I'm not sure that the printing is done with PDF, but after this stage the role of the author is to drink champagne and wait for my box of paper books. For each stage is responsible one or more people from your new team. Let's take a closer look at these people.
The first you meet an editor, or simply Editor. Most people in publishing are editors. This title can mean anyone - from an ordinary employee to a middle manager. Most of them are not directly involved in editing.
The editor I’m going to talk about is the project coordinator. He ensures that publishing services work as expected, he also solves issues like “we need to divide the chapter into two chapters” or “we lack those pages in which we planned to invest.” If the question is too serious - he knows who to send it to. He also tells you about how books are written, about the process and tools, introduces you to other team members who will help you write a book. But you taught the introductory instruction and it's time to start working.
You chose the first chapter (it does not necessarily have to be the first in content), wrote the text and code. The code seems to work. The text seems to be read. You will have more than one opportunity to edit the chapter, because some details can be omitted so as not to waste too much time on them. For example, comments like “Add a diagram here” or “refer to the right chapter number once that chapter is written” are quite relevant.
When you have finished the chapter - it's time to get acquainted with the second and most important person in the team - the technical editor.
The main task of the technical editor is to make the book become just a book, and not a stream of thoughts of the author. He monitors the structure, clarity, language, "ergonomics" of the text. The technical editor may advise you to add more examples, rework charts, or otherwise organize screenshots. He can advise much more radical things. In my case, the editor once offered to pay more attention to isometric games. The two chapters that I wrote, following this advice, became a little pearl of the book - these are the chapters that I am most proud of.
A technical editor is a person who decides that a chapter is ready for the next stage. In other words, he directly determines the progress of the book.
The next member of the team is a technical corrector (in English, technical reviewer, but the literal translation sounds somehow quite miserable). He will diligently and meticulously check everything that you write - he will follow each link, count the numbers using the formulas, reprint and run every listing and tell you his opinion. He will not look at either the structure or the quality of the language - only technical accuracy. He is very attentive to details. My proofreader - Charlie, once pointed out to me the error in the example of matrix multiplication, where sines with cosines were involved. Not so easy to notice, you know.
As soon as the editor and the proofreader have done their work, the chapter returns to the author for revision. This does not mean that the text is bad. From the first time it is impossible to write ready-to-print material. You can recycle the chapter right away, but you can leave it to “brew” for 2-3 weeks to look at the text with a fresh look.
When the author and the editors are satisfied with how the chapter looks, the text is sent to the next member of the team - the copy editor. He doesn’t know anything about the subject of the book at all, but he arranges articles remarkably well, finds overly complex sentences and makes the text more readable. In my case, he had almost no work - Paul did an excellent job with this task and the text was pretty clean.
After the copy editor, the author again looks at the edits, and then gives the chapter to the illustrator. Illustrator prepares pictures for printing. My illustrator had to dip his nose into his work - the color accents in the pictures became subtle, and in some places compression artifacts appeared in general. From the second time it turned out much better.
When the text and pictures are ready, the listings are checked - the point of no return comes. The next editor creates a PDF, which is completely undesirable to edit.
In parallel, will be preparing the cover. Usually the author does not take part in this, but in my case it was not so. I abandoned the standard “ball-on-black-background” picture and asked talented artist Sergey Lesyuk to develop an illustration for my book. You can evaluate the result yourself, personally I really liked it.
And here's the last frontier - you can look at the finished PDF with all the chapters together and once again think about what you would like to add or change. This time, just think, because the edits can no longer be made. For a couple of weeks the book will be published. Of course, if you are unlucky just as Katrina and I will not destroy Manhattan along with a part of the publishing house.
In the eyes of the author
Now you know how the process of creating a book with the eyes of a publisher looks like. In practice, everything is somewhat more complicated. When I started to write, I followed a simple logic - I was good at writing a blog, and the technical book is not much different from it. This is fundamentally wrong - it's all the same that to think "since I know how to tie shoelaces, then I can set the sail".
The structure of chapters, sections, and the whole book requires a much more attentive attitude than a note for a blog. A chapter without a structure, without a goal or plan is read as an author’s thoughts and advice. Something like a culinary show where the presenter tells interesting facts while the dish magically acquires the final shape.
These were my first chapters, until my good friend pointed out the problem to me. He said: “I noticed that in good books the meaning of each chapter can be found in the first section, the meaning of each section in its first paragraph, and the meaning of the paragraph in the first sentence.” This remark completely changed my view on how to write.
I realized that you need to concentrate not only on the material itself, but also on how exactly the material is supplied. The chapters were like a mosaic of paragraphs, paragraphs, listings, and illustrations that needed to be laid out in order to make a complete picture. I was looking for a balance between theory and practice, obvious and complex, text and diagrams. I wanted to write a book that was easy, but at the same time fundamental, so that the reader would have a desire to skip a couple of pages, so that sometimes it would be necessary to think, but not like a boring textbook, but rather think a little. It turned out or not - to judge the readers.
Perfectionism is another story. This is the scourge of programmers, it doesn't matter what you write, the code or the technical text. In the case of code, we can always reassure ourselves that “we will refactor at the weekend”. With a book, everything is much more complicated. As soon as the text gets on the paper, there is no going back. If you wrote nonsense - it will remain in the book forever, if the code remains far from ideal, then so be it. It will not work out to laugh it off in the comments, thank the readers and correct the text of the note.
Perfectionism makes it necessary to repeatedly re-read your text, rewrite paragraphs, redraw illustrations. There is no end to this process, and the only way to release a book is to determine for itself the “good enough” edge and not step over it in pursuit of the “ideal”.
Instruments
Work begins with setting up the workplace. In Apress, your main tool will be Microsoft Word with a special “book” template. I do not venture to judge whether it is a good choice or a bad one, because I did not use any other editors. Word has its own problems: the styles often flew, the listings were formatted incorrectly, the editor hung tight several times and I lost a couple of pages of text. At the very end, it suddenly turned out that the book was 60 pages longer than we had planned (due to problems in the styles).
But Word has a lot of advantages for publishing. Major - WYSIWYG'ovost and tools for edits. This is an unforgettable feeling when you first sit at the keyboard, the new page looks like the page of this book, and the letters appear to appear on a delightfully fresh, still smelling typography sheet.
When five people work at the same time on a document, it seems impossible to work without a “review regime”. On the fields next to paragraphs grow small multi-colored dialogues that would be impossible to collect from a variety of emails.

The second important tool is a chart editor. I was not too original and worked with Visio. He always seemed cumbersome to me, but I could not find a better alternative. At first I avoided diagrams and focused on the text (to leave pictures for a snack and do everything at once), but this approach did not justify itself, where it’s better to create diagrams at once, although I have to be distracted.
The rest of the utilities are chosen solely from their own preferences: git or svn for sources, a handy “screenshot”, software for the mind map. The main thing is that the author feels comfortable and knows how to effectively use his tools.
Tips
In the final part of the note, I will share some tips for those who are seriously thinking about writing their book.Understand your motive. If you want money, you should know - even “dopilivanie saytik on wordpress” will bring more profits with much less effort. Knowledge that brings more profit from their sale than from use is useless. If your motive is fame and recognition - see how many books have been published over the past year.
Rate the "market" - other books of similar subjects. Determine how your book differs from competitors.
Try to write one chapter (but not the first and not the last) pages at 30-40, to estimate how long the entire book will take. Feel free to multiply the hours spent by 3. For example, my record is 15 pages a day from morning until late at night. About an hour to the page "draft".
Find a native speaker who can read the text. He should not understand the subject area, but should write competently.
Think of a coauthor. I regretted many times that I began to write my book myself.
Watch out for structure. Make a plan for the whole book, then make a plan for each chapter and describe it in the first section. Identify the objectives and guide them to the reader. Make sure that the material in the section does not deviate too far from the main topic, and highlight the “interesting information” with a special style. Let the reader feel that at the end of the chapter "the goal has been achieved."
Deliver complex ideas simply. Someone from the great wrote: "the highest degree of respect for the readers is to consider them idiots." It may sound rude, but behind these words is the right thought. Writing complex text is easy - look at the textbooks in our schools. Express a complex idea so that it is understood, remembered and accepted - that’s what true art is. Use metaphors, pictures, schemes, code - we are not limited to words. I have to say that the recipe for “just add water” will not work.
Define for yourself the “good enough” border and do not overstep it if there are more important tasks. Otherwise, you risk rewriting chapters until the technology becomes obsolete. The border does not have to be formal. Enough of your inner feeling.
Choose intelligent critics and as soon as possible let's read them your work. An intelligent critic has only one motive - to make the book better. He should not feel sorry for the author “out of friendship” and should not try to assert himself at your expense, rejoicing at your mistakes.
Listen to the advice, but do not forget that advising is much easier than writing. If after all the arguments you still have the feeling that you need to do otherwise - feel free to trust yourself.
Work to make the book harmonious and balanced. This applies to absolutely all aspects: the complexity of the material, the amount of code and pictures in the section, the size of the chapters. Do not be afraid to delete parts of the text if it seems to you that they do not belong here. Add intermediate paragraphs where the transition between topics seems too sharp, change the illustrations, split up large chapters and “glue” too small. Try to grab the reader and not let him go to the last page, entrap him and provoke experiments, then your efforts will be rewarded.
Conclusion
So how is it to write a book? Complicated? Of course. But no more difficult than writing the code of a large program or building a house. The complexity of any of these projects depends on how you treat them. You build “for yourself” or “to stand”, write the code of your beloved pet project or try to hand it over to the customer in order to quickly forget this horror. Books can also be written "in haste" - publishers are not too demanding on the quality of materials.
But in order to write something worthy that it will be pleasant to pick up yourself, you need to put much more effort.