Live data from Hacker News

Waking up at 5am to code

mattgreer.org

161–170 of 202 posts

Re: Waking up at 5am to code

#161
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.

Re: Waking up at 5am to code

#162
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.

Re: Waking up at 5am to code

#163
post #92

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…

Just curious, but how much coffee is 400 mg of Caffeine? This would seem to be 2-4 regular size cups of coffee ( http://www.mayoclinic.com/health/caffeine/AN01211 ).

Starbucks lists caffeine per drink which I think is a good universal reference point. 400mg is 20oz, i.e. a Venti, http://www.starbucks.com/menu/drinks/brewed-coffee/pikes-pla... .

Re: Waking up at 5am to code

#164
post #153

Earlier quoted context omitted.

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.

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... [3] http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2869.2005....

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.

Re: Waking up at 5am to code

#165

Earlier quoted context omitted.

You should try taking 5mg of melatonin around 9pm. I have trouble falling asleep before 12-1am, too. Undeterred, I stay up too late every night working on whatever project I have and can't sleep because I'll lay awake thinking about it. If I take a melatonin I get the benefit of becoming inept at writing code by 10 and will be sound asleep before 11 and ready to wake up hours before I have to start my day.

My sleep doctor advised taking less, and earlier (1.5 mg around 5 or 6 pm).

This is good advice. Taking melatonin when you go to bed will help you sleep, but taking it a few hours before you want to go to bed helps retrain your circadian cycle (which is the goal, not just going to sleep easily)

Re: Waking up at 5am to code

#166
post #92

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…

Coincidentally enough I just started reading The Way We're Working Isn't Working and this one of the arguments he makes (i.e. that we tend to run ourselves ragged by trying to work longer and longer hours to 'be more productive', when it usually results in just the opposite).

I can definitely attest to the fact that my periods of greatest productivity tend to come in spurts as the book talks about (sprints of say 90 or so minutes of highly concentrated work) as opposed to being the result of long slogs of say 10 hours of coding, which tends to produce volumes of code, but not necessarily my best code.

Good book so far (http://www.amazon.com/Way-Were-Working-Isnt-Performance/dp/1...).

Re: Waking up at 5am to code

#167

> 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 a…

Just because the work can get hard doesn't mean it can't still be enjoyable. For me, the enjoyment of work comes from the results you get out of doing it. There are times when I despise the actual work I'm doing but I enjoy doing it because I'm excited to see the final product.

Re: Waking up at 5am to code

#168
post #153

Earlier quoted context omitted.

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…

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.

There are some citations on the f.lux website: http://stereopsis.com/flux/research.html

Anecdotally, when I initially switched to using f.lux on my desktop (reduces blue light levels at night) it's become a lot easier to drift off despite sitting in front of the screen until ~15 mins before bed.

Re: Waking up at 5am to code

#170

> 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 a…

I came to the same conclusion. Often when working on a difficult problem I used to think, "What the hell is wrong with me? Why is this not fun? Why am I not loving this? Did I choose the wrong career or am I just a lazy useless person?"

Then I realized that as an athlete I never would have wondered why it hurt when I got cramps late in a game. I never wondered why my body complained about running the last mile or completing the last rep in training. I never had any self-doubt because I got bored practicing a skill hundreds of times to unlearn a bad habit. Those things are not inconsistent or contradictory to the joy and satisfaction of being an athlete.

Thinking about that helps me a lot when the problem I'm working on is causing me only frustration instead of immediate gratification.

Post reply on HN