Stephan Schmidt
How I Wrote My CTO Book With My Own Tool
How `Amazing CTO` was created
I just finished writing my book “Amazing CTO” (a #1 bestseller on LeanPub), which a big German tech outlet called “pleasantly bullshit-free” in a glowing review that ends with “Browsing through, it is not only interesting for Chief Technology Officers (and those who want to become one).”
Consider me happy :-)
The road to that success was stony though. The book started some years ago, as the result of my CTO coaching practice. Reflecting on how I became the CTO I was, and the problems my clients have, I had some epiphany moments. One was, that it is not the knowledge about processes and coding that makes you successful as a CTO. That is a necessity and brings you the job. It is all the smaller things that make you successful. So the book started.
Because the book was written on the side, I had some motivational issues from time to time, and without the help of my ❤️ wife, the book would not have been finished. Speaking of my wife, she is writing books and knows all the troubles. She uses Scrivener to write her books. It was natural to use Scrivener too. And while Scrivener has a lot of benefits for writing novels, the only thing I needed for a tech book was the organization of sections into blocks of text that can be moved around. Many other things of Scrivener rubbed me during my work, so I wanted to find a replacement.
And I found it with Goland, the Jetbrains IDE. It does support Markdown, so I exported everything from Scrivener into Markdown files to work on in Goland. I use the IDE for my Go coding, so I know it, and using it to finish the book was great.
For publishing, I decided to use Leanpub a long time ago. In my Scrivener times, I exported Markdown to a file and got that into Leanpub via GitHub. The PDF and ePub results of Leanpub are fine (I had some challenges though), and less hazzle than you do this on your own. I created the (print) layout of my last book (with poems!) with Affinity Publisher, and copied and pasted it to Apple Pages for ePub support; Leanpub is much easier in comparison. What I wished though is that LeanPub would be faster. It sometimes took minutes to compile my book, which has large PNGs in it and is around 240 pages.
Migrating away from Scrivener, Git was no problem for Goland, but how to compile the text from my Markdown fragments into a text that Leanpub would be able to use?
I wrote a small Go tool for this, called eris. It takes Markdown files in directories and subdirectories, sorted by filename (e.g. 040 Introduction, 050 Management) and compiles one big Markdown file, for consumption with Leanpub. Each Markdown fragment has a small frontmatter section with the title and some flags, e.g. if the current section should start with a pagebreak
(like the frontmatter in Hugo, that I use for my websites)
----
title: Starts with a yes
page-break: yes
rule: 1
id: sayyes
sample: yes
----
The result: No need for Scrivener, I can use my IDE to write the book, I can move around parts in the book to re-arrange them and the title of a section is different from the filename. For me my tool works well enough to keep using it to write my next books.
“AI AI AI” I hear you cry! I experimented with writing a Go tool to check and fix my Markdown texts with ChatGPT over their API. The results were disheartening though. The texts I got back didn’t have my voice in them and felt like being written by someone else—even with a lot of prompt engineering and telling ChatGPT explicitly to keep my voice. I guess you need an LLM trained on your texts for good results, so I dropped using ChatGPT for the book.
Selling is the next challenge. I have a 2700+ subscriber CTO newsletter which was a great starting point to sell the book with a coupon (as a thankyou). Leanpub also did help—but less than I had hoped for. Each review can be seen in the sale numbers, the glowing German review had a great impact (PS: If you want to review the book and write about it, drop me an email)
Next step on the sales challenge is to get it on Amazon. I will get much less money for each sold book, but the audience should be bigger than Leanpub, we’ll see. From the experience of my wife, who sells on Amazon, there are many more traps and challenges selling there (and I hope the print-on-demand quality is much better than when I checked the last time some years ago, where it felt pulpy).
As a coder, I currently wonder how to support sales with a Go tool :-) I keep you posted.