How to Write a Chapter a Week

When Michael Privat (@michaelprivat) and I signed up to write a book for Apress, we both gulped at the schedule: one chapter due each week. He gulped because, despite being a book virgin, it sounded like a breakneck pace. I gulped as a book veteran because I remembered the work involved in bringing The Definitive Guide to SWT and JFace to press. Writing this book seemed like a good opportunity, though, so we steeled our fingers, set our brains, and started working. We just finished drafting chapter five, and we’re precisely on schedule: five chapters, five weeks. Four chapters and four weeks to go!

Here’s what I’ve learned so far:

Don’t Sleep

I only halfway jest. We both have full-time jobs at Availity, LLC. Michael is the technical lead on the game-changing platform rewrite of our core-business application that has regulatory implications with the new 5010 mandate, so he has dates to hit and a schedule to keep. I’ve transitioned out of management to a new role we’re calling Senior Technical Staff Member, so I’m scouring off five years of management rust and trying to justify my existence by developing solutions in Objective-C, Rails, Java, and Grails. We both have families (Michael has two children and I have five) that want us to succeed but won’t let us disappear while we write. Little children can’t walk to soccer games or hip-hop lessons. Something has to give in our schedules, and that thing is usually sleep.

When I saw a mini-fridge on sale for $58 at Walmart, I bought one and slipped it under my desk at work. It stays well-stocked with Coke Zero, Diet Dr. Pepper, and Pepsi Max. I’ve worn a trail in the carpet between my desk and the bathroom, but the caffeine usually keeps me awake. I don’t know what Michael’s secret is, as he works from home four days a week, but his emails and checkins evidence that he’s not sleeping much, either.

Work with Someone Brilliant

On the same principle that you should have a workout partner to ensure you exercise, having someone else you’re accountable to for delivery helps you work through the times you want to defer tasks. Knowing someone is counting on you to complete your work provides motivation.

Also, having someone working with you means you don’t have to do everything. More workers means more work done.

Working with someone brilliant — and Michael is that — helps you elevate your own game. It also means that you have someone to unstick you when you get stuck, who provides different perspectives, who gives you someone to bounce ideas off, and who gives you an opportunity to play critic when they bounce their ideas off you.

I couldn’t write this book, especially at this pace, by myself.

Use the Right Tools

Writing: MacVim and TextMate

We knew when we started this project that we didn’t want to write in Microsoft Word — whatever its strengths and weaknesses, its output is binary, and we wanted something we could easily diff. We also knew we’d be working on different sections simultaneously within the same chapter, so we wanted to break the sections of each chapter into separate files. Michael is a LaTeX guru, which I’ve used enough to know that with Google I can use it to format anything. We know Apress has published some books from sources in LaTeX and Markdown (see, for example, Pro Git), so we explained our desires to our project manager, who patiently explained that our schedule can’t accommodate the scripts and challenges of fitting LaTeX and Markdown files into something that Apress can publish, so we had to use Word.

Undaunted, we emailed Dave Mark (@davemark), who has authored and co-authored more books than you may have read in your life, including iOS books for Apress, and asked him how he solved this dilemma. He confessed that they knuckled under and just used Word, though he had other pieces of advice we readily accepted.

We settled on writing everything in plain text using text editors. I use MacVim and Michael uses TextMate. We can edit each other’s files easily and diff any changes. We have sections broken out into different files, so we can work on different sections without worrying about collisions. An example file tree for a chapter is:

ch01
  +-->00-Intro
      +-->Intro.txt
  +-->01-WhatIsCoreData
      +-->WhatIsCoreData.txt

Any screenshots or other graphics files go into the appropriate section’s directory. Code goes into a Sources directory, either inside the section’s directory for code specific to a section, or inside the chapter’s directory for code that applies to more than one section.

When we’re ready to submit a chapter, we create the Word document, paste in the text, and apply formatting. The pbcopy tool comes in handy here — pbcopy < 00-Intro/Intro.txt copies the content of 00-Intro/Intro.txt to the clipboard, for example, ready for pasting into Word. While we’re writing and reviewing, we aren’t distracted by formatting or styles — in a text editor, all we can do is write.

Coding and Diagramming

We write all code in Xcode 4 and create all diagrams in OmniGraffle. Xcode 4 is in pre-release, but it will likely be available by the time the book comes out so we don’t want the book to look dated. Besides, using Xcode 4’s new features usually outweighs the instability of a pre-release version.

Source Control

I’ve long believed that if it ain’t in source control, it doesn’t exist. Everything we do is in source control. We use Git, with a private repository on Beanstalk to share changes. We commit words and code several times a day, and we always have the correct versions of files.

Communication

As I mentioned above, although Michael and I live in the same city and work for the same company, we don’t see each other all that often. Michael works from home four days a week, and when we’re at work we have other things to do. We touch base at work occasionally, but our real communication happens elsewhere:

  • Project Management in FogBugz. Each chapter has a task, and each section within a chapter is a subtask of that chapter. We assign the sections, and have defined states: Draft, Review, Passed Peer Review, and Complete. We always know who’s working on what and what state it’s in.
  • Time-sensitive communication via SMS or IM. We both have Macs, iPhones, and BeejiveIM. When we have to communicate something or get an answer right now, we text or IM.
  • Email for less time-sensitive communication. Our email threads can grow pretty long, but we both make sure to check often enough that no questions goes unanswered for more than a few hours.
  • Occasional face-to-face meetings. Whether meeting for lunch during a workday or meeting at Barnes & Noble on a night or weekend, we try to meet face-to-face every week or two to recalibrate our bearings. I’ve found it essential to both understand and be understood on what we’re doing and what the next steps are.

Lose Your Fear

We miss so many opportunities to do things because we’re too afraid to finish them. As we write, we push ourselves to move forward and write. Editing comes later, and we have a team to help us. Our first sentences won’t be our best sentences, but that’s OK. Keep writing, keep moving forward, and refine as you go. But make sure to go.

Steven Bristol (@stevenbristol) from LessEverything blogged about fear.

Conclusion

We crossed the halfway point today, at least for writing, when we finished the draft of chapter five. The book has nine chapters, so we still have a lot to do. With the right partner, the right tools, and my stocked mini-fridge, I know we’re going to make it. And in case you were wondering, that’s a dragon fruit on the cover!

2 Responses

  1. Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!

  2. maria andros says:

    Really nice post,thank you, best website ever

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.