Writing the Book

Recently I posted about getting my book deal. Now I want to share about the process of writing the book. I hope this post will help you get excited to write your own book and I hope it will help you avoid some of the mistakes I made along the way.

First – writing a book is a lot of work. Mine took just about every weekend, holiday, and vacation day for twelve and half months, Nov 2016 through Jan 2018. That was about 80 working days to produce the first draft, and another 36 days to edit that draft into final form. Some of those days were productive, some were miserable, but that’s what it took.

And I don’t think I could do it much faster if I had to do it again.

Cast of Characters

Writing is a solitary activity, and I wrote most of my book alone in a quiet room or in a coffee shop (with headphones on). But the day I got the book deal I also got a support team. The direct members of this team were:

  • The acquisitions editor – who’d made the deal with me (see my blog post on that). At this point I think her job was to make sure that the product I delivered was close enough to what was in the contract so that her management wouldn’t be grumpy with her (and/or fire me). She also dealt with a couple small contract changes we needed to make. Not much direct involvement in the content of the book.
  • The coordinating editor – who was great. Her job was to make sure I understood what I needed to do and that I was doing it in a timely fashion. She helped me with the chapter submission process, the formatting, the dates and deadlines. She also helped get critical questions answered when other participants were busy (or had my emails eaten by their spam filters).
  • The developmental editor – who was supposed to help if my writing skill, my ability to organize the content, or my general communication style weren’t cutting it.
  • The copy editor – who corrected all the grammar, spelling, and technical style issues (like the proper use of colons before bulleted lists, which I still think is done by flipping coins, although several smart people have told me otherwise).
  • The technical editor – who I got to select. He was someone I worked with for many years, another expert in the field. His job was to make sure I didn’t get anything (too) wrong.
  • The production people – who typeset the thing, produced the cover image, did legal stuff and whatever else. I’m not sure what else, but I know there was more work done by people I didn’t have direct contact with.

Having all these people watch me write was odd. It was a weird sort of pressure, lots of folks looking over the shoulder. I wasn’t expecting it and having all of them and a deadline did make the process of writing a little less fun.

Although without them I wouldn’t have been able to publish a book…

So I’m grateful for all that they did.


I had four major milestones to hit. Unfortunately I didn’t know what or when they all were ahead of time, exactly. My sense is that most authors don’t hit the milestones the publisher would like, so publishers don’t always bother to set all the milestones all out at the start. Rather, they set one or two, see where the author ends up, then set the next ones based on that and other business needs.

I actually hit every milestone (although one of them was particularly miserable), but in retrospect, I don’t think I had to. I think I could have asked for more time and the publisher would have gladly given it.
Whatever. It got done. The milestones were:

8/1/2017 – first three chapters

Early July I had the contract in hand. The publisher wanted three chapters in a month. I interpreted this as another audition. If they chapters weren’t good, they might cancel the deal, so I spent the time to do a good job.

When I submitted the first three, the acquisition editor and the developmental editor read them. Between the two of them, they left about four minor comments in the doc. The acquisitions editor said the chapters were great.

That’s the last I heard of the developmental editor.

Seriously. She was peace out!

My interpretation is that they decided my product met their quality bar and they put the developmental editor on other projects. They probably saved some money. Fine. I’m not sure if it was a mistake on my part to polish these chapters so much. If I hadn’t the developmental editor might have stuck around, and I’m sure I would have ended up with a better book if I’d had her involvement.

Oh well!

12/31/17 – manuscript completion

This milestone was for the first draft of the entire book. Leading up to this deadline I submitted chapters as I thought they were at first draft quality. I talked to the coordinating editor a bunch, particularly every time I wanted to add or cut a chapter (or anything that would change the official table of contents). She made sure I was roughly on track, suggesting ‘soft milestones’ for how much content I should have at various points.

I think the biggest problem I encountered during this milestone was the length of the book. My word count came out just about where I said it would, but the number of pages was less than the publisher expected. This happened because I had very few figures or code listings. For a short while I thought I was going to have to figure out how to make 50 pages of padding. I even came up with about 30 illustrations (which the publisher didn’t like at all and vetoed).

Thankfully, they decided to take the book as I wrote it (good on word count, but short on page count).

1/8/2018 – author revisions

And here was my big mistake. I knew I was going to have a draft by 12/31. I knew I would have to do another pass on the book, because my first drafts are a bit sketchy. But I didn’t bother to ask how long I had to do this second pass.

Answer? One week.



