views:

1071

answers:

24

Tommorrow is the deadline, boy did it come fast!!? It's twisted but some of us have procrastinated just a tad as the thrill of an all-nighter makes things sharp and real- it must be the adrenaline.

But how do you keep your mind on the game as the hours slip away and your eyes burn and squint? Do you eat lots of candy? Gulp cup after bitter cup of coffee? Down Red Bull and groove to speed metal? Sprint round the block hoping to trounce the build? What's your secret to an overnight coding challenge? Somebody help!!!!!

+48  A: 

Start by closing the web browser and getting to work!

Jon B
Oh I wish I didn't do web work for this 1 reason!
Darryl Hein
that was my first thought when I read this question - clearly that of others as well. Close SO and write some code!
rwmnau
PLUS ONE!!!!!!!
jagprinderdeep
+3  A: 

Firstly, it's not a great idea to do this!

From my university days; combine Red Bull with Pro Plus. Red Bull reduces the tiredness and Pro Plus the overwhelming need to sleep (believe me the two are separate). It is an act of will after that!

kronoz
OH MY GOD THE SOUND
mannicken
I keep hearing noises behind me but when I turn around there's no one there!
Zan Lynx
+13  A: 

Tea.

and set stackoverflow.com to 127.0.0.1 in your hosts file.

David P
+1 .. Tea > Coffee.
Kyle B.
@kyleb: um.... yea no
Dustin Getz
Or set your DNS server to 127.0.0.1.
Ates Goral
+1  A: 

A pause from time to time keeps staying productive.

Burkhard
+3  A: 

Coffee, snacks, music, make sure you take breaks occasionally if only for a few minutes at a time.

Gerald
+2  A: 

If this happens too frequently, point browser to Job site

:)

Hopefully, late night are the exception for you, not a regular occurance!

pearcewg
+2  A: 

Loud music with incomprehensible words so you aren't tempted to sing along.

jjnguy
You don't try to sing along with incomprehensible lyrics?
eyelidlessness
Ano hi kokoro no kanata ni // egaiteta bashou ni iru // ... // kattachi to wa // ... // ria-runa sekai ni yurete ru kanjou // maketa kunai yo // ... // Hitori JA-NA-I.(etc.)You gotta love it.
Jonas Kölker
What is that supposed to be?
jjnguy
Is that from Kill Bill?
Vulcan Eager
My guess is that it is an example of incomprehensible lyrics.
jjnguy
Kouda Kumi - Real Emotion, from Final Fantasy
Galghamon
+6  A: 

Eat healthy - a good dark green leafy salad. Vitamin B. No more coffee than usual. Take a short break such as a walk around the building every 2-3 hours. Chair yoga.

For a crunch time, it's pretty much the same answers as for other questions that asked about keeping one's mind sharp, staying in shape, but just being stricter, more serious about it.

DarenW
+2  A: 

If you wake up easily, taking a bit of caffeine before a short nap feels a lot like a longer amount of sleep. If you are already sleep deprived, you'll probably sleep through your nap timers, and it is better to just stay awake.

I've had good results with small amounts of caffeine over time, rather than one large intake.

Eye drops seem to help. The longer I stay awake, the worse my head and eyes feel, so putting something cold over the eyes for 10 minutes helps. I use one of these.

Lastly, your sense of time tends to get screwed up the longer you go. Try setting a timer which goes off every 15 to 30 minutes to make the passage of time more visible.

anonfunc
"Coffee naps" are an interesting phenomenon. Specifically, you should nap for no more or less than 30 mins or else the effect is diminished from what I've read.
Adam Lassek
+1  A: 

Junk food of any kind, and Pandora.

Needless to say, all-nighters and good health are mutually exclusive.

Marc
+2  A: 

Music, caffeine, and occasional exercise. I've found a few sets of pushups really help when I get sleepy.

Noah Witherspoon
A: 

During Night-outs the adrenaline level automatically increases and I start working seriously. During those days (ooops nights), my manager also keeps an watchful eye on everyone.

Probably this is a dumb answer.

Alphaneo
+2  A: 

Chewing gum has kept me awake at the end of nearly 48 hours. It works because the brain is wired to stay awake if there is anything in your mouth that might choke you.

Vulcan Eager
+1  A: 

Frequent showers helped me a lot. Have 2 or 3 a night, they help reduce the sticky feeling that comes with exhaustion.

Tea works great, and is reasonably healthy. If tea fails, Red Bull and aspirine are the next level up.

Snacking doesn't help much, I'd focus on having a few decent meals instead.

ps. If your hair is long, consider getting it cut. (seriously)

David Rutten
how does hair length relate to sleep deprivation?
nathan
@nathan, long hair becomes sticky much quicker so it's harder to stay fresh.
David Rutten
A: 

Buy that gaget you have wanted, you know the one the wife has banned your from wasting money on. Then only allow yourself to use it once you have completed the job.

StarSignLeo
Won't work. You will lose the patience and start packing it out and installing new themes and applications on it, then hacking it until it's morning.
Developer Art
Thats why you give it to your wife to look after:-) hehe
StarSignLeo
+1  A: 

Pre-red bull days it was cup of sludge made by steeping a tea bag in a cup of coffee. I'd stick with a sensible plan of regular breaks for naps/exercise/real food. It's not worth killing yourself over. The more tired and stressed you are, the more mistakes you will make... which leads to more time fixing them making you more tired and stressed leading to more mistakes ad nauseum.

Jason Merrill
Tea-flavored coffee sludge? Interesting... and also gross. :)
Nathan Long
Very gross... but would keep you going. Apparently mixing the different types of caffiene made the results extra potent. With the added value of making you never want to do it ever again.
Jason Merrill
+1  A: 
Pascal Thivent
A: 

I have found that, along with the music & caffine, a ball of some sort - soccer ball/football/baseball, or a Frisbee (be careful) to pass back and forth while discussing next steps or taking a breather keeps the energy up.

akf
+4  A: 

The code you write after being awake 18 hours isn't worth using. Your brain will go into lockup and you can't keep all the details straight. The resulting frustrating bugs will make it worse.

Before getting to that point, give up and get at least 6 hours sleep.

"I love deadlines. I love the sound they make as they whoosh past." -- Somebody

Zan Lynx
That quote is usually attributed to Douglas Adams.
Tim
A: 

Travel to a far-away place and make jet lag work for you.

Max A.
+1  A: 

Burn the Midnight Oil...to CD.

Ok that was weak. Sorry.

Dusty
Somebody had to do it!
PTBNL
A: 

Give up. You've made a mistake, and there is no way out of it. If you try, you end up with code that is sub-par and will tar your reputation. Best bet is to contact whoever it is that is waiting for the code, and ask for an extension. Don't ask for one day, ask for more - you want to write code, and test it, and improve it, and test it, before the deadline - but don't ask for any more days since you will probably repeat your mistake.

With this project out of the way, examine what got you to the point of having to do an all-nighter. You need to prevent that. Is it that you're not interested in the project? Is it that you have too much going on in your life? Is it that you think you can finish it all in one day and you then realize you were wrong? Do you need to work within better structure? More procedures? Do you need supervision from another person, or can you do with the kind of supervision that a web based project management app can provide.

Just don't kid yourself that finishing a project by pulling an all-nighter, is cool. Code that is rushed is not cool.

mahboudz
A: 

Take 15min naps every 3-4 hour, like being in übermann sleep mode... it may take some practice to actually just fall asleep and then wake up again in 15-25min but rebooting the brain by doing it really helps me to think clearly again.

Napping too long though will not work, as at least I will feel less rested and possibly even more sleepy than before if it's not truly a quick nap. Not being able to truly fall asleep briefly during the nap will also prevent any effect, obviously.

A 3 hour sleep may be easier to do and will, for most people I guess, include a deep sleep cycle and relieve the mind of more stress. It might feel a bit tiresome getting up but that should quickly pass, especially with some added activity like PE and/or breakfast ^^

But I'd lean towards the "don't do it" side in practice. Only if it's a hobby project of mine I really care for - I'd pull all-nighters just for the fun of it. I do experience deadline problems with some of my technical writing side-jobs but I usually just spend a few hours on it, go to sleep and then get up really early and be done around lunch that day instead of trying to have it ready in the morning.

Oskar Duveborn
+1  A: 

According to the book Brain Rules a nap of 30 - 45 minutes will increase your productivity for 5 or 6 hours. Of course, the author is suggesting you do this as a normal part of your afternoon and get 6 to 8 hours sleep at night! However, maybe it would help.

PTBNL