
Waking up at 5am to code - city41
http://www.mattgreer.org/post/2fiveam
======
nhashem
A lot of commenters have talked about the pros of this routine, and there are
many. Few interruptions, working while your mind is fresh, working within a
regimen, etc.

However, if you don't have an equivalent amount of discipline on at night to
get enough rest, you will quickly burn yourself out. I did this routine for a
lot of the second half of 2011, and since I'm a night owl by nature (going to
bed at 12 midnight is 'earlyish' for me), the lack of sleep quickly caught up
with me. My project was actually getting some traction though, so I basically
spent about four months in a sleep-deprived haze and consuming about 400 mg of
caffeine a day just to function.

So I guess what I'm trying to say is, if you're like me and you go to bed at
1AM, wake up at 9AM, and go into work at 10AM (a very common engineer
schedule), then it's not just a case of setting of your alarm clock but really
adjusting your lifestyle so you're not fundamentally sleep-depriving yourself.

~~~
tomkarlo
The caffeine is a vicious cycle (I've been there.) When you're short on sleep,
you need it to get through the day, but the side effect is you end up staying
up later than you need to. Also, if you want to get to sleep, avoid screens
(TV, computer) for the last hour or two before bedtime and you'll find it's a
lot easier (E-ink readers like the Kindle are great for this.) It's hard to
switch gears from the stimulation of TV or a game and go to sleep unless
you're already overtired.

A lot of this also depends on age, I suspect... I used to be a 1AM-type person
in my 20s but as I've grown older, I find I naturally wake up at 7 AM or so
anyway. By 11pm or so, I'm geting pretty useless. My sense is this happens to
lots of folks as they get into their mid-30s, even if they don't have kids.

~~~
BCM43
_Also, if you want to get to sleep, avoid screens (TV, computer) for the last
hour or two before bedtime and you'll find it's a lot easier_

Is there evidence for this? I've heard it's true, and it seems to be from my
personal experience, but I've never seen any kind of a study of it.

~~~
chrisdroukas
I'm not sure about the two hour timespan, but brightness appears to have an
effect on sleep latency and the time it takes to fall asleep.

Studies [edit: PDFs]: [1] <http://www.journalsleep.org/Articles/250312.pdf>

[2]
[http://www.sciencesleep.org/ziliao/Effects%20of%20playing%20...](http://www.sciencesleep.org/ziliao/Effects%20of%20playing%20a%20computer%20game%20using%20a%20bright%20display%20on%20presleep%20physiological%20variables,%20sleep%20latency,%20slow%20wave%20sleep%20and%20REM%20sleep.pdf)

[3]
[http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2869.2005....](http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2869.2005.00463.x/pdf)

~~~
polyfractal
Definitely install F.lux: <http://stereopsis.com/flux/>

It adjusts the color temperature of your monitor as the sun goes down. As the
sun sets, your monitor becomes more red/pink. It takes a little while to get
used to it, but I absolutely cannot stand normal monitors at night time now.
When I occasionally disable F.lux to watch a movie at night, I'm blinded by
the bright blue glow.

~~~
derekp7
I've recently done this, and it helps when I'm on-call and get woke up in the
night. I can now fall back asleep faster. Another item that helped, I've put
oil lanterns up on the walls in my home office. I just got to remember to
light them instead of flipping on a light switch, and all is good.

~~~
bitops
That's a nice touch I hadn't thought of. Any ones you like in particular?

~~~
derekp7
I picked up a couple of generic ones, I think they are made by Lamplight
Farms. They include a bracket that hangs on the wall with a reflector plate.
Other than the wall mount, most of the oil lamps are about the same (that is,
the ones in the $5 - $20 range). Of course, I picked up these ones about 10
years ago, and I can't find this particular model any more. I can only find
the table top ones (could probably put it on a shelf, with a mirror behind it
for better effect).

You can use either lamp oil or kerosene in most of them, the lamp oil doesn't
stink as bad (and if you get the "ultra pure" oil, there is hardly any smell
at all). Also, last time I had a power outage I was able to keep the flame lit
(on a pilot light height) through the night with hardly any oil used (and it
made a nice night light -- don't know how safe it is though).

------
alinajaf
> Enjoying the work is key

Recently I've discovered that this mindset has been detrimental.

Sometimes hard work is supposed to be hard. If you rely on passion or some
sort of intrinsic motivation, then as soon as you come to a task you don't
want to do (i.e. the 90% of any project that doesn't involve coding)
procrastination sets in. I worked mornings non-stop on my little side project
for around 6 months last year and slowed right down as soon as all the 'fun'
stuff was over.

Accepting that the work is sometimes going to suck is a) more realistic and b)
more empowering. If you get used to short focused bursts of work you don't
feel like doing, then there is quite literally nothing you can't achieve if
you put your mind to it.

~~~
darklajid
Maybe I just read it differently, but for me this article described a way to
cram things that I _want_ to do (other people might play the violin every
night at 20 for fun?) into the early morning hours.

You're making a good point, _if_ we're talking about doing business in these
hours (like trying to progress on your own little startup idea). If you just
want to meddle with a small project, experiment with this $randomNewTech or
improve your code for the fun of it, then this attitude of 'It should be fun'
seems perfectly alright.

~~~
alinajaf
I think doing work you don't like or that you find difficult is compatible
with new tech you want to learn just for the heck of it.

As an example I'm currently trying to deep-dive on Natural Language
Processing. I'm a middling programmer but quite useless at Maths, so I know my
weak points are going to be the stats used in NLP.

In this, I've picked up the most highly recommended university level NLP text
I could find I'm putting in a couple of hours a week studying it. After about
thirty minutes in, I begin losing focus and it starts becoming really easy to
think of distractions or reasons why I shouldn't be doing it.

It's at times like that when it helps to realize that no, I should be doing
this, I don't need to take a break, I should just power through. I'm not
necessarily enjoying everything I do in these sessions, and it's definitely
hard work in unfamiliar territory.

I've found that concentration is like a muscle, the more you train it, the
harder and longer you can maintain it without taking a break. For me,
expecting the work to be fun sets me up to give in as soon as I start losing
focus.

Interestingly, after going at work 100% for hours at a time, I actually feel
way better than I do than after a half-arsed attempt at productivity. Usually
I've created or learned something, and I don't have that guilty feeling that I
could have got more done today.

------
alexwolfe
I've tried this approach and others. I'm sure for some it can work but
ultimately I found you can't cheat time. If you wake up at 5am by 2pm you
toast (mentally at least). I've found no real secret to gain extra real hours.
The reality is that your mind can only function productively for so long each
day. The productivity you feel at 5am is the same you'd feel at 8:00am it just
seems more amazing because it's happening at 5.

The bottom line is you have to find what is sustainable in the long run.
Regardless of how early or late you wake up the key is coming up with a
consistant schedule that maximizes your productivity. Only you can figure out
what the schedule is. It's certainly great to try new things and see what ends
up working for you. Good luck.

~~~
GigabyteCoin
If you wake up at any time of the day, mid way through it (no matter when)
your brain "is toast".

That is why so many sleep scientists suggest naps is because they have proven
that naps are beneficial to mental fatigue.

~~~
pjscott
Really? My brain is semi-toast _until_ about the middle of the day.

~~~
enqk
Maybe due to over use of caffeine?

~~~
nkoren
I'm the same way, and my friends had the same reaction as you. They suggested
that if I cut out caffeine and sugar then my body's own natural energy would
resurface, and I'd stop being so groggy until the mid-afternoon.

So, I listened to them, and for 9 months I consumed no stimulants at all.
After 9 months of this experiment, I was -- and I know the story isn't
supposed to work this way, but it did -- consistently groggier and crankier
than I had ever been before. So I went back to caffeine and have had no second
thoughts about it since.

~~~
hopeseekr
I say with __conviction __(having the same experience) that this is because
your endocrine hormonal system is __seriously __out of whack. Probably
hypothyroidism, but possibly hypopituitiarism or even lack of testosterone.

Go see an endocrinologist, stat! Your quality of life, and even longevity,
could be at serious peril.

~~~
nkoren
Hm. You may have a point. This was back when I lived in America, and seeing an
endocrinologist would have required winning the lottery or something. Now that
I'm living in a more civilised country, perhaps I'll give it a try...

------
bri3d
Love this - a simple personal anecdote/retrospective rather than a self-
promotion or "everyone should do as I say" piece.

You could solve the girlfriend + music issue with a nice set of closed-stage
headphones. I love my AKGs. But I'd actually A/B test with and without
headphones - without the distraction of office noise, no headphones/music
might actually be helping you focus as well. I find that even with a solid,
no-thought, tried and true playlist of entirely ambient (or even classical)
music, I still find music causing my mind to wander from time to time.

I might have to try to sell the girlfriend on this idea soon.

~~~
johnm
Yes, in the morning it's so quiet that I find music distracting.

The one thing I've added is a nice room air filter and run it on low. The
quiet white noise from the fan provides a smooth background.

------
kabdib
In the last six or seven years I've been up regularly at 5am or so. I can get
an hour of work done before the rest of the household wakes up. It's great.

My inspiration was Gene Wolfe, who wrote _The Book of the New Sun_ in the wee
hours, and held down a day job as a technical magazine editor. [I'm not
claiming my code is anywhere near as great as the wonderful writing that Wolfe
did, but the early hours are definitely some of my most creative time]

A few rules I have:

\- No email. This just starts the whole stress machine going. I'd rather not
have /any/ human contact, and if something's fallen off and broken in the last
eight hours, it can wait another two or three.

\- No Reddit or other black-hole-of-surfing sites (though I do check HN --
this may change if HN becomes too Reddit-like).

\- Coffee is ready to go (set up the prior evening).

~~~
dvdhsu
> _My inspiration was Gene Wolfe, who wrote _The Book of the New Sun_ in the
> wee hours, and held down a day job as a technical magazine editor._

Wow. That's really interesting. I was actually going to give this a try
because of Robert Pirsig, who wrote _Zen and the Art of Motorcycle
Maintenance_. Here's how he did it:

 _In a 1974 interview with National Public Radio, Pirsig stated that the book
took him four years to write. During two of these years, Pirsig continued
working at his job of writing computer manuals. This caused him to fall into
an unorthodox schedule, waking up very early and writing Zen from 2 a.m. until
6 a.m., then eating and going to his day job._ [1]

Funny he also writes technical literature (computer manuals versus technical
magazine editor).

> _the early hours are definitely some of my most creative time_

This is something I've noticed too. When writing (usually essays, but
sometimes code), I'm almost always more productive very late night/early
morning. I don't know of any reasons (other than the obvious: you're not being
distracted), nor do I know of any studies. Are there any out there?

