Lessons Learned from Writing a Technical Book to Teach Programming

From 2008 to 2009, I wrote a book called “Invent Your Own Computer Games with Python” ( http://inventwithpython.com ) which guides young adults and complete beginners through learning how to program in the Python language. I’ve just completed the second edition of the book, which has been an exhausting amount of work. Looking back over it, I realized that it could have been a much less exhausting experience if I had made some simple preparations.

I’ve decided to write up this post on the lessons learned and the best practices for writing a technical book that aims to teach programming. This post will help me organize my thoughts so that I’m more prepared for my own future writing, but the practical tips can help others who aspire to write a book as well.

Other people have written on this topic before. Some of them reiterate the fact that you probably won’t make any money from your technical book, or at least, not compared the money you could have made by flipping burgers instead of writing. I’ll link to some of them here:

“How to write a book” (A Billion Monkeys Can’t Be Wrong blog) http://www.gigamonkeys.com/blog/2007/04/10/how-to-write-a-book.html

“Hard Work, No Pay: What’s the Point? (Charles Petzold) http://www.charlespetzold.com/blog/2007/10/081247.html

Do Not Buy This Book (Jeff Atwood’s Coding Horror blog) http://www.codinghorror.com/blog/archives/000971.html

What is it like to write a technical book? (Xaprb blog) http://www.xaprb.com/blog/2008/06/15/what-is-it-like-to-write-a-technical-book/

Writing a Technical Book: IronPython in Action with manning Publications (Michael Foord at the Voidspace blog) http://www.voidspace.org.uk/python/articles/technical-writing.shtml

General Principles I Realized

1 – This was a lot more effort than I initially thought it would be.

2 – The actual writing of the book took much less time than editing and revising it. Writing a book is a months long project, so you should prepare for it as such.

3 – I learned things during the process that I couldn’t have anticipated before. I’ve written them down here for others to learn from my experience.

Things to Do Before You Start Writing or Outlining

There are many important decisions and questions that need to be completed before you write the first sentence of the book. Without completing these steps first, you will most likely set up yourself up for a lot of wasted writing and effort.

This is important to keep in mind, because writing the book is relatively easy and short. However, the editing of the book and getting it into a presentable state was by far the majority of the effort needed.

1 – Research what others have written on this topic.

Don’t reinvent the wheel. Find as many other books and papers on your topic as possible, and generate a list of them. Be exhaustive, and skim (if not read completely) all of these sources.

2 – Create a list of what you like about these books and don’t like.

Write down the things from these other books that you like and want to incorporate. And then write down the things you specifically do not like about these books. Are they too wordy? Do they cover too much or too little information? Do they not provide enough examples? Is the book too shallow, or does it focus on too few topics? Create an actual list and save it somewhere on your computer so that you can refer to it later. The act of typing up this list will solidify this in your mind.

A good place to check are the Amazon.com reviews of these books. What are other people saying about them? Do the people writing the reviews realize who the target audience of the book is? Are they making valid criticisms of the book? Are they writing generic, “this book is great” fluff reviews?

3 – Figure out the demand for this book and the target audience.

Your book needs to stand out. The world does not need Yet Another Programming Book that covers the exact same information in the exact same way as other books. What makes your book different?

This could come from covering topics that other books do not cover, or covering topics in more depth than other books do. Or perhaps you want to organize information into a book that is freely available rather than what only is available commericially.

Page 1 of 4 | Next page