I've been tweeting tirelessly about writing this thing for quite some time, but as the Safari Rough Cuts program opened today I felt it suitable to give some more tangible information about it.
What's it about?
The book has four parts, and anyone of them can be read in isolation, depending on prior experience.
The first part deals with automated testing, introduces asserts, unit tests and the test driven development methodology. It's slightly theoretical, but uses loads of examples and provides a good background for the later parts.
The topic of these examples ranges from the observer pattern, an "Ajax" implementation, Comet, node.js and finally DOM scripting. They focus mainly on the testing and the process of using tests to design interfaces, refactor heavily and other concepts such as stubbing and mocking.
Testing patterns and best practices
The final part of the book sums up some lessons learned through the above examples from part 3 and dives deeper into some concepts such as stubbing and mocking, which are important topics to cover in order to write truly isolated unit tests.
On writing a book
The book is being published through Addison-Wesley Professional, and as such I am surrounded by a very smooth and professional machinery. I have to say, the writing process has been very pleasant, and I have a very nice editor and staff working on the book. AW provides a team of reviewers, and boy are these guys (and gal) great. They help out by finding everything from typos and questionable formulations to bad ideas that are hard to discover when you've got your nose deep into the material. I'm very lucky to have been able to do this.
Safari Rough Cuts
As I mentioned in the introduction, what prompted this announcement was the availability of the Safari Rough Cuts program for the book. Safari Rough Cuts is like "beta" for books. The three first chapters have just been made available in very early draft form, and anyone with a Safari account can read them and provide feedback right this instance. If you are on Safari I hope you want to stop by, read the chapters and provide some feedback. It will surely help the book get better!
As for those of you without an account, you can either get one, or wait. In any case, chapter 3 is freely available to anyone. It's the tools chapter, which covers quite a few tools, but focuses mainly on JsTestDriver which was chosen as the main tool for many of the examples.
If you're on Twitter, you'll find me as @cjno, do stop by!
Side note: This post was written to the sound of Snakes for the Divine, High on Fire's new album. It ain't Blessed Black Wings, and it ain't Death is this Communion, but it sure is a cool album. Check it out!
Hope as many as possible of you check it out and if you do, please tell me what you think!