1\.
[http://en.wikipedia.org/wiki/Zen_and_the_Art_of_Motorcycle_M...](http://en.wikipedia.org/wiki/Zen_and_the_Art_of_Motorcycle_Maintenance)

~~~
gizzlon
When writing my thesis I was very productive at night. Guess I was too tired
to procrastinate and over-think things.

~~~
aw3c2
I am missing the right words but one gets more creative in the evening. Many
people can relate. A friend of mine worked from 1800 - 0300 for his master
thesis, because the words "flowed" better.

------
Kavan
When starting my business, I was working as a derivatives trader. The job was
stimulating but I did not love it. It was not creative enough. Creative in the
purest sense of the world. We did not create businesses, rather create profits
through buying and selling.

I had to be up before 6am anyway to get in before the markets opened. We could
leave shortly after the markets closed though so I did most of my work time in
the evenings from 6pm to 10pm, sometimes later. And then on the weekends
(probably another 12 to 20 hours).

I think the important points are:

1\. Enjoy the work. If you do then you don't feel like it is work, rather a
hobby.

2\. Make the most of your 'day job' time. I would squeeze in gym whenever
things were quiet. I would answer emails on the toilet. I would read the
Financial Times and then sneak in Tech Crunch (I was trading TMT so I argued
it was important to view trends).

3\. Stay disciplined. A lot of the time I would get excited and stay up later.
Rolling out of bed at 5:30am to get into work after being up since 1am does
not feel great. You can do it once during a week, but twice and you really do
become a zombie for the rest of the week until you get the time back.

I did this for two years until I managed to get some funding to take it full
time. It was super tough, especially for my girlfriend. But I loved it because
I believed we were building a project that would change the world. Whenever I
felt down I just watched SJ's Standford speech and it would pick me up.

"Your work is going to fill a large part of your life, and the only way to be
truly satisfied is to do what you believe is great work. And the only way to
do great work is to love what you do. If you haven't found it yet, keep
looking. Don't settle. As with all matters of the heart, you'll know when you
find it. And, like any great relationship, it just gets better and better as
the years roll on. So keep looking until you find it. Don't settle."

------
stephencanon
My wife is a surgeon. I'm up at 5am with her, drive her to work, then sit down
and start working myself around 5:30. I find that I'm fantastically productive
from then until about 9 or 10am. I take a long lunch break (and go running or
xc-skiing depending on how much snow is on the ground); aside from that I
don't have any trouble going straight through the afternoon, though my
afternoons are less productive (I usually spend them meeting with team members
and doing more routine work because of that, which works well because that's
when everyone else is around).

In order to make getting up at 5 livable, we're asleep by 10pm. We were both
night people once upon a time, but I really don't feel like I miss it.

~~~
gte910h
OT: Why do surgeons start work at 5 am?

~~~
joeyo
Table time for the first case of the day is usually quite early, as you want
lots of time in case there are complications.

~~~
gte910h
That doesn't seem to change the available time. You can start at any time of
the day, there still the same amount of available time (ie 6-1800 hours is the
same as 8-2000 hours)

------
mnazim
This is a really effective way to get a lot things done. In summer 2009 I used
to wake up before sunrise and absolutely loved it. To this day, I still wonder
why I did not continue doing it.

My 2 cents:

Make sure you have something good (preferably healthy) to eat readily
available when you get up. It should be something that does not require more
than 10 min of preparation. Otherwise things tend to get a bit boring.

If you happen to wake before sunrise. Take mini walk in you garden or backyard
and catch those 10 - 15 minutes of sunrise. It will absolutely super charge
you for rest of the day.

EDIT: Let's admit that we all have a small nest at home specifically for work
or related activities. Move this nest out of your bedroom. Keep your laptops,
iPads, PCs or any such devices out of your bedroom. Switch off your phones
during nights and do not switch them back on until after your morning
sessions.

(PS. My uncle is a neurologist and he tells me that for people who work during
day and rest during nights, certain hormones are secreted in the mornings that
help us in staying fresh and awake. The catch is that they are only secreted
if you wake before or around sun rise time.)

~~~
bitops
That's interesting. When I was in college I used to wake up at 5am every
morning. I'd always start my day by taking the trash outside and looking at
the sun come up over the ocean. (I went to school in Santa Cruz). Those short
moments always set the tone for the rest of my day.

~~~
alanfalcon
> I'd always start my day by taking the trash outside and looking at the sun
> come up over the ocean. (I went to school in Santa Cruz).

I suppose I understand what you're trying to say, but the idea of watching a
Pacific Coast sunrise from Califonia (while not in an airplane or other fast-
moving vehicle) breaks my mind a little. But your comment also made me realize
I'd lived within a half hour drive of the Pacific Ocean for most of my life
yet have no clear idea what a beach sunrise would be like. I need to add that
to a list.

~~~
b_emery
bit late but ... you can also see this from the santa barbara harbor. I used
to surf there in the early morning and the sun would be rising _behind_ the
waves. Not a lot of places on the west coast that that happens!

------
97s
I am a stay at home dad recovering from AML stim cell transplant. I have been
trying to find time in my day to work on a personal project that I need to
develop for myself and I think has a potential for profit. However with my
busy 1 year old son waking up at 8AM(sleeps all night, which I am super
thankful for), I can't find the time during the day to focus on a project. I
get spurts during his 30-40 minute naps and when he is playing real good by
himself, but as I get focused I am quickly pulled away. I have tried to be
productive when I put him down at night, but I find I need to spend this time
with my wife.

It is looking like I might become a 6AM coder soon. Seeing that my day starts
at 8AM.

I had thought about getting up this early, but I just didn't think I could
make it through the day with my semi-low energy levels.

However, I am thinking if I get up at 6AM, I can nap when my son naps for
30-40. As I read another post on HN that it actually is great to take these
short duration naps.

~~~
johnm
People generally have two high-quality stints in them per day. Putting in a
sleep cycle (be that a power nap or up to a full cycle) between them works
wonders for all sorts of benefits physiologically and creatively.

------
dmragone
I would love to see a simple service that groups people who are willing to
commit to getting up at the same time each day in order to hold each other
accountable. There doesn't need to be anything significant - maybe it's just a
matching service, letting people figure out for themselves how they can "check
in" to confirm they are up and working at 6am (or whatever time is chosen). I
know that I definitely can commit to something like this (e.g. going to the
gym early) if I have at least 1 other person I'm doing it with.

~~~
Selvik
This is a great idea. Probably doesn't require any groundbreaking technology
either. Dear internet, please make this.

EDIT: An iphone app that let's people call and text each other as their
profile name (anonymously) would probably lower the barrier to sign up for
something like this.

~~~
jacalata
Maybe even a combination of this with the idea of pledging money if you don't
achieve something? How much more motivated would you be to roll out of bed at
6am if you knew that skipping it would cost your buddy cash?

------
tjr
Could someone please expound upon the term "Kanban board", as used in this
article? I am not understanding the connection between Kanban and what the
author is describing, though I would like to.

~~~
Stormbringer
It's some kind of sticky-note board / to do list thingy.

Have a look over at JoelOnSoftware (?? Or was it the Fog Creek Site?)

They have a free online version of something similar that they are trying to
hit the big time with. I forget what it is called though.

~~~
benregn
You are talking about Trello from Fog Creek.

------
radagaisus
Mornings are great. Yesterday I woke up at 4 and saw that Facebook Hacker Cup
is on. I finished all the problems before my work day started - how awesome is
that to start your day?

One thing I don't understand is how people can focus on a couple of projects
simultaneously. This year I've worked a lot with javascript and backbone, and
I have a folder with ~4 open source projects I wrote that I'm not going to
publish. Why? Because then I'll shift my focus from delivering the product to
delivering open source.

It takes me a few hours every Sunday and Friday to get in the mood of 'this
project is going to kick ass'.

~~~
grncdr
This might be controversial, but have you considered opening an
anonymous/throwaway github account and publishing there? I mean put them up,
make an announcement, and then feel free to ignore any social pressure to work
on them, at least that way the code is out there where somebody else _could_
pick it up and improve it.

Just seems like a weird reason to not release code you intended to be open
source.

~~~
radagaisus
Actually never thought about. I recently wrote Verdict and published it as a
gist. It was horrible! People asked me for help! And I created a full repo and
a website instead of working. <http://radagaisus.github.com/verdict/>

------
5vforest
This sounds horrible... and like it would ruin my productivity towards the end
of my work day.

How about waking up early to exercise?

~~~
miles_matthias
I tried waking up early to exercise, but I can't motivate myself to get out of
bed to exercise.

I could motivate myself to get up if I were working on my own projects. I'll
have to try this.

~~~
brown9-2
It might help to think of fitness as a self-improvement personal project.
Track your accomplishments like stats in a video game, see fitocracy.com for
example.

------
GigabyteCoin
I have been doing the exact opposite of this strategy for some time now. Going
to bed at 5am. Those 6 hours of coding between 11pm and 5am are some of the
quietest you will ever experience in Toronto where I live at least.

If I woke up at 5am, I would b _HORN_ e cons _HORN_ ta _HORN_ ntly distrube
_HORNNNNNNNN_ d.

~~~
loopdoend
The noise pollution in Toronto is obscene and I am thinking I should move
somewhere else. I live by the Gardiner, and I also code at night, it is bliss,
there are virtually no cars on the road. No noisy neighbours or horns or
traffic or street cars.

~~~
GigabyteCoin
Wow, was just thinking I should move to SV the other day due to lack of a
hacker community and look at this, two relevant Torontonian comments!

Agreed, noise pollution is horrific. I don't have a problem at all with new
york's latest "fine for honking" tariff:
[http://www.huffingtonpost.com/2011/10/25/nyc-taxi-drivers-
to...](http://www.huffingtonpost.com/2011/10/25/nyc-taxi-drivers-told-to-
_n_1030767.html)

------
samdelagarza
Matt,

Thanks for sharing. I did the same for several months, I would call each
session a mini iteration. And I kept a kanban board on my moleskine...which is
imperative. I had times where other things would take precedence and I would
stay away from my project for several days but due to my physical kanban I
could easily pick up where i left off.

What I did different is this: at each iteration i would set a goal that I new
I could accomplish within the mini-iteration (1-2 hours, sometimes a little
more). Then at the end I would check off my accomplishments and would quickly
"trim my backlog" and create a list of "NEXT:" for the next time. Then the
next time I sat down I would review this list and adjust it as necessary and
begin.

I found that have a physical notebook was beneficial because at the first sign
of discouragement I could easily look back and see where I was just a few
weeks ago or a few months ago. And nothing feels better than marking something
complete. My lists are segmented by each iteration by day and have three
categories: DONE, TODO, NEXT. it worked great for me.

Though I never delivered my product it was a great talking tool at an
interview that led me to a job with a 30% pay increase. And I'm ok with this.

------
JimFMunro
There's probably little to add here, but since I've been doing a 5am coding
period each morning for the last year.

First, I am 42, married with 1 kid, so that may explain some of it. ;)