I don’t know why they thought this could work. Maybe they just said any random date and expected me to negotiate. Maybe most authors interpret ‘first draft’ differently than I do and submit more-polished first drafts. Or maybe the publisher had an opportunity to hit some release window if I could make that date, so they took a shot.

I don’t know.

I found out this was the deadline around thanksgiving time. From that point I had about five weeks to finish draft one, do draft two, and incorporate all the comments from my technical editor. I decided to just…do…it…

So I took some extra vacation days. I worked on my Hawaii trip (which is fine, because I would have worked on something else if I didn’t have the book to work on). In the end, I submitted the first draft early on 12/4/2017. And I submitted the final draft on 1/4/2018.

But I probably should have done something differently, because I was pretty burned out by the end.

2/20/2018 – review copy edits

For the month of Jan I did nothing (on the book). Then on Feb 10th they sent me to a website where I could review the copy edited version of the book. The webpage was some weird web based workflow, no track changes, no word processor I was used to…hrm.

At this point I was supposed to check the layout and styling elements. I was also supposed to make sure they hadn’t made changes that changed the meaning of anything.

I tried to compare to the version I submitted, to find what and how much they changed, but it was pretty much impossible. All I could really do was read it.

In the end I think I had a couple small comments, but I pretty much just went with what they had, which worked out fine.

My process for writing the book

When I’m writing I try to write every weekend day, every vacation day, and every holiday. I set a word target and I work until I produce that many new words or until about six hours is past, whichever comes first. I’ve tried writing on work days before or after work, but I’ve never had success with that. It makes me too tired.

For fiction my word target is 2,000 words. But this book was much harder for me, so I lowered my target to 1,000 words per day.

I also track my writing, recording the date and the word count after every writing session. As I said, I recorded 80 days drafting and 36 days editing. There were a few more writing days before I started recording, while I was conceptualizing, but I didn’t track those.

The following figure shows the word count progress for this book. I made slow progress the first few months, because I didn’t have the book  deal yet, so I wasn’t hyper focused on the writing. Then about May I started working regularly. The bursts of output in September and November were made possible by taking vacation days from work. And December 2017 was all editing, so the word count didn’t move as much.

Graph of words over time during writing process.

I think this book was harder to write than fiction because I struggled to get an outline that flowed and explained concepts in order and in the right detail.

Most chapters I started writing by describing three related concepts simultaneously (because they were related in my brain). So my rough drafts were usually a mess. Then I had to step back and realize what I was actually trying to say. Then I had to rewrite three sections for the three concepts. Sometimes the concepts didn’t all fit in the same chapter, so it kind of messed up other things.

The writing wasn’t the hard part. The thinking it through and organizing it was.

This following chart shows a breakdown of the word count I was able to get across the 80 days of writing. Fourteen days that were basically failures – less than 233 words! A few days that were great – over 2,000 words.

Histogram of word count per day.

My average editing day added just 228 words to the manuscript. Eight of the editing days had negative word counts. One editing day I deleted over three thousand words.



Writing takes me a lot of time. I think I’m a bit slower than other writers, but not crazy slow. Finishing a book is a real grind.

But I love it. I love engaging my whole brain in the writing process, working really hard, and producing something that I’m proud of.

And it’s very nice to think that my effort might help others. I hope this book does help people be more productive at machine learning and produce amazing things.

I hope this post inspires you to write your book and to finish it easier than I did.

You can check out the final book here. You can also get an audio book version which is free if you sign up for a trial account with audible.

Getting the Book Deal

I got a book deal with a major publisher and I’m going to share everything about the process, the mistakes I made, and the things I learned. My book is a non-fiction work, about machine learning. So this might not all apply if you’re working on something different.
To get a non-fiction book deal, you start with a proposal (not a finished bBuilding Intelligent Systems Bookook, which is common in fiction). And the proposal needs to convince a publisher they might not lose too much money by publishing your book. That’s a bit sarcastic, but in retrospect it’s a good way to think about it. Your proposal is asking a smart business person to bet 10, or 20, or 50 thousand dollars that you’re going to produce content valuable enough so they can recoup their investment and make some money.
So, you have a great idea, something unique to share, a real talent, and a desire to write a book. You’ve probably succeeded at a lot of things in your life, and this writing-a-book thing can’t be much different, can it?
But now you need to write a 5 or 10 page document that a smart person will read and say – I can see this being worth $50,000. In fact, I can see a chance to make some real profit here…so I can pay for all the other books I published that didn’t pay off…
And this is actually pretty hard.
At least it was for me.
Your proposal needs to convince this acquisition editor that:
  1. There is a big enough audience willing to pay for the content you’re proposing.
  2. You are credible enough, so this audience will care about the book if you write it.
  3. You have a platform – a bunch of people who will read the book just because you wrote it.
  4. You have the skills to produce a professional book, including expertise and writing ability.
  5. You have thought through the whole thing, have a viable plan, and can articulate it.
