I’ve come to realize lately that for some reason or another, most people think the only book I’ve written is Professional Ajax. Perhaps it’s because that’s the book I feature prominently on my home page or because the buzz around Ajax was so great that people bought that book before they even knew I had another. In fact, I think the story of how Professional JavaScript came into being is much more interesting.

It really began when the company I was working at shut down, leaving me with a lot of free time on my hands. I started giving myself small projects to keep my mind sharp and quickly discovered that I was doing really complicated things that I feared I wouldn’t be able to remember later on. So, I started writing down exactly what I was doing and posted it to my fledgling web site. A former colleague read one and suggested I submit some work to coding magazines. I did exactly that and fairly rapidly I had articles up on major web development sites.

One of the sites I used to write for frequently was WebReference. I also was an avid reader of the site and happened upon an article explaining how one the other article writers had pooled her articles into a book that would be published soon. A light bulb went off on my head. A book is just a series of articles? Hell, I can do that.

I was stuck in a dead end job with lots of free time and a lack of creative avenues to keep my mind stimulated, so writing became my refuge. I’d run home after work and spend 2-3 hours writing. I had no idea what this book would be or what the topics would include, so I just resolved to write whatever came to my mind. And a lot came to my mind. Enough that I was writing every day after work and all day Saturday and Sunday. My mom would ask me every day (literally), “what are you doing on that computer?” And every day I’d answer, “I’m writing my book.” She would chuckle like one would when a five year old says he wants to be a fireman.

As I continued to learn about JavaScript, I came to realize that I had gone farther than any book could teach me. I kept buying more books hoping to learn new tricks, but I ultimately found that the books available weren’t even covering what I was doing. Then the idea for my book solidified: I want this to be a book that is targeted at professional software engineers. I’ll skip over the swapping out images techniques and how to create jigsaw puzzles and family trees. Instead, I’ll focus on actual programming techniques and things will need to do as professional web developers.

Keep in mind that interest in JavaScript at this time was flat. This was years before Ajax popped up and people were fighting to get basic functionality working in Internet Explorer 4 and Netscape Communicator 4. Most of the books on JavaScript had been out for several years and there didn’t seem to be a need for any new books. But my opinion was that the market didn’t provide was developers actually needed. It was a perfect time to introduce a new book.

I put together a proposal and sent it off to a couple of publishers. The first publisher I contacted was Sitepoint. I had written several articles for them and they didn’t have any JavaScript books at the time, so I thought it would be a great fit. Unfortunately, they thought differently. I was told that my proposal didn’t make sense, that they didn’t see why anyone would want to buy this book, and that my writing style was lousy. I politely responded with a thank you and asked if they had any advice for things I could work on. I got no response.

My next stop was a new company called APress. They also didn’t have any JavaScript books, so I thought I’d have a shot. My proposal was accepted and someone began reviewing it. After waiting for months without hearing back, I followed up to find that the editor who had been assigned my proposal had left the company. I found another contact, the person who would have been his boss, and he assigned me to someone else. After several more months of email tag, I was finally told that APress didn’t want to get into the JavaScript book business because it’s already being dominated. I wrote a note back and thanked him for his time and input. The next day I got an email back saying that he, personally, believed that a book like this could do quite well with a bigger publisher who could take the risk of going head-to-head with Flanagan’s book. He then suggested that I contact Jim Minatel over at Wrox to see if he’d be interested. He said a big company like Wrox would have a better chance at publishing my book than a small one like APress (yes, APress has a ton of JavaScript books now – apparently their fear of the JavaScript book market subsided with the rise of Ajax).

So, I contacted Jim and introduced myself. I explained what I’d gone through so far and that I had a proposal for a book on JavaScript that I believed would change the market. As luck would have it, Jim was looking for someone to rewrite the Wrox classic Professional JavaScript. We had several discussions about his vision and my vision and worked together to come up with a proposal that we both felt comfortable with. And Professional JavaScript for Web Developers was born.

All in all, it took close to three years between the time I first started writing until the book was finally published. The result? Professional JavaScript was the most up-to-date JavaScript book available for about a year and people really took to it. Since it first came out in 2005, Professional JavaScript has sold the second-most copies of any professional guide covering the entire JavaScript language (this excludes the For Dummies and Visual Quickstart beginning guides as well as the DOM-specific DOM Scripting), behind Flanagan’s legendary tome. It’s also been translated into numerous languages including Chinese, Spanish, French, and Polish. Beyond sales and translations, the book has helped me in other ways, such as getting me out of the miserable I had when I started writing it and ultimately getting my foot in the door at Yahoo!.

There’s two things I really hope that everyone gets out of this story. First, be persistent in the pursuit of your dreams. Just because you fail a couple of times doesn’t mean you’re ultimately going to fall short. Don’t be deterred by people who don’t share your vision. Second, never forget to say thank you, even to the people who stand in the way of your dream. If I hadn’t written back to say thank you to the APress editor, I never would have been put in contact with Jim and Professional JavaScript may have ended up with another author.

Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.

Both comments and pings are currently closed.