Some keys: 1) Coffee maker on autobrew, but not immediately upon waking. Give
yourself and your stomach time to wake up.

2) Eat and/or drink something easy upon waking. I go for the MixOne protein
shakes, or OJ.

3) A clear goal of what to accomplish that morning.

4) Get enough sleep or you will burn out and have to stop for a time period of
recovery. I go to sleep or rather, my body & mind collapse, at 9PM. Asleep by
9:30. I am able to get 7-8 hours of sleep every night. More than plenty.

5) Don't use anything with a screen (except maybe an e-ink Kindle) before bed.
Reading helps me to get right to sleep.

Due to having a kid in preschool, I generally am limited to 1-1.5 hours in the
morning. Which is just enough time to do one task and very little else, hence
the need to focus on something.

------
Frostbeard
I wish it were possible for me to do something like this during the week, but
it isn't. I wake up at 05:30 as it is, and I'm out the door and heading to
work by 06:30 (that's an hour to SSS, prepare and consume breakfast, take out
the trash, scrape the windshield, and whatever else might need doing). I don't
get home until after 17:30. I'm typically occupied being a loving and
attentive father up until 20:00 or so. Assuming I want to get 8 hours of
sleep, that means I'm left with one and a half hours to split between personal
projects and my wife during the week.

On the other hand, I do get up just as early on the weekends, and it's
probably my most productive time of the entire week, up until my kids get up.

