How I write my ebooks
My secret: is I use a piece of software called Jutoh from a Scottish software house. It costs £35 and if you are writing a book or e-book I highly recommend it.
Note I have no connection with them except as a very satisfied customer.
It’s all the little things, inserting pictures, tables, handling source code that make it particularly good for non-fiction books.
It also includes formatting for various programming languages and is cross-platform with versions for Linux, Mac and Windows.
The current version of the Linux e-book has 55144 words, (307407 characters). It takes about 10 seconds to compile that into a .mobi (Amazon) or .epub file with all sorts of warnings.
Originally I started writing the first e-book in a text editor then imported it to MS-Word. But Word is not exactly great software for publishing non-fiction as it’s not desktop publishing. Actually you don’t need desktop publishing per se because Kindle reflows the text, but having pictures, source code and tables makes it more complicated.
I looked about, found Jutoh and consider myself very fortunate; it makes life much easier. I’ve also had excellent support from Jutoh’s creator Dr. Julian Smart who is also well known as a creator of wxWidgets.
Writing an e-book is a multi-pass project that takes me roughly 3-4 months part-time.
- Pass 1. Develop the software and e-book structure i.e. chapters.
- Pass 2. Write the chapters.
- Pass 3. Look for typos. For now this is just me, but eventually I hope to be able to afford a technical editor.
- Pass 4. Tidy up the layout. This is probably the slowest phase. Because of the images, tables and shortish code listings, it might look neat and tidy at one size, but if you change the viewing font size, it looks er not quite so neat! I can’t see any way round that.
A friend drew the original book cover but I’ve decided to pay for the cover for the Linux version.
There are four steps to do this. That’s assuming that you have successfully compiled your C or C++ program and have the source file handy.

In the post about rsyslog three days ago, I explained how to log from Linux programs using the rsyslog daemon.
Just run DebugView and leave it there. It might catch other stuff from Windows, but when you run your program from the command line or double click on it, it will execute quickly and you’ll see any strings captured like this one.
I’ve used diff and merge tools since the year dot. They let you compare two files and see on what lines they differ. You can also copy individual or blocks of lines from one to the other; that’s the merge. My all-time favourite was the commercial Araxis Merge which did a three way comparison and could be controlled by COM. I did this to compare two code bases.

When I wrote the Windows version of the book I used Visual Studio and it was quite excellent. But Visual Studio Code (VSC), the free cross-platform IDE is also very impressive.