Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9.

Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6.

Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate for a long time and be quite productive.

It's getting into the code and starting to get going with it that I have trouble with. Sometimes I will waste time in the morning just because I can't focus on the problem (yes, I am writing this in the morning).

I've put all my busy work in the morning, but as a developer, I don't have a lot of busy work.

It kind of becomes a self reinforcing thing; because you don't get things done in the morning, you have to stay later. Because you have to stay later, then its harder to get started the next morning, etc.

Do other people have trouble with this? If so, any techniques you've learned?

Thanks!

share|improve this question
2  
Also, not specific to programmers. –  Michael K Dec 8 '10 at 18:41
3  
Programmers are notorious for prefering later hours, but often don't work at places that are accomodating. –  JeffO Dec 8 '10 at 18:52
20  
Off-topic? If this is off-topic, why isn't programming warmups closed, too? Are you guys interested in having people ask questions and participate on this site at all? –  q303 Dec 8 '10 at 19:34
3  
Definitely on topic for me! So what if the question might be worded a little to general and could apply to more than programmers? –  DarenW Dec 8 '10 at 20:26
1  
@Josh K, you're right. I suppose I did ask the wrong people. I've had 3 out of 6 questions closed on this site...at some point, I just anticipate a question being closed as a matter of course now. Also, I should say interested in participation by OTHER people. –  q303 Dec 9 '10 at 0:05
show 6 more comments

closed as off topic by Jon Hopkins, David Thornley, BenV, Stephen, bigown Dec 9 '10 at 13:02

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

15 Answers

Coffee.

No, seriously; I know it is bitter, but some of the espresso mixed drinks are actually really good.

Coffee in the morning helped me adjust from the late-night/sleeping in patterns of college to the 9-5 schedule of the real world.

share|improve this answer
3  
You can also brew tea if you don't like coffee. –  Robert Greiner Dec 8 '10 at 18:37
6  
@user9094 Coffee dehydrates, which can have a negative effect on alertness. Drink one cup of good stuff, then stick to water –  Phil Mander Dec 8 '10 at 18:46
5  
@Josh: Yeah, and you're 19 years old. I had a lot of energy at that age too. –  Robert Harvey Dec 8 '10 at 19:02
14  
@Josh: Oh, I see. You're one of those people. :) –  Robert Harvey Dec 8 '10 at 19:11
6  
@Josh K - One thing that a lot of people don't know about caffeine is that your body becomes completely immune to the effects in as little as two weeks. Your body becomes immune to the sleep disruption within a week. Your body also loses ALL dependency in as little as 24-48 hours. Stopping caffeine consumption on a Friday afternoon and drinking caffeine again on Monday will start you with essentially a "clean slate" –  Mike M. Dec 8 '10 at 20:12
show 20 more comments
  • Leave work at the end of a day with a specific problem.
  • Create some sort of prompt so you see it first thing when you get to the office the next morning.
  • Go to bed early (I know easier said than done.).
  • Wake up with plenty of time to get ready for work.
  • Eat breakfast
  • Shower it helps wake you up, so don't do it before bed (unless so stinky you can't stand it.)
  • Don't start caffiene intake until you are at your desk.
  • See the problem from #1? Get to work.

Much easier if you get a routine going.

share|improve this answer
add comment

GYM

Although not the first choice for a stereotypical programmer, I find going to the gym before work very good for waking you up in the mornings. Not only is it good for you, but the exercise actually increases your energy levels, making you feel more awake and alert early in the morning plus with the added endorphins in your body, you'll feel better about going to work. It doesn't have to be a body-pounding routine to make Arnie look like a whimp, just 20 mins on a treadmill and maybe a rowing machine is enough give me a kick in the mornings.

If you suppliment this with a breakfast high in complex carbs (porridge or alpen for the Brits among us) then this will set you up for a good morning.

It doesn't even have to be the gym, just walking a little faster in the mornings or maybe cycling to work (I haven't tried this one, just a suggestion) would have the same effect.

share|improve this answer
    
+1, I was going to suggest exercise too. –  Jas Dec 8 '10 at 20:00
    
I realized even excercise after work is helpful. Becuase I think it gave me a good night sleep & energy. Only matter is it is so hard to keep doing it --; –  exiter2000 Dec 8 '10 at 21:34
    
+1, Just working out in morning will help you stay in focus. Once you will start working out in morning you wont want to miss the charm :) –  Simsons Dec 9 '10 at 5:45
    
@exiter2000 I agree, trying to keep doing it is really hard. I find I'm a creature of habit though, so if I keep doing it I'll eventually (hopefully) keep doing it out of habit –  Richard Dec 9 '10 at 9:23
    
Even a good stretch and warm up at the house can be better than nothing if you find lacking the time to get to a gym. –  Chris Dec 9 '10 at 10:45
add comment

When I find myself procrastinating I start with an easy or trivial task that needs doing. Starting off with something simple eases in the brain ready for the deeper stuff that requires more thought and flow.

Whenever I took college exams I always started with the easiest questions to get into a rhythm.

share|improve this answer
    
Doesn't look like we're allowed to answer, but this is similar to mine: we had a jigsaw puzzle going at my last work. 15 minutes of that in the morning was somehow exactly the right kind of stimulus to get going. –  orbfish Apr 9 '11 at 23:37
add comment

My advice would be 1. don't feel bad and 2. don't fight it. As much as most companies would like to think of programming as similar exercise to flipping burgers all day, it's not. When I was a developer, I spent a ton of time not developing mostly thinking and letting my active mind or my sub-conscious dwell on problems or best approaches. I'd come in late, take coffee breaks, go on starbucks breaks. But, when my brain wanted to code, I let it code and I was by far the most productive on the team. Productivity is the key in our industry, not punching a clock. Embrace what makes you productive and you will not look back.

Edit for comments: Agreed. You have to find an organization and manager that "get you". But, I won't settle for the Office Space "I stare at my monitor for 15 minutes. It looks like I'm working, but I'm not." That does not help anyone. :)

share|improve this answer
    
There's only so far you can take that, though. I've had to consciously break myself from the habit of long distracting breaks. You can train your brain to stay focused longer when there are no obvious impediments (i.e. facing a tricky problem). –  Anna Lear Dec 8 '10 at 18:37
    
Yea, but when people make staffing decisions, they tend to punish those who keep irregular hours. From a business person's perspective, I can see where that kind of irregularity is unnerving. I do feel bad because I do strive to keep a hot, 8 hour pace for my people...otherwise, I feel like I'm cheating them. –  q303 Dec 8 '10 at 18:37
2  
Completely agree with JP Alioto. I feel just like that. One can't just site infront of the computer and just start typing. Typing isn't programming. Programmer are like artists. And artists draw pictures when they have the right mood. If you go and ask him to draw at that moment, well he will but that wouldn't be his masterpiece. Similar is a programmer. –  kadaj Dec 9 '10 at 4:37
    
Hah just rewatched Office Space last night. And the "I only did real work for 15 minutes a day" comment reminded me that if it's the right 15 minutes, you can be more productive than anyone around you. –  orbfish Apr 9 '11 at 23:24
add comment
  1. Wake Up
  2. Smoke
  3. Have shower with hot & cold water every morning
  4. Some coffee or tea
  5. Start coding yesterday evening list
share|improve this answer
4  
Smoke? It is 2010 you know, did you get the memo? –  Xepoch Dec 9 '10 at 0:45
1  
@Xepoch: I think it is a valid answer to the OP. The question was "what does you get started", not "what do you recommend". Also, most people bragging about smokers are usually not living much better themselves; too much meat, too much fat, too much sugar, not enough sports, not enough daylight etc. etc.. In germany we say "who's in the glasshouse should not throw with stones". Smoking is bad, but my bet is you do a lot of bad things to your body, too, just the publiclity for those problems is not as big as with smoking, right. –  phresnel Oct 1 '11 at 15:20
    
@phresnel, my comment was not to debase the validity of the answer, but an attempt at smack. As you well know, the acceptance of smoking is much greater in Europe than in the States. I'd expect the same response if I stated I walk into my BLM land adjacent to my property and fire off a few rounds for practice too in the morning, acceptance of an activity is at the end subjective :) –  Xepoch Oct 31 '11 at 16:47
1  
@xepoch And today i am non smoker =) –  RusAlex Nov 1 '11 at 4:16
add comment

A little bit of sexual activity can freshen you. Not the full flesh tired sex but a little of mingling-wingling in the bed.

share|improve this answer
    
+1 for "mingling-wingling". But this is a site for programmers, you know.. ;) –  Tom Morgan Dec 9 '10 at 11:05
    
Hey programmers get a little something something, too... –  q303 Dec 10 '10 at 21:05
1  
We could all only wish this could be possible. For those of us who are either A) classic programmers without much chance for a partner aside us in the morning and/or B) married, we can only dream of such things. –  Xepoch Oct 31 '11 at 16:48
    
I don't like tips I cannot use. I feel excluded. –  Zurechtweiser Sep 29 '12 at 18:10
add comment

I establish a routine and leave myself notes from the day before and make sure I write in the task to start with in the morning.