~~~
unreal37
A question. Your job takes 11 hours out of your day roughly. I assume you only
work 7.5 or 8 hours like is standard. Does that mean you have a 1,5 hours each
way commute (3 hours total)?

So you spend 15 hours a week, or 70 hours a month commuting?

Maybe you should move closer to work? Or work from home a few days a week if
your job allows. I have a 5 minutes each way commute. I don't understand the
voluntary 1.5 hour commute.

~~~
Frostbeard
I actually live only 10km away from where I work, and my commute amounts to
less than an hour per day.

I'm at the office by 0700 and I leave sometime after 1700. My work situation
deviates significantly from a programmer's "standard" in a lot of respects,
unfortunately. I do get paid for overtime at least, but I'm beginning to
question whether it's worth it.

------
djhomeless
I did something a bit more extreme for over a year - and I have a family to
contend with. But I wasn't coding, mainly product dev a(wireframes, specs,
etc) and some hacking.

Schedule was:

\- Hang w/family from the time I got home until their bedtime, roughly 9:30
PM.

\- 2 hours of work, then 30-45 min of useless TV (Family Guy or TAR)

\- About 5 hours of sleep

\- Another 2 hours of work before hopping on the train

Somehow I kept this up for over a year, though it has to be said that I
curtailed the workload to just 2 hours a day (and a bit more sleep) over the
weekend to spend more time w/the family.

