Given that you already have an idea for your hobby project, I would suggest
- Write good documentations
- Schedule your hobby project in some sense
First of all, it's a hobby project. You may only spend 1-2 hours a day at most, or even only 1-2 hours a week, on your hobby project. It's difficult to remember all the details in such working style, and good documentations help you quickly jump start from the previous pause. A good documentation should keep track on what to be done, what has been done, and why things are done in such way. The documentation can be more important than the actual programming phase of the hobby project.
Also, scheduling some time for the project in advance makes yourself mentally prepared for it. By doing so you're telling yourself it's not the night for gaming/movie/hang-out/dating/whatever, but for your hobby project. It will be easier for you to make up your mind and sit in front of the computer even after a tiresome working day.
If you haven't decided what to do for the hobby project, I will add the followings:
- Pick a project that has relatively low entry barrier for you.
- Pick a project that really interests you, or
- Pick a project that may assist your daily work.
Having some challenges is good, but you may lose your interest and patience quickly if the challenges are just too big. Unless you have some strong incentives (e.g., having strong desire to start a new career path), selecting a project that you already roughly know how to complete may help keep your momentum.
Strong incentives may come from other aspects. An interesting project and a project that facilitates your daily work are some examples. There are lots of fun stuff other than your hobby project, and you need to find a good reason for yourself to continuously work on the hobby project. In regards to the project that facilitates the daily work, it doesn't have to be directly related. A program to automate the editing of your presentation slides; a program to visualize the data. As long as it provides good incentives, it should be a good project that makes you happy to work on.