Python 2 and 3 Compatibility — published by Apress.

Early this year ,I was given a task on an opensource project during my outreachy application which had some python 2 script that I had to convert to support python 3. This task was the definition of an interesting task as it gave me an opportunity to learn as I Implement. I have worked with the python stack since 2012 and still find it interesting.

This particular task required me to look up material on python 2 and 3 compatibility as I had to provide support for both python versions on the script. There were some resources on the subject online even on the python website but these resources were like cheat sheets and not as detailed as I wanted. I used them anyway and have been able to accomplish similar tasks to other open source projects.

Why would you even write a book

Different authors are motivated by different reasons to write, but at its core there should be need for the material you want to write about. In my case I wanted to explain python 2 and 3 compatibility concepts so that someone else does not have to fight battles I have overcome before. There are other benefits to writing a book — like monetary returns, dopamine hits a term I got from Flavio Percoco, among others but these shouldn't be the motivation. The motivation is to share knowledge so that others can learn from your experience.

The Process

Depending on your publishing style you may take different paths. Personally, I went for traditional publishing because I dint have the resources and time to self publish. I just wanted to focus on writing and not bother so much about many other things.

Preparing your proposal

I reached out to a couple of tech publishers — not so many like three because I had an idea about who I wanted to publish with. This is a decision you make after some research and the good news is the information is all over the internet.

I read about the proposal submission process on their websites and used the provided templates where applicable. I also read about the process from blogs from other authors.

The proposal is accompanied with a sample chapter for the book to show the acquisition editors a thing about your writing. I dint have any editors for my sample writing because personally I don't want to involve people in a premature process.

I got acceptance from Apress to publish a book on python 2 and 3 compatibility. I was so excited!!! The work begins there after that acceptance email.

Sign the contract

The publishing company will share a contract for you to sign. It is very tempting to not read everything in this document because I mean it so big especially if like me you are used to just clicking I agree on software licenses when doing installations. I would lie If I said I read everything the day I signed the contract but honestly later on, I had to go through it word by word because I kept referencing sections when dealing with the publishing team at different levels.

You need to understand what you are allowed to do and in some cases you may not be in agreement. So read the contract before you sign.

Get your own editors

After the contract, the writing starts with deadlines set usually the ones you indicate in your proposal. I came up with a team of editors on my end for grammar and technical things on my end. Ofcourse the publishing company will assign you to editors but you should have your own as well in IMO.

I reached out to Ed Schofield who gladly volunteered to help on technical correctness and other friends of mine and because of this I got early feedback on most things before I even submitted to Apress.

Discipline is key

It is advised that you set up a schedule for your writing. You can decide on the number of words per writing or even chose to write a chapter per sitting. That is yours to ponder. For me since I was participating in outreachy at the time, I decided to set up my weekends to write two chapters. One on Saturday and another on Sunday.

Some things may come in the way like you may need to meet some other deadlines else where but I made it a discipline. I also ensured I finished the writing early enough to get feedback from editors on my end before the Apress deadlines.

Prepare a summary for the Book structure before writing

What really helped me was I ensured that I first worked on the structure of the book before I wrote anything. By structure I made a table of contents and bulleted the sections I needed to write under each chapter. This made my writing process easier.

This structure may change as you write because you may realize the need to rearrange chapters but an initial plan can really save you.

The Actual writing

With a plan, the writing comes as natural but this is where you do a lot of research to make sure your facts are right. Read all material you can get your hands on and remember to reference work that is not yours.

You will need to present all your content , code and images in a way to drive your point home. I decided to re-use opensource code for most of the examples but you can use your original examples if you so wish. Have a consistent structure for all your chapters as this gives flow to your book.

What if you run short of ideas? I found that a good sleep and focused walks dedicated to thinking about what am writing gave me enough time to meditate. Quiet walks with a goal can give you ideas you have never thought about.

It can get boring

I have to confess writing can drain you and can be boring so my trick was when it sucked, I tried to put my energy somewhere else to charge for my next writing episode.

This book represents you entirely

Whatever you write in your book will either promote you or make you infamous therefore only write that which you have thoroughly researched about and are sure about because this work will go out to the whole world for criticism. I felt a bit of imposter syndrome and fear but just do your due diligence — then sit back and relax.

The Last Mile

When you submit all your content the other editors will make more changes on style and other things and will share a copy edit copy of the book for your review.

As an author, this should be reviewed word by word because any mistake here will go to production as this is the last time you have to make any changes before release. I made sure I confirmed on all my assumptions at this stage.

When you are sure of all this, sit back and wait for release day.

The release

Your acquisition editor will officially tell you when the book gets released which is a very rewarding day for an author. The actual work begins today to create awareness of your book.

Python 2 and 3 compatibility was released yesterday in time for Christmas and you are welcome to share with your colleagues!!!!

Christian, I choose results over reasons, proud aviator, show me the code