share
Stack OverflowHow to keep being productive when you are tired?
[+20] [19] artemb
[2009-09-01 18:55:50]
[ language-agnostic productivity ]
[ http://stackoverflow.com/questions/1364056] [DELETED]

There are days (at least in my life) when you are sooo tired but you must finish the program, build the release, ship the product, etc. I'm talking about loong nights full of coffee, 4-hour sleep-time and a whole lot of work to be done. How do you keep yourself productive in such days?

+reopen: its a common issue among programmers. Perhaps the question can be re-worded to apply more specifically to how to deal with exhausting development schedules (either by avoiding them or addressing the root causes) - Jherico
It is a common issue amongst everyone. We all get the flu, that doesn't make medical questions appropriate here. - DevinB
(1) I would cosider it a dupe of stackoverflow.com/questions/1084113/… anyway - EBGreen
I concur on the dupe. All the useful information likely to come of this is probably already there or applicable there. - Jherico
(1) I disagree on the dupe. The assumption that it's a dupe assumes that the tiredness is limited to a certain time during development; maybe it's a more or less constant thing for this guy. - mmr
But then that starts to wander out of 'programming related' space and into 'I'm chained to a keyboard by a tyrant' space. - Jherico
[+19] [2009-09-01 18:59:03] gbn

I don't. I go home because I'm tired, overdosed on caffeine, stressed, making mistakes, can't think straight, snappy etc.

It's expected by your management, then I'd really have to consider my options. And it's probably illegal where I live too...


1
[+17] [2009-09-01 19:11:03] joeslice

A good expression I was told in response to the same question: "Slow down, you'll go faster."


I concur, when you start going faster, mistakes appear and are overlooked, then the build fails and the problem snowballs. - cbeuker
2
[+14] [2009-09-01 19:24:00] HLGEM [ACCEPTED]

I learned in my first job out of school that if you don't go home and sleep when you are exhausted, it will take twice as long or more to get the work done because you make mistakes (often very bad ones) when you are too tired.

When you have stared at the screen looking for a problem you know you could find in 30 seconds if you could just focus, it's time to tell your boss that you need to get some sleep. If it really is a time crunch, offer to come in earlier than normal instead of staying for another two hours (and accomplishing 15 minutes worth of work).

If everyone must be there for scheduling reasons, offer to go pick up dinner for everyone, just taking a break will often help. Even a fifteen minute nap can help.

I remember once having a boss who thought we should be able to come in a 6 am and work until past midnight and not take any food breaks at all. Eventually we all revolted and insisted. We should have done it at least a week earlier. But if you are that tired so are your co-workers and going to the boss in a group can help convice him. you need to take a break.

If you know a crunch time is coming, get as much rest as you can immediately before it starts. If you know that Friday is the big day when things must be done, make sure to leave earlier on Wednesday. That way you can do the sprint Thursday night if need be.

If you are too tired at work because of your own lifestyle, not a work schedule induced exhaustion, then consider cutting back on the late nights during the week.

If you always work more than 8 hours, stop doing so, especially if your co-workers do not. Exhaustion is part of why it is taking you longer to do things. Remember, industries din;t go to the 40-hour wrok week back inthe beginning of the 20th century becasue they wanted to attract employees, they did it because they wanted to cut costs and tired people make mistakes and cause rework and get injured (I'm talking about when factory workers started working a 40-hour week)and that's expensive.

If a work place is so bad that you can't ever work a decent schedule, it is time to leave.


+1: Reminds me of an "E/R" episode, which noted: "the longer you stay, the longer you stay." - John Saunders
(2) re: your 6am boss, you should have refused his request as soon as it was made. Done en masse there's little he could do, certainly nothing legal. Did he consign himself to 4 hours of sleep without food? I'm outraged by this flagrant abuse on your behalf. - annakata
Actually he did stay with us and work as hard as we did. And I was only 23 at the time, didn't really know how to refuse back in those days. I know better now. I can still distinctly rememeber spending a half hour or more trying to do a task I knew would take about 30 seconds if I wasn't sleep deprived. - HLGEM
3
[+13] [2009-09-01 18:59:21] plinth

Miyagi father always say..." Best way to avoid punch, no be there."

In other words, build your release and engineering process to avoid this situation. It should never be status quo. If you're in that situation, man up to it and go get some sleep and come back when your head is clear. There is very little in the software world that can't wait another day. If it's mission critical (like a pace maker), would I really want an over-tired over-caffeinated engineer working on the code? Anyone?


Also, draw up a list of what needs to be done, tell whoever is in charge (possibly yourself) to work out what order to do things in. - Robin
4
[+8] [2009-09-01 19:00:30] Jon B

Get some rest. You'll get more done when you're refreshed, even considering the time lost to sleep. Especially considering how error-prone you are when you're tired.


5
[+8] [2009-09-01 19:00:57] Steerpike

Do some exercise

  • Take a walk
  • Go for a jog
  • Take up meditation

If you're really feeling the need and you really want to start doing something that will have long term impact and usefulness, try getting in to the tibetan rites [1] which are a fantastic series of exercises for clearing the head and getting you back on track.

[1] http://www.mkprojects.com/pf%5FTibetanRites.htm

my work proxy has blocked your 'tibetan rites' link as 'explicit and pornographic' (!) - Kirschstein
6
[+4] [2009-09-01 19:29:18] Wim ten Brink

When you're tired, your productivity will go down, no matter what you try. There is a simple trick, which means taking a break of an hour or so: go to sleep! Keep the light on, lean back in your chair and try to relax. Close your eyes and try to get into a state of light sleep. This works best if you didn't take too much caffeine. (so, no cola, coffee or tea!) If you did take coffee, you might stay awake a bit longer but you will also end up sleeping deeper. After 30 to 60 minutes, your alarm clock should wake you again and hopefully you've rested enough to continue for another 6 to 8 hours before you need your next nap. This could allow you to stay awake for three days or more before you'll end up being too tired.

Do eat regularly, keeping track of your blood sugar level. If this level gets too low, you will become more sleepy and drinking something with sugar in it should give you a bit more energy. If your blood sugar level gets too high, it's not good either in which case you could do some exercise to burn some of it away again.

And remember, when you do get a chance, take a long rest! Sleeping 12 hours or more is a good thing at that moment.


7
[+3] [2009-09-01 18:58:51] mmr

I try as much as possible to have as few of those days as possible. That way, when I need to do them, the ability is there.

To do this:

  • Anticipate when the next set of those dates are going to be. If you've got a big release in a month, do what you can to set up automated tools to decrease time between runs.
  • Don't work more than 8 hours a day on a regular basis. If you do that, then when it comes time for the big sprint, you'll find you're already running faster than you should. You'd be that guy in the marathon who starts strong, ahead of everyone else, for the first ten miles, but then hits the wall something horrible.
  • Try as much as possible to make sure that the requirements for whatever end date are reasonable. It may just be that you're being asked to do too much. If you're always working 14 hour days but getting paid a regular salary, they're trying to get the work of two people out of you.
  • Conversely, if you find yourself working 14 hours a day but everyone else is working 8 and getting the same amount of work done, it may be time to get some training. I've worked with people who are just slow; they take at least twice as long as everyone else to do things, and that slowness translates into them working long hours. They need to get faster, there's nothing else to it.
  • Get a hobby. If all you do is live, eat, and breathe code, then you're doing too much work, and not enough play. Play is essential to maintaining sanity, whether it be computer games, learning painting, dancing, etc.

8
[+3] [2009-09-01 18:59:15] womp

I just discovered energy drinks.

Aside from sometimes making my right arm feel like it's not attached to my body anymore, and the occasional headache... they sure keep me awake.

Unless I'm working on something I deeply enjoy, however, they don't necessarily keep me productive.


9
[+2] [2009-09-01 19:02:42] FlorianH

I have a small trampoline next to my desk. It helps to be able to think about something different for a moment plus it gets your heart rate up a little.

In addition I keep a task list for every day. If it is very late in the evening I take all the undone tasks (except for one) and write them on the list for the next day. That makes it easy to "finish that last little task" more quickly (because there is only one left).


(2) How high is your ceiling? - Rippo
10
[+2] [2009-09-04 12:06:21] JonB

A couple of thoughts:

1) Remove distractions - turn off the phone, don't twitter, close email client.

2) Sounds funny, but don't get too caught up in the fact that you have a lot of work to do in a short time. You can end up thinking about it too much which detracts you from actually doing the work.

