State of the Secrets

I’ve alluded to it a couple times now but it’s probably important to state it definitively: I’m writing a new JavaScript book, to be published by Manning Publishing, called Secrets of the JavaScript Ninja. I published the rough Table of Contents previously and the contents of the book will be staying virtually the same (with a couple minor additions).

I wanted to take this opportunity to give a sort of progress update – letting you know what’s happening. Not enough is said about the process of writing a book (especially technical ones) so I wanted to try and fill in some of the gaps.

Dec 28th: I first decided that I wanted to write a new JavaScript book around the end of last year. While it wasn’t, explicitly, a new year’s resolution – the timing was rather nice.

Dec 28-30th: I then set about collecting some information, trying to decide if the subject matter was worthwhile:

Jan 9th: I decided that I had enough information on hand to warrant a full book on the subject matter (namely advanced JavaScript techniques and cross-browser scripting). I started work on congealing this into a full outline/table of contents.

It was around this time that I started work on my first (non-introductory) chapter: Functions.

Jan 21st: It was around this time that I started talking with various publishers. Luckily I’ve been able to accrue a number of contacts in the technical publishing industry, over the past couple years, so I already had some starting points and good references. I also received a few contacts after my post on the profits of my previous book.

Jan 25th: I made the decision to go with Manning Publishing as the publisher of my book. I had the opportunity to have a number of long phone calls with Marjan (the head of Manning) and he had some fantastic ideas for the book and its direction. Hearing his ideas and excitement was a huge reason for me to go with them but in the end there were a number of reasons for choosing them:

  • They were very open to trying new techniques with the book – everything from how it was to be published, what the contents were, to even how the writing process worked.
  • When we originally started talks we were looking at the idea of having the book be similar, in style, to other books like Why’s Poignant Guide to Ruby. We discussed this, at length, for quite some time. After a few weeks of mulling it over I decided that this wasn’t the best course-of-action for this book. The mixture of complex material and narrative would not work well, I felt.
  • However, we agreed to include a heavier use of illustrations and figures to communicate difficult topics (such as timers or closures). We’ll have to see how this works out, but that’s the current plan.
  • The book will have a companion web site which will be open to those that have purchased a copy of the book. It will behave very similarly to the Django Book, in that you’ll be able to comment on any portion of the text – becoming part of the editing and review process.
  • I’ll be able to write the book using DocBook, which is a huge win over the old pass-Word-documents-around strategy that a lot of publishers use. Many technical publishers are getting better here – I definitely wouldn’t want to go with one who didn’t support this, or a similar, strategy.
  • They have a good level of distribution and their books are widely available in book stores.
  • We were able to negotiate a good level of compensation heavily tied to the sale of books, which made me happy.

Feb 3rd: Chapter 2 was completed and submitted on time. I now have an absolute schedule to work against. One chapter every 10 days until the end of August. It’s pretty grueling (as is to be expected with book writing) but I’m optimistic. I started with Chapter 2 so that I could get a feel for how an actual chapter would be written (I dislike writing non-code chapters).

Feb. 17th: Chapter 3 (Closures) completed. I also released a portion of this chapter as a blog post: Partially Applying Functions in JavaScript. I fell behind with this chapter because I was traveling to Mountain View, for Mozilla work, during this period. I suspect that this will happen frequently throughout the summer as I’ll be traveling a lot more.

Around this time I was assigned an editor for my book, Tom Cirtin. I look forward to working with him more – I’ll certainly have plenty of opportunity for that.

Feb. 24th: Chapter 4 (Timers) completed. I’m virtually caught up at this point. However I have to jump back now and finish Chapter 1 (the introductory chapter) before moving on. I released one portion of this chapter as a blog post: How JavaScript Timers Work.

There’s a lot that I’m doing differently from my first book and it’s already making for a saner experience:

For starters this book is highly specialized, it picks one topic and covers it completely (there’s a chapter on closures, on timers, on eval, on with – to name a few). I enjoy giving high-class treatment to obscure topics. Knowing that someone will be able to pick up this book and absolutely see something that they’ve (probably) never seen before makes for a very invigorating writing experience.

Another thing that I learned from my first book was that I really dislike long chapters. To counter this the book is broken up into 21 “small” 10-12 page chapters. I love it, it’s the perfect chapter length, for me. I rarely find that I have more to say on a subject after about 4000 words (which is what 10-12 pages works out to be). With my old book I constantly felt like I had to flush out topics in order to meet page quotas, not so here. This causes me to become much more relaxed, knowing that whatever result I end up with it’ll be an ideal length.

While I wouldn’t call this book a ‘cookbook’ it’s certainly not a traditional-style technical book. I’d say that it’s something of a hybrid between the two. The chapters, thus far, have a structure like: In-depth explanation of topic, simple use of topic, specialized use of topic #1 through #3. For example in the chapter on Timers I dive in to how timers work, look at the minimum timer delays and reliability, explore computationally-expensive processing, build a centralized timer control, and finish up with a look at an asynchronous test suite.

While I don’t have a final date for when the book site will be ready (or when the book will be available for pre-order) you can be sure that I’ll blog about it here, when that’s the case (be sure to subscribe to my blog, if you haven’t done so already, to receive more updates).

In short: I’m really excited about this book. Progress is going well, the publisher is friendly, the topics are ideal, and the content is coming out great.

Posted: February 25th, 2008


Subscribe for email updates

19 Comments (Show Comments)



Comments are closed.
Comments are automatically turned off two weeks after the original post. If you have a question concerning the content of this post, please feel free to contact me.


Secrets of the JavaScript Ninja

Secrets of the JS Ninja

Secret techniques of top JavaScript programmers. Published by Manning.

John Resig Twitter Updates

@jeresig / Mastodon

Infrequent, short, updates and links.