My typical morning at work looks something like this:

  • Get in, get settled.
  • Grab some coffee or tea. Coffee is preferable for flavour, but tea will do. The warm drink is the important part for me here.
  • Read my notes from last night, see where I left off.
  • Do whatever I thought last night would be a good idea to do next. The me from yesterday that left the note had the entire task context in her head, so she must be right. :P
  • Just keep moving down my list of things to do from there.

It's gotten to the point that I kind of look forward to the "sit down and look over my notes" part of the day. It's almost as good as sitting down at home on the weekend with some RSS feeds or a newspaper.

I also found that listening to a dev-related podcast on the way to work can help get my brain into work mode by the time I actually get to my desk, but I leave that out of my actual routine.

share|improve this answer
add comment

Something that has helped people is: in the evening, prepare a list of maximum 3 things to do the next morning, that way you don't have to wonder "so what should I do now ?" in the morning while you're only half-awake.

share|improve this answer
add comment

Pair Program

Your organization has to buy into it first, but a funny thing happens: you're too embarrassed to slack in front of another co-worker. So you work instead, and work hard. At the end of a full day of pair programming, I'm more tired than a full day of going solo.

share|improve this answer
    
It depends how well you know your co-workers. We all tend to play a lot of ping pong when nobody is around to supervise. I guess the more eye balls (the bigger the office) the harder it is to slack. –  Keyo Dec 9 '10 at 6:14
add comment

I'd be tempted to suggest seeing if you have any sleep problems as if does take you a while to get going in the morning this may be a symptom of sleep apnea which can be treated. This is just a suggestion as I do have it and what I do to treat it has worked well for me.

The other suggestion I'd make is to consider getting up earlier and trying to exercise to see if that helps get you going or not. Usually I exercise around lunch time for a half hour as that is where I can use a reset that happens when I take that walk and reflect on nearly anything and everything that comes to me.

share|improve this answer
add comment

This is how I warmup my brain every morning:

  • (!) breakfast
  • not coffee (dangerous for the heart), but green tea or milk
  • take a shower
  • (!) ride to the office by bike (I have about 8 km of the way I can pass in 30 mins). Even if the weather is rainy or snowy - I have full set of bike-clothes that prevents me from moisture. So it accelerates blood and the brain really warms up perfectly. Also I don't feel "tired" in the morning, when other guys in the office do.

Signed with (!) are required

I proved to myself that this does not work:

  • go to bed early
share|improve this answer
    
How do you avoid showing up to the office sweaty then? –  q303 Dec 10 '10 at 1:11
    
@rsteckly, Unfortunately, we don't have a shower in the building where the office is. So once I come to the office, 1) I go to restroom, use a wet towel wipes on body (really helps), 2) then I change the clothes to regular set (jeans+tshirt, we don't have a dresscode), 3) put clothes on the heater (better if it is far from other co-workers), and nobody cares about it ;) –  Genius Dec 10 '10 at 9:20
    
Green tea contains a lot of caffeine and is not as healthy as advertised. –  Zurechtweiser Sep 29 '12 at 18:13
add comment

There are many possible solutions: You may depends on your family, co-workers, may try some time-managing tools like Workrave. But above all, you must know that what's your benefit in starting early in the morning; what you will get and what you will lose. If you think getting start early is better, then find out what you should do.

It requires some of self-controlling, but after you can do it for a week, things will be like eating cake.

P/s: Personally, I don't like smoking, coffee... it's not very good in the long run. I recommend exerscies/ sports instead.

share|improve this answer
add comment

I think it's mostly about sleeping habits. These didn't really exist so much before electronics came along. Lighting and sound affect your circadian rhythm

Don't listen to music and stare into a bright screen all night like me, it makes going to sleep hard because these act as triggers to keep you awake.

I leave my bedroom window open, the light seems to wake me up less abruptly and I feel less tired. I usually wake up before my alarm having slept less but feeling more awake.

Make your environment (light and sound) a little more natural and you'll probably sleep more normally.

share|improve this answer
add comment

Two things work for me to get the code flowing in the morning.

  1. Set a few (2 or 3) clear objectives.
  2. Set (short) deadlines for those objectives.

I write down this objectives. For example:

  • Fix reload crash
  • Setup ssl on apache

Tasks that work are those for which you have a clear idea on how to proceed and you can express them clearly. The point is not to give your brain slack to wonder how to proceed. Not all task work are suitable. But any project has lots of suitable pending tasks.

Lately I have been setting those two objectives as the last thing the day before. You will be surprised how effective a short self-imposed deadline is!

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.