I think that's the only real guidance here - as long as you can budget
adequate time to recharge the batteries, then you can keep this up for the
long haul. For me, hanging with the family kept me fresh, kept me sane.

------
j45
This totally works. Why?

You put your best and most creative energy into your own project.

Instead of whatever you have left in the tank after a long day of work and
then doing home stuff and then finally settling in.

Getting out of bed isn't a problem when I'm so excited to work on something
and I know what exactly I need to do -- I make a list before I go to bed.

Lack of distraction plus a full head of steam and energy is a great
combination.

I try to do this as much as possible because it's so rewarding. Breaking the
cycle with a late night or the weekend seems to be my main obstacle, I'm
thinking of waking early 7 days a week and becoming like my old man, lol.

Will work/job suffer? Our work/job often needs our attention to detail more
than our best and most creative effort every day.

------
k-mcgrady
Interesting post. I used to do this myself but eventually found it difficult
to get up so early. I've recently been trying out something similar though.

I find it difficult to get to sleep often lying awake for up to 5 hours before
falling asleep. As I am a freelancer I then tend to make up for it by sleeping
in late (as I don't have a job to go to).

I have recently been following a schedule of sleeping 2 nights and then
staying up 1 night. This night without sleep I use for work and it also helps
fix my problem of getting to sleep for the next 2 nights. I find that I am
extremely productive working through the night and gain in productivity by
falling asleep more quickly and getting up earlier the other 2 days.

~~~
freshhawk
I've been in this cycle before. I still almost fall into it naturally, but
less so than when I was in my early twenties.

My experience was that it isn't sustainable, the day after you stay up all
night just gets worse and worse the longer you are on that schedule. After a
short time, for me, that day was so unproductive that it more than destroyed
any gains made in those extra hours or the encouraging "reset" to my ability
to sleep at regular hours.

I have to admit that the early night and long sleep after that day was the
best sleep I could get at the time.

The rest of it was pretty shitty, I slept like a dead person and woke groggy.
Good sleep habits and a regular schedule have a domino effect, improving all
sorts of stuff, definitely worth trying to stay off that sleep 2, stay up for
1 cycle in my experience.

~~~
k-mcgrady
It's been working for me so far but I can see how it would be hard to
maintain. I don't expect to keep it up forever. Although it's working now I
doubt it will last more than a month. Good to hear someone else experiences
this sort of cycle naturally. Sleep is a big problem for me and really hurts
my productivity so I'm always trying to figure out new patterns that might
help, at least short term.

------
mathattack
It wounds like the poster has managed two disciplines very well:

\- Managing the sleep schedule. (Getting to bed to get up early)

\- Managing the work schedule. (Kanban system)

I have no idea what his product is, but it's hard to imagine that he won't be
successful over the long term with habits like this.

------
plasma
Thanks for this post, I will need to try it.

I agree the few times I've been up early to code (even to catch up on some
work) its been good, felt like I got extra hours to the day (well, I guess I
did!) even before I officially started.

I think then after 5pm going to the gym or relaxing can be a good choice
because I've already done my 2 hours on my side project.

It does get exhausting doing extra work after 5pm (after you've taken a break,
eaten, done other things etc) so I like the idea of doing it early.

I may wake up even earlier to get to gym in the morning, as I liked that too.

I definitely waste several hours at night just messing around, avoiding going
to sleep, which would be better spent being asleep so I can get up early.

~~~
sumukh1
This tool might help you to figure out the best time to sleep so you can wake
up rested. <http://sleepyti.me/>

------
duck
Another option that you should look into is switching to a four day, ten hour
each day schedule. Of course your employer has to approve and I’ve seen a lot
of people that can’t keep up with the long days, but if 5am schedule works for
in the long term you shouldn’t have any issues with it.

