Writing MongoDB: The Definitive Guide

Me, with the finished product
MongoDB: The Definitive Guide is now available in bookstores everywhere! (Or at least on Amazon.) Please pick up a copy!

Some interesting things I learned about the process of publishing:

There are professional indexers who write the index.
This amazes me, because we had to proofread our index and I’ve never been so bored in my life. These people must have the exact opposite personality I do. And, in our case, they spelled “Ruby gems” as “Ruby germs.”
Blog posts are a better length
In 500 words, I can edit and polish something until it’s a shimmering jewel of a, uh, blog post. It’s really hard to make a hundred thousand words even have a reasonable flow, never mind be “perfect.”
Illustrations will be assimilated.
When we submitted the manuscript, I had (the night before) whipped up the illustrations in Photoshop that looked like this:

Every document is a beautiful snowflake (because they're all unique)

At the final stage of the editing process, these all got replaced by O’Reilly illustrations, which looked a lot more professional.

Well la-dee-da.

I’m pretty impressed by how well they matched what I was going for, but wish I hadn’t spent so long making those damn snowflakes.

An advance is an advance on sales.

In retrospect, I should have realized this, but I never really thought about it before. If O’Reilly advanced us $100,000 (they didn’t), that just means we wouldn’t get any royalty checks until people bought enough books to give us $100k in royalties. So, essentially, authors write books for free. This kind of amazes me.

All and all, it was really fun and I’d do it again in a heartbeat. In the future, I wouldn’t stick to the schedule quite as rigorously. At the beginning, O’Reilly gave us the following timeline:

  • 3 months = 2 chapters
  • 6 months = first half
  • 9 months = whole book

I write best when I splorch down everything that comes to me as fast as possible and then edit it fifty times. So next time I’d do:

  • 3 months = book of crap
  • 6 months = semi-literate book
  • 9 months = great American (technical) novel.

Andrew suggested we do the National Novel Writing Month, so now I’m trying to think of another thing to write about. I’ll probably do a MongoDB book, but not sure what yet…

18 thoughts on “Writing MongoDB: The Definitive Guide

  1. Congrats. I was not one of the luck 4 winners of your book tonight. I’ll order it tomorrow. I was hoping they would be for sale in Boston so I could get Mike to autograph it. Alas, I will have to stalk the two of you with a sharpie later.

    Like

      1. Yay! From the twitpic, looks like it’ll be tough for us to sign (being an ebook and all).

        I’d read that rant 🙂

        Like

  2. I was informed from Amazon that the delivery of the book would be deferred.
    At that time, to be honest, I worried a bit that you and the co-author might get stuck with something I couldn’t imagine.
    In any case, congrats.
    I’m looking forward to seeing a copy as soon as possible.

    Like

    1. Thanks! I think it was delayed by a week (it was supposed to come out the 15th) but I’m not sure why, I think we got everything in on time or early.

      Like

    1. Yeah, it probably varies by the publisher. In some ways no advance is nice because you’ll start getting royalties right away, but I think I prefer to get a little up front.

      Like

  3. Hi Kristina,

    Not sure where else to put this since I don’t know how to get a hold of you by e-mail. I have a question on an example in Chapter 6 – Aggregation Page 85. The first example on that page where you are counting tags grouped by day is stumping me. The result set includes the “day” tag, but I don’t see “day” being used as a key in the example. I only see “tag” as a key. How does the result set have “day” when I don’t see it referenced in the example?

    Thanks,

    Amit

    Like

    1. It’s an error, thanks for letting me know! It should be:

      > db.posts.group({
      ... key : {"day":true}, 
      ... initial:{"tags" : {}}, 
      ... $reduce : function(doc,prev) { 
      ...     for (i in doc.tags) { 
      ...         if (prev.tags[doc.tags[i]]) { 
      ...             prev.tags[doc.tags[i]]++; 
      ...         } else { 
      ...             prev.tags[doc.tags[i]] = 1; 
      ...         }
      ...     }
      ... }})
      

      Whoops.

      Like

  4. Pingback: ehcache.net
  5. Hello All just wanted to know that did anyone face any issue of :error command line: unknown option priority
    when starting the mongo database using : nohup mongod –config mongodb.conf –replSet rs0 &
    and we have priority set to 1 in the primary config file and to 0 in secondary.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: