This morning my friend Venkat tweeted “Programming is not an act of coding, it’s an art of refactoring.”

I was Venkat’s editor on two books and he wrote both of them the same way. He spent months and months doing research and writing code. Then he took a couple of weeks off and wrote a chapter each day. My job was to quickly edit the chapters individually and get them back to him while they were still fresh in his mind so he could make useful revisions.

The art of refactoring.

He needed two things before he refactored. (1) He needed to have written something to refactor. That is the step you are on this month. You are generating the raw material that you will revise in the months to come. (2) A critical eye to help him see what needed to be refactored and perhaps how. In his case he had both his own eye and mine and later the help of technical reviewers.

Incidentally, there are different levels of refactoring. There is local refactoring for writers where you need to find a different way to say something or a better example or perhaps a good diagram to include. There is the chapter level refactoring where you decide something needs to be added, left out, or moved. And then there is the book level refactoring where you ask what the real goal of the book is and you ruthlessly reexamine everything in light of this goal.

Right now you are engaged in the act of writing. Soon you will be knee deep in the art of revision.