I've done this for the last four years and it really works well for me. It
gives me the option to work on my personnel projects on my off day (Friday for
me). It also forces you to wake up early and the morning always seems
productive. The best part is you can be flexible with that time, like on some
weeks maybe you take a long trip or family/friend time.

------
wallunit
Why is waking up two hours earlier in order to do stuff like coding on
personal projects so much better than staying up for two more hours at night?

It won't make the day longer. Each hour you wake up earlier you will also
probably go to sleep earlier. Of course you could also sleep less, but also in
that case IMHO it doesn't make a large difference whether you add those extra
hours to your night or to your morning.

Some might argue, that morning hours are more productive. But for me that is
only true if I have slept well and long enough and it also implies that
whatever you do in the evening will suffer by starting your day earlier.

~~~
nickik
I would guess the if you code in the night your 2h turn into 6h. While if you
do 2h in the morning you have to stop and go to work.

~~~
brown9-2
I think this is the fundamental reason also. It's much easier to slip and add
more hours to the end of the day than it is to wake up even earlier than 5am.

------
TomGullen
I'm coding at 6am now, because I've been up all night! I don't enjoy it, but I
find it very difficult to want to go to bed at the right time. Working in a
startup time doesn't seem to matter so much I guess.

------
epaga
Quite the coincidence - I just started doing exactly this a few weeks ago, and
am fact am reading this at 5:30am my time (when I should be coding :P). It has
worked quite well for me as I work on my app.

I'm a bit more tired in the evenings and go to bed a bit earlier than I used
to, but seeing as how I would just waste time in the evenings playing Jetpack
Joyride, it's a very good trade to make.

I bought a coffee machine that has coffee waiting for me at 5am, and I also
use the Sleep Cycle app which at the very least provides a placebo for making
me wake up more alert. ;)

~~~
stephencanon
Exactly. Most people are far more distractible in the evening (partially
because there are simply more distractions available), so shifting your
schedule earlier results in less time spent on distractions.

------
devs1010
I've thought about doing something like this but I've realized I just can't
until I figure out a better commuting situation, either having a very short
commute or using public transportation. Sitting in traffic for almost an hour
on the way to work is rather draining to where if I'm going to do that I can't
seem to bring myself to get up any earlier than I have to as I'd rather use
the time spent driving to wake up so its not completely wasted

~~~
tikhonj
If you can use public transportation, you should _definitely_ try it. I'm a
student, but I also work part time in San Francisco; there is about a 30
minute commute. I am actually surprisingly productive while on the train
working on my random side-projects. Having something to do stops the commute
being a boring waste of time.

The one problem is crowding--if there are too many people, you might not get a
seat or otherwise be uncomfortable. I avoid this problem by travelling at off-
peak times, but this may not be an option. You should try it out and see how
it goes.

~~~
devs1010
Awesome, yeah, actually I'm planning to move to the SF Bay Area soon, I'm from
northern California originally and want to get back there, I think living
further out and using BART to get into SF would be fine as it would give me
some time to work on things, or even just to use my tablet and read up on
things, do research, etc. Just being able to relax and not have to watch the
road for the hour commute would be a lot better IMO.

------
dguaraglia
I used to do this a while ago, while working from home. I woke up at 6am and
had my breakfast right next to the computer, then would only do the 'morning
routine' (shower, walking the dog, etc.) after my wife had woken up and gone
to work.

It was incredibly productive. As the author say _the cost_ of those two hours
keep you focused (you know you are making that extra effort, so distraction
isn't an option.)

------
senith
Mary Kay in her book called this the 5 am club! She said the 2-3 hours she got
before the rest of her family were up was so productive that it was "almost as
if she had 24 hours a day extra to work with" Paraphrasing here but she said
he enabled her to manage her traditional roles of being a husband & mother in
addition to a full time & demanding business role.

------
tpatke
I have been on this routine for about 18 months. Waking up early in the
morning is not easy or fun, but the alternative is to work in the evening or
not at all. I find working in the evening really difficult because after a
full day of work and a nice dinner with my wife - I am not really in the mood
to "go back to work". Waking up early allows me to put my personal project
into a set routine. 2 hours every day - not 2.5 or 3 or an all-nighter. This
constraint is great for focusing the mind and making those 2 hours really
productive.

There is one downside. I really need to be asleep by 9:30 (I actually wake up
at 4:30). This is difficult to do when I meet up with friends. For example,
this week I have two meetups planned - both of which will probably cause me to
get home past 10:30 which means I am more likely lie in the next morning.
...and I agree with the OP - it is much easier to keep a schedule like this if
you do it every day.

------
donnfelker
This isbexactly how i lauched two products with a family with 2 kids 5 am
kicks ass. That remibds me... i need to go to bed.:)

------
robdoherty2
I did this for several months while I was taking the Stanford AI class. I got
up at 6, did coursework for two hours or so, and went to work by 9.

I found it to be highly beneficial for several reasons (some of which were
mentioned in the blog post): -since I am usually exhausted by the end of the
day, I found the early time to be really conducive to clear thinking -early
part of the day is so quiet-- no interruptions -I felt like I accomplished
quite a bit even before arriving at work, so I somehow felt more productive
even though I should have been more tired

I intentionally did not keep up the early time on the weekends and slept in--
btw, 8am felt like sleeping in :)

Since the class finished, I kept up the habit and wake up early to code or
read.

I admit it isn't for everyone, but it is worth a try for anyone who wants to
code after work but feels too tired or easily distracted.

