Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: So you've just pulled an all nighter, how do you get through the day?
26 points by trickjarrett on June 8, 2009 | hide | past | favorite | 54 comments
I'm running on approximately 3 hours of sleep. My hands are shaky. If I sit still for too long I run the risk of falling back asleep. I've done all nighters before so I have my routine and tools to fall back on, I'm just curious how other hackers do it.

Coffee? Teas? Energy drinks? Sleep?



"I've done all nighters before..."

Then you're doing something wrong. The way you manage your time? The way you approach your subject? The way you organize your work? The way you set priorities?

An all-nighter is not a badge of honor. It's a sign of poor work habits earlier in the cycle. Find the cause of your need to do all-nighters, eliminate it, and don't do them any more. (And probably get twice as much work done during the day.)


Completely disagree. Working through the night is certainly not "something wrong".

Sometimes, you get so in the zone, so productive, so excited by what you're doing, that you simply don't want to stop.

When that happens, you can get more done during one night of coding, than you might have got done in the past few weeks.

Keep doing all nighters when you feel like you're hitting your peak productivity and don't want to stop.

Next day get some exercise, eat+drink.


Pulling an all-nighter out of pure desire and pulling one out of need are different. If you're doing it out of desire, suck it up and deal with it the next day (just like drinking). If you're doing it out of need, something's wrong (again, just like drinking).


OP here. I completely agree.

When I said I had done them before, I was referring back to college before I had learned time management.

This late night was not my fault. Our dev server went down and so I could not begin work on the project until IT had it back up later on Sunday. We were shooting to get this project into QA today but that unfortunately didn't happen.


Thanks for the clarification. Since you are probably not as clearheaded as you'd like to be, here is a simple task: Print out this page, cut out the note below and give it to your boss, then go home and go to bed.

  +=====================================================+
  | To: trickjarrett's boss                             |
  |                                                     |
  | Please excuse trickjarrett for the rest of the day. |
  | He had to pull an all-nighter in order to get his   |
  | work done because the dev server was down.  He has  |
  | to get to sleep ASAP in order to preserve his       |
  | health as well as his ability to properly do his    |
  | job tomorrow.                                       |  
  |                                                     |  
  | Thank you,                                          |
  | edw519 D.D.  (Doctor of Data)                       |
  +=====================================================+


I appreciate the note, I'll be sure to use it


You are exactly right. I learned early on in college that time management is EVERYTHING. If you are pulling an all-nighter, then you are not managing time as well as you should. Also, productivity falls off so rapidly without sleep that all-nighters are pretty much useless. You're much better off going to be at 1am and getting up at 5am.


Well, _I_ learned in college that people vary widely in when and how they are most productive, and that trying to change your nature is an uphill battle. Obviously doing the work two weeks ago when you knew it was approaching due would have been the best method, but there are times when the crunch is unavoidable (OP) or when you chose life-enriching activities over work (college). For us night owls, when the deadline is imminent, the all-nighter is the surefire way to pull it out.


Don't do all nighters. They will make you lose a lot more time recovering compared to just sleeping little. If you actually need to get a lot done in a short amount of time, go to sleep, and wake up after 3 hours, then kick down some energy drinks.


Go to sleep.


I usually do the 2/3 hour nap then wake up, have a shower, go outside, find some work I can get into a grove in.

then just try and last it out till evening and have an early night.

if you go to sleep in the afternoon and dont get yourself up within a few hours then it completely screws my pattern for a few days.


Kind of defeats what he is asking for. Q: "How do I cope without sleep" A: "Sleep"


I suspect he's too sleepy to worry about logic right now. :)


True, but it's also the best answer available.


That's right. They did an experiment. Control group rats were allowed to sleep. Test group were on a wheel that would start spinning of the rat fell asleep. It would crash them into a wall that would wake them up. After 40 days, the control group was fine, but the test group were all dead.

When they looked at their internal organs, they were mush.

Sleep is important.


Do you suppose they might've died from being crashed into a wall? Also, citation needed.


I thought someone would think that before I submitted the comment. Funny.

This type of experiment is quite common. http://www.bing.com/search?q=%22sleep+deprivation%22+rats+ex...

They use different methods to keep the rats awake. Some say the rats died after 3 weeks, some 40 days... It's pretty much a scientific fact by this point that prolonged sleep deprivation ultimately leads to death.


It's also pretty much a scientific fact that life ultimately leads to death in rats...


... or anyone.