You don’t need to be awesome at all of these to get a deal (I wasn’t), but you need to look good on most of them…and you can’t be too-obviously terrible at any of them…
The best way to get started on this is to go to a book store, find similar books to the one you want to write, and learn from them. Look at how long they are, how they market themselves, how they are organized. Then make a list of all the publishers who publish them, go to the publishers’ web sites and download their proposal forms – and get started.
Here is an example of a proposal form from a great publisher.

How this worked out for me

I’ll go through these five areas and share some of the challenges I had. I’ll also give examples of steps I took to improve.
The audience – my topic was machine learning, which was very hot at the time (and probably still is as you’re reading this). So that was good. But my book was conceptual, not exactly what everyone else was publishing in the space. So it wasn’t clear who would read it.
My mistake was starting too general and saying that my book would appeal to anyone in software and even many people outside of it, because, hey, who wouldn’t want to read my brilliant book, right?
Eventually I identified some specific personas – an engineer who wants to get into machine learning, a machine learning practitioner who wants to understand more context, a manager or program manager trying to deploy machine learning for their problems – and I wrote a very specific pitch for what each of these will get from the content.
That seemed to work.
Credibility – I’ve been working in the field for fifteen years now at one of the big companies, and I was lucky enough to win a nice award from a scientific publication. This was good. But I did get some feedback that my experience might be too academic (my title was ‘applied researcher’) and, combined with my conceptual approach, might not resonate with the audience.
I tried to address this by adding more practical experience and language to my proposal. I didn’t remove things or hide my experiences – just turned the dial on the ‘researcher’ stuff from a seven to a five.
Platform – I didn’t have one. I had about 200 connections on Linked in and some friends and parents. I didn’t bring many automatic sales with me, so this was a negative that I couldn’t do much about.
Platform is very important, because if you bring just a few thousand automatic sales, you basically totally remove the risk from the publisher. They are guaranteed to break even. Platform is also hard to get. I hadn’t worked on it because I felt it was embarrassing to write lots of blogs and build up social network connections and all that stuff. Not my thing.
But now I’m doing it, and it’s more fun than I thought it would be. I try to blog things that people will learn from, and I’ve gotten some nice feedback, which I really enjoyed. I do wish I’d started earlier.
Oh well.
Writing skills – I’ve been writing (and failing at) fiction for years, so the writing in my sample chapter was safely above the bar for what a technical publisher needs. This wasn’t a problem for me.
Thought through – and here is where I struggled most. I was lucky, because my overall pitch looked good enough that acquisition editors at major publishers took the time to interact with me. Several of them rejected me after we talked, but I learned a lot from them – thanks guys!
And based on these interactions, my proposal evolved a great deal from day one to success. See the table below for some statistics about this evolution.
Each proposal also included a sample chapter that was about 3,000 words which ended up turning into Chapter 1 of the book with little change.
A large part of this progression was me understanding more about what I wanted to write. Another big part of it was me understanding more about what publishers were looking for.
In retrospect, the problem in my early proposals was that I was too vague. I hadn’t created enough detail in my mind and I certainly didn’t have enough on the page. I’d listed topics, but the topic names did not communicate enough to smart non-experts – and my conceptual approach was a bit different, the book didn’t look like what acquisition editors were expecting.

A detailed log of the process

