How to write your 1st technical book? Part 1

Things to consider before starting your book

Mehul Gupta
Data Science in your pocket
6 min readFeb 9, 2024

--

And my 1st book is out now !!

LangChain in your Pocket : Beginner’s Guide to Building Generative AI Applications using LLMs

This blog is not about my book though, but about how to get started for writing your 1st (technical) book.

This will be a blog series catering the following sub-parts:

Things to consider before starting your draft- Part 1

Where and how to write (more technical)- Part 2

Where to publish & market- Part 3

What to expect from this blog:

Why I wrote a book?

Why you want to write a book?

Choosing your topic

Self-Publishing vs Publisher

Agenda

Future challenges to consider beforehand

But before focussing on the how, it is the why which is important

1. Why did I write a book?

If you have been following my posts, this is nearly my 150th blog on Data Science & AI. Also, nothing is behind Medium’s paywall so no money involved to date. So, as you must have guessed:

I love technical writing

And the book is just the next step in that direction (one of my bucketlist tasks as well). Also, I wish advanced AI knowledge to be available for a broader section of the society at an affordable cost.

2. Why you want to write a book?

This is a tough question. Trust me, if it is for money, you’re at the wrong place.

Better make some AI course or a YouTube channel.

Technical books won’t be making you a lot of money. Why? I can give you many reasons:

The publishing platforms charges about 30%-70% of the sales. KDP (publishing platform for my book) is charging me 30% for Kindle & 60% for Paperback.

If you have a publisher, even they will be charging 30%-40% of the royality on top of it.

Hence, the author makes about 10%-20% of the cost you see on the books if you have a publisher.

After whatever amount you get, it is taxed by the government.

This is a big reason why technical books are very costly (check out the rates for a few of your favourite books by O’reilly or Packt).

Than why should you write one?

  • It adds authority to your work in the field. It will definitely enhance your reputation. Earlier people use to call me a blogger, now an Author. And its a big prespective change.
  • Giving back to the community is important. I really carry one idea since I started my 1st job i.e.

Not everything should be done for money

  • This will surely be amongst the best experiences you will ever have.
  • A published book can serve as a lasting legacy of your work and ideas. Long after you’re gone, your book may continue to educate and inspire future generations of professionals in your field.
  • You do earn some money. Its not an all zero equation.
  • It helps you network. I have received many pings across the globe already within 2 weeks of release & some colab invites.

3. Choosing your topic

You should be picking up a topic to write considering the below points:

Something you love. How minimal the topic is, if you like it, you will deliver a great book.

Something which has a big audience. Say fictional novels or general programming books.

The current trend. If you write about ChatGPT right now, there are high chances it will be a success.

Topics lacking resources.

If you’re able to tick mark some of them (if not all), you should write it.

Before starting off with “LangChain in your Pocket”, I abandoned a half written book “Reinforcement Learning in your Pocket”. I switched to LangChain because:

Right now, I’m very much involved into Generative AI & loving it.

Generative AI is amongst the hottest topics and available resources on LangChain are shallow.

The audience right now might not be big, but given the current scenario, it will grow exponentially.

The market for Reinforcement Learning books is already saturated. Creating a wave in an already existing market is tougher. GenAI is new and hence an open market for resources. Hence, if my book is good (which is good), it will be given a chance to mark its authority.

4. Self-Publishing vs Publisher

The most crucial aspect, whether you should self-publish vs go for a Publisher. I chose Self-Publishing because of the given reasons

Going with a publisher takes ages to publish (easily 8–9 months). As LangChain is under rapid development, my book would have gone obsolete by that time.

The cost of your book will go exponentially high with a Publisher involved. The book I’m offering for Rs 199/- is about Rs 1k/- from a renowned publisher on the same topic. Hence making it unaffordable to a bigger class of the society. As I wish to make it affordable, I chose Self-Publication.

The Publisher will have a big cut in the final sales.

They might reshape your book in a way you don’t like it. Sort of hijacking !!

But yes, its not all green on the other side. Even Self-Publishing has its own challenges:

You will be handling everything on your own, be it marketing, publishing, reviews, etc.

Publishers have an existing audience. Hence higher sales.

It adds authority to your work when the book is promoted by a prominent Publisher.

Paperback printing is challenging in some countries (including India). I myself haven’t been able to get my author’s copy till date.

Also, this is something you need to choose before starting your book rather than after completing your draft. If you want to go for a Publisher, connect with them beforehand to understand what they expect in terms of book structure & formatting to avoid double efforts.

5. Agenda

You should consider what sort of a book you wish to write (especially technical book):

Beginner’s friendly : Such a book would be covering basic concepts about the topic.

Hands-On : More focussed towards codes and less towards theory.

Mathematical : Deep dive into mathematical intricacies of the topic keeping codes to a minimal.

Intermediate to Advanced: Talks about advanced concepts for the topic.

Illustration: Book full of diagrams and images for explanations

Why is this important?

You can’t write everything

Atleast in your 1st book, don’t try to write everything. It will help you to be on track and gives you the liberty when to stop a topic. Else, you might be writing for ages and things might look scattered in the final draft where you’re covering advanced concepts for some sub-topic, codes for others, maths for another sub-topic but not everything for every sub-topic. Inconsistency across the book will be easily visible.

Your first aim should be completing a draft with the minimal information which looks complete to you. While revising, you can anyday add whatever you want in any chapter ! But trust me, a sense of completion of your 1st draft is a big motivator to keep going.

6. Future challenges to consider

This is an important section and can be an icebreaker when you’re still in a dilemma whether you should write a book or not.

  • It takes ages to write a book : Even when Self-Publishing, it took me around 6 months to complete this draft (221 pages). The time may double up when going with a Publisher.
  • If you’re not used to writing, this will appear boring after sometime. Even I abandoned one of my books.
  • You need to do a lot of formatting for publishing in different versions & on different platforms. If you’re not into aesthetics, this will be irritating (I hated this part).

Trivia: I spent 1.5 months on formatting the book after the text was finalized

  • If its a coding book, the versions may become obsolete over a period of time and the codes may start throwing errors. So, every nitty-gritty details about the versions or codes used can’t be missed at any cost.

Trivia: I rewrote 2 chapters that I wrote in September’23 but got obsoleted in Dec’23 given how rapidly LangChain is changing.

  • You will be held accountable for wrong information. So, you may get socially trolled or receive bad reviews. Noone will think twice before putting your hard-work in a badlight.
  • Marketing your book is draining where you’re posting 1000s of posts and getting no impression. Its demotivating.

This is a lot of information to process and hence, I should end this post here only. In my upcoming posts, we will be discussing:

Where to write your book?

How to format your book?

Where to Publish?

Marketing & Support for the book

--

--