Seconded. It seems to me that whenever people tell you to keep your day job while trying to start a business, their day jobs are not related to programming.(so IT, analyst...)
I would love to read something about how your code all day for your day job and then code all night for your business. That info, coming from somebody who has done it before would be a very interesting read.
(Another interesting thing would be reading about how to keep your sanity while doing all of this for more than a few weeks)
To code on both, do something you care about as your startup. _really_ care about. Also, there is lots to do. Do whatever seems most fun to you at the time. By the time you are forced to do things for clients, you'll have enough code and good habits formed to manage it.
To stay sane, set strict rules about time off. For me, Friday night and Saturday (all day and night) are family time. Sunday is totally Gridspy time. If I start to feel tired, admit it and remind yourself that you can ship one month later and take a few days off here and there.
I haven't started a business in spare time, but I've put similar amounts of time into various open-source, unpaid projects.
I'd second the guy who said, "do something you really care about." I find that programming stuff that motivates me at home makes it much easier to keep writing the grind-work code at work.
Of course, there's a lot of stuff in starting a business that sucks. I'd say to try to arrange your work so that you're writing code you like when you're already feeling pretty burnt out, and doing more "normal" business tasks (write documentation, set up servers, do paperwork) when you're more energetic.
Writing code to refresh yourself isn't perfect. And starting a business is a lot more than just coding. But it's a hack that can help a fair bit, especially in the more coding-heavy sections of starting up.
Caffeine. I know one word responses are generally frowned upon here, but seriously that was how I do it.
I don't want to work on anything. I have just put the kids to bed. Its 9pm. Only a red-bull, or a pot of coffee, or maybe just a diet coke or tea can get me going again. That and music. I'll put on some music with headphones and its kind of like a signal to my brain that its time to start coding again.
Pretend you have Gordon Ramsay, or someone from your life who can act like Gordon Ramsay, yelling at you.
Here's my inner monologue when I know it'd be better for me to do something but I'm too "tired" to get it done: SHUT THE &@# UP YOU (&@#ING WHINER. DO YOU WANT IT OR NOT? JUST (*@&#ING DO IT.
This is really important to me. Every second "lifehack" post is about getting up all bright-eyed and bushy-tailed and being productive in the mornings.
But what if you've got 8 hours of boredom/frustration/pointless cubicle existence, a family meal and some kids time to get through before you need to kickstart your brain? How do others manage that (legally, without drugs)? Personally, it takes about 2 hours before I start getting being productive and getting stuck into my side-business (i.e., 10pm)
Actually, my own situation is slightly different. I meet the demographics (married, kids, age, full time job)--I just have a problem with getting to 9PM and making the choice of "I can spend four hours now, or no hours", and not liking either one.
I'd love to take smaller chunks but it seems if I work I get kind of wired and it's harder for me to settle down. Also of course the larger chunks are more effective. The massive breakthrough for me would be improving how I maintain mental state between sessions. I actually have this issue also in my day job, house projects--you name it. Being able to sit down and instantly know what I was working on, where in the process I need to be, what the next step is--that is my biggest impediment to the side gig and I have been trying to solve this for years.
The best thing I've found is joining a gym, after lifting some weights and doing some cardio, my body is tired and my mind get's refreshed allowing me to get more focused work done... that's just me though...
Did you work on your business before the work day started? Or something different?