This next section is a bit of a journal of the interactions I had along the way. Maybe this will interest you. Or maybe you just want to skim the summary table and move on.
1/15/2016 I had a first draft of the outline and started collecting proposal forms from publishers who might be interested. I was working with a co-author at this time and it was a back-burner project for us so things moved slowly.
3/8/2016 Initial pitch to a big publisher with an O in their name. This was a short email ~500 words with a back-cover-like description and a bit about the authors.
4/1/2016 Heard back from O’s acquisition editor, they asked for a full proposal.
5/27/2016 I sent the completed proposal #1 to O (remember, this was a bit of a back-burner project, which is why it took me two months).
7/1/2016 No response yet, so I asked…
7/2/2016 O’s acquisition editor responded saying they “Can’t quite sink their teeth into it…” They gave some helpful feedback – that the proposal wasn’t specific enough on audience, and the outline was too vague. They offered to let me write some blogs on the topic for their web site to test the concept and let me develop it. I sort of wanted to, but I didn’t end up doing this. We put the project firmly back on the back burner. But I did keep writing chapters on the weekends.
2/1/2017 Sometime in this time period my co-author dropped out of the project. Writing is a lot of work, and he just didn’t have the passion for it – too much else going on. This was sad, but it also allowed me to up the pace.
3/5/2017 Initial pitch to a big publisher with a M in their name. This included an updated proposal (proposal #2), 10 pages, ~1,000 words, 270 named sections and sub-sections. And, reviewing now, this was maybe 60% of the way to the final book’s outline.
4/4/2017 No response yet, so I asked…
4/7/2017 M’s assistant acquisition editor responded asking for a proposal and a phone conversation. I resent proposal.
4/18/2017 Had a conversation with M’s acquisition editor who asked lots of questions – he clearly hadn’t read the proposal (his assistant must have done the screening). He seemed interested. He asked to have till the next week to review the proposal and that we talk again at that point.
5/8/2017 M decided we didn’t actually need to talk and instead carried out an external review of the project based on the proposal and samples I’d sent. This involved sending them to maybe fifteen or twenty potential members of the audience to get feedback.
5/26/2017 Didn’t hear anything back, so I asked…
5/26/2017 M said they didn’t get enough response from their external review. Not really negative feedback, just no feedback. They interpreted as something not resonating with their audience. And asked that we talk again.
6/2/2017 Spoke with M’s acquisition editor again. Got very similar questions to our last conversation. Clearly my outline iteration wasn’t ‘there yet’. This finally sunk into my brain and I decided to fix it for real.
Wrote the final version of the proposal (that ended up working). This one was 30 pages long, 5,334 words, ~300 named sections and subsections, a paragraph of text describing each of the five parts of the book, and text for each chapter that summarized what the reader would learn from each chapter, and what types of questions they would be able to answer after reading the chapter, like this:
After reading this chapter the reader should:
  • Know all the places intelligence can live, from client to the service back-end, and the pros and cons of each.
  • Understand the implications of intelligence placement and be able to design an implementation that is best for their system.
The reader should be able to answer questions like:
  • Imagine a system with a 1MB intelligence model, and 10KB of context for each intelligence call. If the model needs to be updated daily, at what number of users/intelligence call volume does it make sense to put the intelligence in a service vs in the client?
  • If your application needs to work on an airplane over the Pacific Ocean (with no Internet) what are the options for intelligence placement?
  • What if your app needs to function on an airplane, but the primary use case is at a user’s home? What are some options to enable the system to shine in both settings?
6/11/2017 Sent the new proposal to M.
6/11/2017 Sent the new proposal to O, they responded same day saying it was much improved and they would take another look, also asked if I’d be willing to teach some video courses as part of the deal. I said sure…
6/17/2017 I was getting serious about getting on with this book, so I’d decided to send the proposal to a new publisher every week till I ran out of publishers or got a deal… I let everyone know I was talking to multiple publishers at this point and then I sent my proposal to a wonderful publisher named Apress.
6/27/2017 Apress approved the deal and offered me a contract. I contacted M and O, but neither opted to make competing offers.
Here is a link to my successful proposal: Proposal-SUCCESS


  • Publishing moves slowly. Notice it took 3-4 months from my pitches to my rejections. Also notice I had to ask for response several times. I think this is because publishers are busy, but also because my early proposals were borderline, so acquisition editors didn’t know exactly know what to do with them.
  • Feedback is key. Giving feedback is hard, receiving feedback is hard. Being rejected is pretty hard too. Don’t take it personally. Also keep in mind: when someone gives you feedback that something isn’t right (like by rejecting you) they are pretty much always correct – something isn’t right. When someone tells you how to fix the problem, they are often wrong. In the end, it’s your project, your vision. Take what you can from the feedback and then do the right thing!
  • When I finally talked to Apress things moved quickly. Maybe it is because my work was a better match for them than it was for the other publishers (and I didn’t have to go through all the revisions if I’d gone to them first). But I don’t think so. I think it was faster because I’d finally gotten my proposal to where it needed to be.
  • This is just my experience. I’m sure publishers take all sorts of other things into account. For example, what else they have in their catalog, what they are hearing about at conferences, what they think your work will do to improve (or potentially hurt) their brand, what else they have in the works.
I hope this helps you get your book deal faster and easier than I did. You might want to learn about the process of writing the book.
You can also check out the final book here. You can also get an audio book version which is free if you sign up for a trial account with audible.