I would say this really depends heavily on how motivated you are to begin with. When I was working on my side project while I had a full time job, I would:
1. Get off work at 6 and get home at 6:30.
2. Eat something very simple (no carbs because it will make me sleepy)
3. Start working from 7:00
4. Work till 6:00am (that's 11 hours, which is 3 hours more than my day job)
5. Go to sleep at 6:00 and wake up at 10am and go to work
6. Minimize lunch time and take a nap.
This was possible because I was super motivated. If you're not excited enough about something that you would go through all this trouble, then it's probably not worth investing your time in. That's why I think you're asking the wrong question if you ask "how do you keep your energy?" You don't. You will be always tired and you will not have a balanced life while you do this. But at least you are doing something that means a lot to you, and that's the main factor that helps you keep going.
Of course it is not sustainable to keep going like this for years with no break. So you should take a break once in a while. In my case, at times I would feel very tired or start feeling like burning out. Then I would just take a couple of days off from doing ANY work. Go out and party, watch a movie, do all the "bad" things I would never normally do. I think most people who haven't tried this would say this doesn't work. But from my experience, just a couple of days of doing absolutely nothing is enough to get me back on track--that is, assuming that I am excited enough about the project to begin with.
So if this model doesn't work for you, it probably means you should find another project to work on.
Whatever works for you. But don't knock people for using a different method. I've been very successful while getting a full night's sleep. Yes, I am working a few less hours, but -all- of my hours are much higher quality. And by taking short breaks throughout the day, I don't feel stressed, I get a lot done, and I'm not basically dying for a few days off. It's possible to have some balance and still get loads of things done.
I agree with the sentiment though-- you really do need the motivation to just DO it. I get good sleep, but I do work longer hours than most people, and I've done so for years. But I genuinely have been only getting healthier and less stressed over time. Work smarter, not harder-- and I've just been getting smarter about how to handle my time.
Depends on what your goals are of course. Quality of life is a big one for me, and that puts my health high on my priorities-- I can't enjoy my riches if I'm sick and dead. But sometimes it's "I can't enjoy my health if I don't have money to eat" so I get the flip side, cause I've been there in work-til-you-drop mode out of necessity.
Wow, this does seem intense. Did you work through the weekend? Did your performance at your day job suffer? How did you manage to keep focused during the late night/ early morning hours?
Yes, weekends/weekdays didn't really matter. I think I did take a long sleep once in a while during the weekends. Then I recover.
Most of the times I would work like this for a 2~3 weeks to a couple of months without being exhausted. But when that does happen, I would take a break for as many days I want. Normally this break never lasts over 3-4 days. (Like I said, it is important that you are working on the right thing. Otherwise you will never pull this off. For example if the main motivation for your work is you're just looking for some easy way to create a side project that will give you good enough passive income, you are probably not passionate enough about the problem and will give up. In my case I truly believed in what i was working on so it didn't make sense to just go slow on it)
As for my day job performance, it didn't really suffer because most people don't really focus 100% at work anyway.
While I was going through this lifestyle, I tried my best to stay disciplined. For example, I would start working immediately after I arrive at work, with no web browsing. And no web browsing while I am working. If you stick to this principle, you'd be amazed how much you can get done in half the time you normally spend at work. Then with the extra time I have on my hand I would take a nap etc. so I don't get too physically tired.
That is not really related to this thread since this is about how to "start a company with no free time" (hint: there is no such thing as "no free time"), but to answer your question, I did reach my goal and went above and beyond.
Yeah, i'm not advocating that you do this until you burn out or die. I think the most important part is that I would sometimes just stop working when I don't feel like it. And don't do anything, or sleep for 12 hours, or whatever. Then soon enough I will want to come back.
Sounds like you might be always prioritizing your office work over your own projects. If you haven't already, you might want to try this, categorize your tasks according to this chart:
Your side project tasks probably mostly fall into the Q2 box, unless you're getting ready to launch or something then Q1, and your work projects will be spread all around.
Spend your office time according to the 'strategy' for each box (mostly Q1, some Q2), don't stay late at the office to work on some Q3 nonsense, don't work weekends on office related things.
Go home as early as possible, show up to work as late as possible. Use the extra hour in the morning/evening to get knock off a task on your side-project. Ask to work from home 1 or more days out of the week to cut out commuting time.
tl,dr; spend less time on office work and more time on personal work
Often, when I'm struggling to find energy for after hours projects, I find that it's because I'm neglecting ancillary tasks such as eating nutritious meals, exercising and giving my brain down time (usually these can be combined by cycling etc), and planning my work in advance so that the barrier to start each day is low. Other times I'm overwhelmed by stress or sheer number of tasks (which can again be mitigated with more planning)
A sibling comment says that lack of energy indicates low motivation and that you should find a new project. With due respect to the commenter, this is not useful advice. If you are interested in completing a project, you have enough motivation to do so - what you may not have is the right environment around you. So identify what's stopping you from working, and get rid of those road blocks. Some times they aren't obvious and can take some time to identify, but keep paying attention and eventually you will spot them.
Also it's tough to stay really excited about something for years. I find the bursts of energy come in fits and starts. There are days the code just flows and others where I can't seem to motivate myself to work for more than fifteen minutes at a time.
Any time you have to work hard for a long period of time, the trick is to take scheduled breaks. You don't need a long break either, just like 5 minutes every 30 minutes throughout the day will keep your energy up a lot. I'll come home, eat dinner while watching something fun, then get back using that pattern.
I think for me the other thing is -- don't make it bigger than it is, like don't psych yourself out. Yes, it's hard to work from morning to night, but it's just hard, not impossible.
And I think being physically good--eating right, sleep enough, and exercising, yes it's tired advice but that's how you get "energy".
I've had a lot more success programming in the morning before going into the office. There might not be as much potential time to work, but I've found myself making more progress getting 30 minutes done a day every day than the intermittent multi-hour blocks I'd program when I had enough energy/motivation after coming home from work.
A nifty trick. It is also not just about the hours you can get out, but also about getting some premium hours with focus and flow. If you do it in the morning you have more of these for your own product instead of for your day job.
1) Drink your caffeine like you would be taking a medication (i.e. regular doses at regular intervals)
2) Don't consume too much caffeine.
I drink 4 shots of espresso in the morning and 4 shots later in the evening. I used to drink 12 shots total (4 shots, 3x/day), but began to notice that I was suffering from adrenal fatigue where I could function even less if I didn't get the first dose in and each dose didn't last as long at keeping me wakeful, so I cut back to 2x/day.
Along with that, have a proper diet which may include certain supplements (Vitamin D, B12, fish oil), and make sure to get exercise in at least 3 times per week focused, and get up and walk around every so often, doing air squats or something, or simply take a walk around the block.
For me most of the energy was lost during my commute, so I switched to working remotely.
Surprisingly enough limiting the time you spend on writing code after work (to 1-2h a day) also helps. This way there's less pressure to have something finished each day (because it's impossible in such a narrow timeframe) and more time in-between coding sessions to think about the design.
Most of the time my after-hours code is much more thought through than what I create at work.
How do you keep your energy up to code in the evenings on your own project, after a full day of coding at the office?