------
liljimmytables
I did something similar for a while but other concerns pushed my routine out
of the window, and for the sake of my sanity I shouldn't have kept on with it
as long as I did. If I could recommend one thing to anyone thinking of doing
an early-morning stint, it would be to keep an escape route clear. Don't
commit to more than a week's work at once (you shouldn't be doing this anyway)
and make sure that you can unconditionally drop the project at short notice if
something comes up. Otherwise you will find that your work strategy is very
fragile and very explosive.

That said, the particular issues I faced were external to my early-morning
work strategy, and on a level playing field it is a wonderful way to do some
of your best work.

------
doc4t
For those of you, who as me, never encountered the "Kanban" method before here
is a comparison with SCRUM

[http://www.agilejournal.com/articles/17-articles/1737-what-i...](http://www.agilejournal.com/articles/17-articles/1737-what-
is-best-scrum-or-kanban)

------
jyap
He mentions he gets between 7-8 hours of sleep. So he is going to bed around
9pm to 10pm... Yeah, not really feasible for a lot of people because it would
mean family avoidance.

I usually work from 11pm to 1am on personal projects.

------
awolf
Another advantage: the first two hours of exerting your programming mojo each
day are likely to be the most potent. Applying this potency to your own
products and initiatives is a beautiful thing.

~~~
bhrgunatha
It's not universal though. I find (sometimes) late morning and (usually) late
afternoon are my most productive or potent times. I suspect everyone is
different. It seems that this idea though has the added benefit of bringing
more focus (due to less of the normal distractions.) For me, I think, that
would be the major difference .

------
alanmeaney
We’re currently doing our football pre season training and for the first time
this year there it involves a Thursday morning session from 6.00-7.00am (we
normally train 8.00-9.15p.m.).

This hasn’t been as unpleasant as I thought it would be and I’ve noticed that
the morning session ‘feels’ like it is evening time. Several of my team mates
have made the same comment.

I’m guessing this is due to an association in the brain (several years
reinforcement) between the activity (football training) and the time of day.

------
notJim
My problem doing this is the weekend. I like to go out to concerts and
occasionally bars with friends, which has me out until 1 AM on an early night.
Then I sleep in the following day, which destroys the whole schedule, since
it's the complete opposite of what I need to do during the week.

Compare my current schedule, which has me going to bed around 2AM most
nights—even if I go to bed at 5 AM on Friday, that's only 3 hours off from my
usual schedule, so it's much easier to recover by Monday.

------
andreiursan
I'm almost in the same boat with the guy that wrote the article. Like him I
also read 1year ago, on hn, about a guy who started to code on his projects
starting with 5 a.m. because in the evenings he spent time with his fiance.

After I read it I tried it for a while, and it worked, I had to stop because
then I was also a student and I was also working full time + I also had
allocated gf time.

I will try it again, I hope I can get more things done in this way.

P.S. Thank you for/for posting the article!

------
agentultra
5am sounds a little extreme.

I just arrive at work a half hour before I "should" be there. That's when I do
a little code kata or read HN. Then I grab a coffee and it's work time. After
work I go to the gym and coming home from that I find I have enough energy to
put in another hour or two on my side projects.

However, having kids might change that and make 5am more sensible... you might
at least get an hour before they're up and you have to get them ready for
school.

------
jayonsoftware
I wake up at 4.30 AM but code between 7 AM and 11 AM. So what do i do between
4.30 AM and 7 AM. I meditate, do a goal review and do my blog / book writing
work.

I wrote about this on my blog "Daily Routine of a 4 Hour Programmer"
[http://www.jayonsoftware.com/home/2012/1/9/daily-routine-
of-...](http://www.jayonsoftware.com/home/2012/1/9/daily-routine-of-a-4-hour-
programmer.html) if any one is interested.

------
derekja
was a post a day or two ago about creativity being highest in the early AM as
well. I do this in spurts but can't maintain it for long stretches...

~~~
johnm
It depends on the person but it's true for me. I tend to do my really
hard/deep thinking in the morning and queue up stuff that I can do the rest of
the day. The creativity that tends to appear more often later in the day and
in the evenings end up being the cool stuff that bubbles up.

------
jlembeck
I find that with the insane amount of meetings and interruptions I might face
in any given day that don't contribute to "coding time," this works really
well to ensure that I'm getting things done and to keep my mind fresh. I can
then engage on the business side of things later without having that nagging
feeling in the back of my head that something needs to get done.

------
nagnatron
Interesting that this is posted today as I woke up 45m ago and decided to code
on a side project. It's not voluntary but because I've got some time
difference issues.

Everything about the benefits is true, and since I'm not forcing myself to do
it, I have almost none of the side-effects. The biggest problem with it is
that it's incompatible dancing in clubs.

------
jakejake
I code at 5am too... when I've been kicking ass and rocking in the zone all
night! Going to bed at 9pm every day? No thanks!

------
jseban
One thing that he fails to mention is that this only works if you live with a
partner, as he does, since you're guaranteed some company throughout the day.

Otherwise it's going to be pretty damn lonely, since you'll be in bed by 10 pm
when most socializing starts.

You can't go to the movies, go to a bar, go dancing, go on a date, or even
watch a grown ups movie on tv.

------
altxwally
This idea has also stuck in my head since sometime ago (I think it was a
comment by @jrockway who said that he got up really early because at that time
there is nothing else to do but work), though I do not do it everyday, only
occasionally when I want to finish something... I will follow the site for
updates! :)

------
falcolas
This seems highly related to a recent poll - how many hours of sleep do you
need a night?

For example, if I tried this, I would have to go to bed at around 7:30pm at
night. For a number of reasons (including eating dinner at 6pm), this is
completely infeasible. A shame too, since a few hours of uninterrupted time
would be great.

------
da5e
Sounds like a great habit. There are some studies that indicate problem
solving ability is highest when you're "groggy" so maybe skip the coffee. Many
authors have developed the same habit during their early days when they had a
day job. Mark Cuban said, "You're only at your best once a day."

