Here are some lessons I learned writing the German-language O'Reilly book about internet memes [1]:

• reStructuredText [2] looks superficially similar to Markdown, but is vastly more useful: It has more features and a defined specification without ambiguities. Many RST processors do not follow the specification in edge cases, but at least it is clear how the document should be layouted. The author of Pandoc [3] fixes bugs very quickly. The Sphinx document processing system [4] can export to HTML, PDF, LaTeX, Epub etc. and can check included URLs automatically (we did not use it for the final version).

• Using Git is a good idea even if you are writing alone: The web interface for our repository and Sparkleshare – a DropBox-like interface for Git [5] – helped immensely with reviews. Gitstats [6] helped me to find out that crunchtime before a deadline always led to at least a few days of writer's block, which enabled me to gauge what amount of text I could write in a sustained manner.

• If possible, save everything relevant to the book in your repository. One example: I investigated the origin of the first lolcats (“Happy Cat” [7], it came from promotional materials of Russian distributors for the “Happy Cat” cat food brand), but have lost some of the emails related to the investigation. Similarly, footnotes in our printed book are now exhibiting link rot. Both of this could have been prevented by importing all source materials in the repository for our book and making sure that all the web pages we mentioned are archived in the Wayback Machine [8].

• The file format of the text matters for interoperability, but which text editor you use does not. Do not learn a new editor for the project if you are already comfortable with one. I used GNU Emacs while my co-author used GNU nano; we never had any problems due to that.

• Me any my co-author worked remotely for the most time. Each evening we had a short chat about what each of us finished during the day, what we were working on, and what plans we had for the next few days. At least for me, telling someone else what I did boosted my motivation; having such a routine process helped me to overcome writer's block.

• There seem to be at least two different writing modes. I think a long time about what I want to write and then write the text, making a few cosmetic changes later. My co-author writes a rough draft and then refines it with each pass. This means that my text is always of the same quality, but he will always meet the deadline. Using Git, we found out he wrote around twice the amount of text as I did, as he re-wrote almost everything at least once. We had no problems with this because we clearly allocated who was responsible for each chapter in the beginning.

• Avoid changing your workflow mid-way or towards the end of the project if you can avoid it, it probably leads to more stress than it is worth. Thanks to publisher shenanigans, we had to send in our texts as multiple ODT files and got it back as one layouted PDF that we had to annotate and send back. One problem was that there seemed to be no software to merge two PDFs with annotations. I quickly hacked up something with Ghostscript only to be told much later that we unintentionally overwhelmed the publisher's pipeline as each one of our around 1000 annotations to the PDF text was apparently faxed to the layouter.

• Get a proper advance. We did not want one and I think it was a failure. You will most likely not make much money with your book – even if it is good and about a popular topic. Three years after the book is published, only around 15 copies are sold each quarter; I suspect it might be one university course using it as classroom material.

• Include a section in your contract about free licensing in case the book is not available. We told O'Reilly we would only accept the contract with a provision that the book would be CC BY-NC-SA and the licensing would switch to CC BY-SA (same as Wikipedia) as soon as O'Reilly stops selling the book. Now that the German section of O'Reilly went under the book is still sold, but by another company that uses the O'Reilly imprint [9].

• Get your hands on as many specimen copies as you can get away with, those are some of your best promotion material in terms of effort vs results. O'Reilly did not do much to promote our book, but they did provide us with copies.

• Do not neglect your loved ones because of work. I regret not having spent more time with the ex-girlfriends I was together with during the time I wrote the book.

[1] The book can be downloaded for free on http://internetmeme.de.

[2] https://en.wikipedia.org/wiki/ReStructuredText

[3] http://pandoc.org/

[4] http://www.sphinx-doc.org/

[5] https://www.sparkleshare.org/

[6] http://gitstats.sourceforge.net/

[7] http://knowyourmeme.com/memes/happy-cat

[8] https://en.wikipedia.org/wiki/Wayback_Machine

[9] https://en.wikipedia.org/wiki/Imprint_(trade_name)