3) In general try and avoid heroics. In the long run it isn't a sustainable way of working.


11
[+2] [2009-09-04 12:35:00] Chris S

Take a 15-20 minute sleep at lunchtime (no longer, you won't want to wake up). Taking vitamin B (as a multivitamin or on its own) after lunch will stop afternoon tiredness, along with avoiding wheat for lunch. There's also the usual concoction of Ginseng, Ginkgo Biloba, Green Tea and so on.

If you have strong will power then low GI snacks (fruit, nuts, vegetables) spaced out during the day also help to stop blood sugar surges and dips.


Powernaps like the one you describe now are awesome. It made me able to code all evening after a long day at school back in the day. To make the nap even more effective, drink a cup of coffee right before taking the nap. That way you wake up with a rebooted brain, and caffeine rush at the same time. - Nailer
12
[+1] [2009-09-04 12:53:56] seventy6

I find breaking up tasks into small to-do's really helps. This way large projects can be broken down into digestible chunks. Anything that takes less than 1 minute - get it done straight away.

I use an app called 'Things' on the mac to manage all my life / project to-do's in one place. It helps to remove all the garbage from your head - switch off a lot quicker when you get home! i.e. sleep like a baby...


13
[+1] [2009-09-05 10:56:33] Alex Baranosky

Sleep. Relax. Have a nice nourishing meal. You're not RoboCop. You can't go forever. I find my brain functions well for a long time, but then it starts to slooooowwwww dooooooowwwwwwwnnnnnnn and no matter how much I try to code more, I feel like I am getting less done, while taking more time. I find balance is the key.


14
[+1] [2009-11-28 16:24:46] gruszczy

I usually try to focus on bugs, when I am really tired. This is an activity for me, that doesn't require to be very creative. I follow simple routine:

1) test
2) try to decrease area, where the bug may be
3) put some more diagnostic information in the area