Lots and lots of water and do NOT expect to be productive. Wash your face often too and go for walks.

Essentially, "jjs" is right. You may as well go to sleep, because you will as productive as if you were.


The point is not being productive, but looking busy. Honestly, if the OP had the option, he should take a 2 hour nap, a shower a late brunch and start working about noon. If he cannot, it is probably because he has to be there at the office.

So, how do you waste the day in the least damaging way? I think the key issue is - Find chores you can do with minimum thinking. When I have been in this situation (yes, yes... I should have not... been there, done that) I found myself unable to make anything creative, but still pretty able to knock off tasks that I had previously planned and prioritized. Write those emails you were planning (and triple read them, don't want to embarrass yourself or offend anyone), perform that refactoring you had identified but you were much in a hurry to actually code, start filling the TPS reports due next Friday.

Also, you might want to take a 20 minute nap after lunch. You will still feel crappy, but it will boost your attention span for the rest of the afternoon.

And please avoid driving altogether!


You may be _more_ productive by going to sleep. That way you won't be forced to fix all the bugs and crazy decisions you make while you're sleep deprived.


Sleep. I've pulled tons of all nighters…but I only do it if I honestly don't want/need sleep. I get far, far more done in 10 hours than I would in 20.

Don't lengthen your working hours, optimize them.


> Coffee? Teas? Energy drinks?

No this will make it a lot worse.

> Sleep? your best bet - but plan carefully to avoid mucking up your sleep patterns.

If you must stay awake orange juice, water and regular walks (outside, fresh air) are the key.

If you must have caffeine then drink tea. Coffee is too high in caffeine and energy drinks have the same problem but with added sugar - which will fuck you up.

Natural sugar from fruit juice is a better way to get sugar in your system (which is important because you will be deficient of it)

Moderate exercise (swimming, jogging, cycling, weight lifting) are also good because it gets adrenaline going in your body.

I spent a long time working out methods for working long hours: I finished my final year thesis in a 52hr straight through work session using the above methods. With energy drinks / coffee you'll struggle to hit 48hrs at best :D EDIT: it got a good mark too so it was a good move.

As I mentioned here in the past; for my finals exams I spent the best part of 2 weeks on an average of 4hrs sleep a day without feeling particularly tired throughout using these methods.

But it's not good for you long term.

Oh, regular food is good too. Have a medium sized but greasy breakfast.


Cold shower, eat, coffee, and 20mg of Aderall (generic), but proceed with extreme caution. Self-monitor your thoughts and behavior closely but not too closely, don't forget to relax, and don't be shy about letting others know that you're tired or had trouble getting sleep last night. Lastly, don't make all-nighters a regular habit, it'll be your down-fall.


Go to the gym. Sweat. Then, go outside and breathe the fresh air. That has always done the trick for me.


I will second this. Since I've been commuting by bike, all nighters are much easier on me the next day as I get my second (or third) wind on my way to work.

Another trick I've found is don't hit the coffee or energy drinks until you absolutely need to, you're going to crash anyhow, and drinking stimulants too soon will only make that happen quicker.


If you do stimulants, you'll want to figure out when they'll wear off. For me, drinking coffee works as long as I can have another cup every hour or two to ward off the crash. Go outside and walk around, or try to schedule something you'll care about for around midafternoon.


The main problem with coffee and other stimulants is that, if I really need them, I have a powerful aversion to them, and it's rare to be able to overcome it, even when I know I'd be better off if I grabbed a cuppa.


Do you have a caffeine addiction already? If so, I'd say keep up drinking some caffeine just so you don't have withdrawal problems on top of being tired.

I don't drink caffeine, but here's what's worked for me: 1) Nap several times during the day, if you can, even 20 mins is enough. 2) Drink lots of water, eat some food- I hear bananas are good. 3) Avoid making any important decisions today 4) Keep moving around and listen to some music

And most importantly, get to sleep early enough tonight to account for the fact that you've now got 5 or so hours of sleep debt. I doubt you're going to go to bed and sleep 13 hrs, but even planning to sleep 10 or 11 hours tonight will help your schedule a lot through the rest of the week.


The interest you pay on a sleep deficit will hurt your health in the long-term. Please don't do any extended driving (>15 min) today.


Eat something. Not too much or it'll make you more tired.

Caffeine is a double-edged sword. It'll keep you going for a short period of time followed by a crash. Either drink A LOT of it throughout the day or don't drink it at all.

Vitamin B can help in my experience.

Go to bed.


Sleep. If you are at work and your boss doesn't realize sleeping will make you more productive, go sleep in the toilet until you can quit your job and get one where you can sleep how and when you want.


get one where you can sleep how and when you want.

Just don't take it to far. A coworker of mine grew a habit to rest himself flat onto the table in a free meeting room for a 30-60 minute afternoon nap. That was good for many chuckles because we had a loft office with glass-walls.

Then came the day where the investor meeting was scheduled in conf-room C...


Energy drinks, in tiny, tiny sips. After that, water and a sugary granola bar, in tiny sips and bites.

By consuming in tiny increments, you are both avoiding caffeine overload and prolonging the amount of time you can keep yourself occupied with the task of drinking and eating. As long as you're taking tiny sips every 20 seconds or so, you won't lose focus and drift off.

On a side note, if you would like a humorous effect, try shotgunning a Red Bull. Just make sure you don't have to pass yourself off as normal for the next half hour or so.


200 mg modafinil. Useful for any rotating-shift type of work.


Yes, Modafinil is good and excellent for any hacking/coding short term memory requirements. Consult doctor first, natural sleep is always best.

AVOID :: Speed, coke, crystal meth . They all make you irritable and have all the usual downsides like:

:: Prison, overdosing, tainted supply, instant loss of job, addiction, loss of self respect, suicidal impulses.

:: Some last far too long (pure speed, Meth) and others too short (Cocaine). People who take those types of drugs (truckers, air-force pilots) have bounded scenarios and repeatable experiences.


Sleep. Swimming in a lake sometimes is good, too (but don't drown).


Step 1: Around lunch time, in a very nonchalant way, stroll out to your car, set your watch/portable-alarm-clock/cell-phone-alarm-clock to wake you up near the end of your lunch break, tilt back the seat, and zzzzzzz.....

Step 2: After waking, splash cold water on face, then eat your lunch at you desk.


I actually have no problem staying up for 2 days straight. It's the NEXT day that I'm useless, so I don't do it often. I don't partake in caffeine beyond an occasional cup of tea. My body just seems fine with anything up to about 2 days of being awake.


I've done quite a few, and remember fondly a double all nighter my first startup pulled to release 1.0. Sometimes it makes sense, but it is better to be avoided.

-Feed yourself well. Avoid sugar. Drink water. -Marvel at the sun, people in their rituals, etc. -Make a simple agenda: when to leave work, when to eat, etc. -Take a nice shower, dress comfortably. -Put on music and get into a groove. -Don't make any critical decisions. -Defer tough conversations. -Plan "re-entry" with enough sleep to land on a normal schedule. (ex: 12 hours of sleep ending at 7:00am.)


I've noticed that when I pull all nighters right before deadlines, and manage to get finished before code freeze, I have an overwhelming feeling of accomplishment and get so psyched that I spend the following workday much more productive than during regular (albeit generally laden with sleep debt) workdays.

But when the real accomplishment is missing and drowsiness creeps upon me, I take regular 5 minute walks at the corporate campus (a really nice green spot in the middle of the city), and have some 10-15 minutes powernaps. (I never drink coffee/cola)


I haven't really done all nighters since college. But I certainly learned one critical point. During a normal day, you might eat three meals over ~11 hours (8am, noon, 7pm).

If you stay right up, that will be 12 hours with no eating. The drain of skipped sleep and skipped food together are much worse than sleep alone. If you're going to stay up for ~50 instead of ~16 hours straight, you need more meals in there to keep your energy up.

It's still horrible, but eating another meal or two in there will help a lot.


Take a caffeine nap, drink something with caffeine and then take a 20 minute nap. Works wonders.


I usually drink coffee with lots of water after, need to be hydrated so you don't crash after the coffee. Putting some music on helps as well, and try to stay active. Seems like once you get over that first drowsiness you're good for the day


Sunshine. Resets your bio clock a bit. And a little caffeine.

Early bed the following night!


One hour at a time . . .


For me, just taking a 1-2 hour nap can make a big difference.


For the next Day? I prefer sleep though, even coffee can help you pull the day,but at the end, you still have to sleep.


An unhealthy egg and bacon breakfast with a Bloody Mary on top and then sleep for forty minutes after lunch break.


Sleep.

Though I have to say that staying up all night for any reason other than partying is dumb.


Work in the Sun


Sleep is for wimps.


Man up. Most of its in your head, being tired just makes it harder to calculate, kick back comfortably with a brew and work away.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: