Working on a project at home is hard; by the time you get around to working on the project you often find that you are tired, it’s late, and slouching in front of a game or television is much more appealing. Here are the strategies that I use to keep working on something.

Work on it every day

This is something that I picked up recently on twitter, in a tweet from @drewmccormack which said:

“Here is the one rule you need to go indie: You must do something on your project everyday, no matter how little.”

This is the most useful advice I have seen in actually completing any non-trivial project at home. The problem with not working on your project every day is that the longer the time since you last worked on a project the harder it is to sit down and start working on it again. Not only do you have the work that is yet to be done, you also have to relearn how the code already worked and find your way around the project again. If you are short on free time this barrier to getting started again will put an end to the project.

Don’t try and do it all at once

Large projects can be split up into constituent parts which be can built and tested independently (subprojects). Sometimes this will require a bit more work as you may need to program some additional components to interact with your subproject, however I find the benefits out way this drawback.

Building a subproject means that you will need to think about how the components will be plugged into another project which should help improve the design of the code. Your current goal is brought forward by a long way, reducing how daunting your task is. And you may be able to test user interface components more thoroughly than you can in your full program, where some conditions are hard to reproduce.

Build your program so it works

Get your program/subprogram into a state where you can build it and see visible results as fast as possible, from there you can add features. If possible, keep your program so it works at the end of every programming session. This means planning the features of your program so they can be written and built in one day, again this may mean that you can’t implement the whole feature in one go, but need to split it up into several smaller parts.

If there is a feature that you think will take more than one session of programming it is especially important that you work on this feature everyday until it is done. This may mean choosing to implement different features until you know that you will have a couple of days with free time to implement the larger feature.

Use version control

It’s easy to make mistakes, and version control will save you a lot of time. You are always able to go back to the last working version, and then work forward through your changes to see where things went wrong.

I’d strongly recommend using a distributed version control system like Mercurial or Git with these you can make the repository on your own machine and push it to an external service later. For any important project having an external copy of your repository is essential. Your project isn’t safe in one place!

If your laptop breaks or your local storage becomes corrupt you can lose a lot of work if you don’t have an external repository. If your external repository isn’t shared with anyone I’d recommend pushing after every coding session you do. If it is a joint repository then you can always make a personal repository, and only push working code to the joint repository. Services like Bitbucket and Git will host your repository for free.

Understand the problem

Time spent researching the problems that you come across isn’t wasted time. Really understanding the problem that you are trying to solve will mean that if you come across any difficulties you are better able to resolve them.

Also, researching problems isn’t an activity that has a time bound. If you know that you won’t have the time to write and complete some code one day, then looking into how you will write the code or solve a tricky problem is an activity to which you needn’t give a lot of time to get valuable results.

Understanding the problem can include things as simple as reading the documentation for the API you will be using and familiarising yourself with it. This can save a lot of time when you come to the coding.

Work on something you enjoy

If you don’t enjoy what you are doing you won’t be able to keep your motivation up to complete the project. There will be difficult or boring parts of any project, these are the hardest parts to get done. If you don’t enjoy any of the project you won’t finish it!