I've seen several Indie Hackers discussing juggling a job while working on a personal project and keeping some semblance of a life. Most of the comments center around time management. Time management is a critical component, but there's more to it; I've found the following context hacks useful for focus management.
Draw physical boundaries between the job and the project
Of course, there are legal reasons for this, but I'm not a lawyer, and this is not legal advice. I, for one, would hate to see someone build the next Facebook only to have it confiscated by a greedy employer. It sounds insane, but most companies require a signed contract, and the odds are good that the legal ease of that contract mentions side projects. Okay, with that aside, consider these:
Do project work on a different computer
Primarily, development environments vary. Using different computers eliminates this risk of conflicting conditions causing time-wasting confusion.
Also, dedicated computers improve the efficiency of transitioning between the job and the project. More importantly, physical switching provides a clear context indicator for the brain. Sometimes, closing one laptop and opening another can be enough to flush current project concerns and queue up what is next. As you will read in a moment, I don't recommend a quick change, but it works in a pinch.
Do project work in a different place
Similarly, students often suggest using unique study locations for various subjects. The human brain incorporates physical information into everyday experiences, which has many benefits. Merely thinking of a place used to study brings the study topics closer to reach.
This suggestion expands on using different computers by leveraging the context switch. Working the job at an office makes this easy, as commuting is a valuable context switch. Those working from home may find this more challenging, but creating different spaces is beneficial; perhaps a coffee shop.
Take plenty of time when switching between the job and a project
The required time varies but must be enough to change the context. Once again, a commute works excellently for adding time here. I can work remotely, but on days when I've scheduled a night of project work, I choose to work in the office and use my commute to transition. When working from home is the only option, try to extend the transition time by finding something to do or not do. For example, take a walk or a nap.
Don't intermix job and project work
Avoid filling small gaps of free time on one to do something on the other. Context switching is expensive, and more often than not, one loses the perceived benefit during the transition back. It's better to find other things to do within the same context.
What determines a small gap depends on the optimal transition time. For example, my switching time is about twelve minutes, so I don't consider it unless I have a gap of thirty minutes or more. Instead, use these opportunities for the likes of meditation, exercise, or writing; Anything to free my mind as opposed to just working on something else.
Work one side project at a time
Was it Bill Gates who said, "Most people overestimate what they can do in one year and underestimate what they can do in ten years." Focusing on one project at a time makes for the fastest progress possible. As a software developer, I find this the most challenging suggestion. The tools and opportunities are rapidly advancing, and the excitement of what to learn or work on next never relaxes.
To top it off, I'm a taskmaster with lists that would make David Allen weep. But, looking back at my accomplishments, I realize that the times when I'm most focused on one project end up being the times I'm most pleased with the outcome. Getting back to Gates, working on only one project at a time can feel slow and daunting. However, it is the fastest way to bring a project to fruition. Then, there will be plenty more time to work on the next thing.
Practice deep work
Schedule all project work in a well-suited workspace with distraction-free technology. I know I put deep work last on the list, but it's an essential item. The rewards of spending project time in the most productive state will be immeasurable. For more on deep work, see Cal Newport's website.
In conclusion, I hope this list was helpful. While time management is critical to successfully juggling a job with personal project work, employing these contextual suggestions makes for a more efficient use of that time.