------
messel
I wake up at 4:30 to read for a bit and some days squeeze in 30-40min of
development work. After getting ready I head out for walking between 6:30-9am
(depending on the day) then head to work. This gives me room to do a little
project work in the evenings.

Glad to see more early risers!

------
ochekurishvili
With 7+ months of experience being an Early Bird I will definitely recommend
it.

For me 1-2 hours of a fresh-brained morning work is much more productive than
working whole night. I usually sleep between 11:30 and 06:30.

In general it depends on personality, some enjoy working at night and vice-
versa.

------
JoshMock
This is a great idea. I, too, often end up coding if I'm not tired when my
wife is going to bed, but it often ends up being a marathon until 1:30 or 2 in
the morning. Restraining myself to 2 hours a day, but doing it _every_ day,
seems like a good discipline.

------
rumcajz
I am doing this right now. The point, I believe is, that you spend the most
productive part of the day working for yourself rather than for your employer.
Still, I believe in certain jurisdictions your employer owns your work even if
done in your free time.

~~~
LukeShu
I think it has more to do with the document you signed when you started than
where you live.

~~~
Domenic_S
Not really. Some states ban or almost completely prohibit non-competes --
California being a notable example:

[http://en.wikipedia.org/wiki/Non-
compete_clause#Exceptions_-...](http://en.wikipedia.org/wiki/Non-
compete_clause#Exceptions_-_valid_non-compete_agreements_in_California)

------
eipi
This is essentially what I have been doing for the last 6 months and it works
great for me. But it only works great because 1) I go to bed at 9 pm - I am
literally falling asleep with 5 minutes. 2) Coffee is only allowed before 9am.

------
mgrouchy
I do the wake up at 5am routine, but I use it to go to the gym. I think a
healthy body helps you maintain a healthy mind. (keep in mind this "healthy
body" is very much a work in progress, like many of my coding side projects)

------
potomak
It remembers me of Jolie O'Dell's post about her "secrets to productivity"[1]

[1] [http://blog.jolieodell.com/2011/11/03/my-secrets-to-
producti...](http://blog.jolieodell.com/2011/11/03/my-secrets-to-
productivity/)

------
wensing
I woke up at 4:55am for a year while working on Stormpulse. Specifically,
2007, when my first child as 3. I was so excited that I never had a problem
launching out of bed and walking down the hall to work by 5:00.

------
firichapo
I am going to start doing this. Right now after 8 hrs of work, dinner and
working out I am dead. I push myself for a couple of hours to work on personal
projects but I am far from 100% by this time of the day.

------
aelaguiz
I've been doing this for a long time, it's the only way I can stay sane. I get
several hours to myself with no interruptions and I can work on personal
projects and be totally unaccountable to anyone.

------
epikur
You should buy some nice headphones, if you only have speakers right now.

~~~
tikhonj
Even really cheap in-ear ones are actually very good. You can listen to music
_quietly_ and still make it out.

~~~
bhrgunatha
For me, music is so important that I would have to disagree and recommend not
going the cheap route. Investing a pair of good quality headphones is a no-
brainer. Just make sure they are comfortable.

~~~
jQueryIsAwesome
And you have to combine it with a good sound card if you want to get the most
of your quality headphones; i have this one [http://www.amazon.com/Creative-
Blaster-Titanium-Internal-SB1...](http://www.amazon.com/Creative-Blaster-
Titanium-Internal-SB1270/dp/B0041OUA38/) and is pretty good.

------
guitate
I need a habit like this, maybe I can be more productive on morning than
nights (who knows), also some days can go to do exercise, yeah, everything
sounds great but the getting up is so painful.

------
icodeforlove
I love this routine, but it's easy for it to fall apart for a week if you do a
lot of OT at work. I found it really hard to get back into the groove after
having to skip a 5am day due to OT.

------
rodh257
This sounds great but my question is are you a morning person normally? I'm
definitely not, so perhaps I'm doomed to not be able to do this?

------
skrish
I have been slacking for quite some time; want to do it but have been
postponing it.

I guess its high time to just make a start. Thank you for the blog.

------
veyron
Are you in california? If so, you should keep in mind that 5 AM is like 8 AM
in NYC (i.e. lots of people awake)

------
freeformz
At one point in my life I decided to start my day at 2:00 AM. It was an
awesome schedule for getting shit done.

------
skrebbel
Genuine interest about the doing this every day, also in the weekend: What if
you got drunk last night?

------
seigel
What online kanban system do you use?

~~~
epaga
I'd recommend Trello.

~~~
seigel
Thank you

------
iconfinder
I guess the biggest problem is that you're pretty tired at the end of the day
at your normal work.

------
erkin_unlu
your girlfriend slashed because you want to work all night for the project,
you didnt she? :) anyway, it is a great idea, i am thinking about doing the
same too ; )

------
kruhft
Funny enough, that's exactly what I did this morning.

------
zeroboy
I did something like this writing my first book Zero to Superhero:
<http://zerotosuperhero.com>

I'd wake up a 3 am every morning (except Sunday) and write until about 6 am,
which is when I got ready for my 7 am shift.

I agree with the author that being super-motivated was key and I had already
invested several years research and writing the book. I was becoming worried
the book would never get done.

I was also able to avoid cognitive burnout because my day job was at a metal
foundry and consisted of mostly repetitive work.

One drawback was I was completely zonked by late afternoon, and had no social
life, but I still tried to eek out something for the book before bed (which
was sometime between 8-9 pm if I remember correctly).

Afterthought: I can't wake up so early now. Lack of sleep gives me a short
temper. Something to consider.