until I find the error and correct it. Then I go to the next one. It's funny, because I can work that mechanically only at times, when I am really tired and close to oding from caffeine and nicotine. But I get results from that and it's nice, near trance state, where I don't think to much and just go on autopilot.

Of course, it won't help with those really nasty heisenbugs and places, where design flaws appears. But I can get rid of most of the bugs, even those harder to spot and find. And it's good thing at the end of a project, where mostly you must remove as many bugs, as it's possible and not add new features. You just have to survive until boss says, that we are shipping and then you can go for a nap ;-)


15
[+1] [2011-10-12 19:50:49] Allison

If you get dog tired at work, organize your workspace. This way it is ready for when you return, recharged. Also, plan for when you return. Create outlines of projects. Catch up on phone calls and mindless busy work. Real projects will have to wait until you can function. Listen to upbeat music to keep you awake. Do anything that makes you look productive. If you get dog tired at home just go to sleep or take a nap, assuming if it's early enough in the day. Never start naps after one or two in the afternoon. If you start later, when you wake up you will be physically tired and yet mentally unable to sleep. If you can't nap, cook dinner, eat, and go right to sleep.


16
[+1] [2009-09-01 18:59:16] Rippo

Don't let a project slide this much in the first place!!! Never been there never want to go there, planning is the place to stop this happening


(1) OK, but isn't this like the old joke about the guy who asks the yokel how to get to Limerick. "I wouldn't start from there if I were you!". - Simon Nickerson
Its close! My response is a bit tonque in cheek... - Rippo
Another way is to buy a desk with a treadmill... Don't laugh they are on the market, exercise keeps you awake, well unless its 12 hours solid! I suppose you could hook it up so the faster you walk the faster the CPU responds... - Rippo
17
[0] [2009-09-04 12:57:14] Tempus

Go and play something, preferably not on your computer.


18
[-2] [2009-09-01 19:15:13] Steve

Just keep your fingers moving. As long as the fingers are moving, work is being done. You may have to move more slowly, to avoid making mistakes, but that's how it goes. Working while exhausted requires much more discipline.


(6) Tired programmers with moving fingers usually go net negative. Would you want your tired surgeon to just keep his scalpel moving? - sal
I have two kids so I get no sleep, and my bug rate is negligible. It just requires extra effort to concentrate. The biggest problem is not typing (i.e. goofing off because I'm tired) - Steve
19