Top 5 Tips for Staying Awake

Tweet

It’s been my observation that we web developers are a fairly nocturnal bunch. We beaver away long into the night, building the next big web app, trying to meet client deadlines, or fiddling with some new technique or technology that has us all excited.

Makes me wonder how much of the sum output of our industry happens in the middle of the night, and what is it that sustains us through those wee small hours? Is it fueled by the pure nervous energy of obsessive compulsion, or are there concrete things you can do to boost your performance beyond the physical impulse to sleep?

For me, it’s both — part obsessiveness, and part practical routine — it’s simply quieter in the middle of the night, with no phone calls and fewer distractions, and that really helps me to stay focused.

But there are also a number of simple, practical things I do to help me stay on form. I can only speak from personal experience, but with that proviso, I present this short list of tips I use to cope with sleep deprivation.

  1. Drink a lot of coffee

    Although the short-term buzz you get from coffee is largely psychosomatic, the effect over several hours is undeniable. Caffeine is a stimulant drug, and coffee has it in abundance, far more so than tea or cola. Proper filter coffee is the strongest, and the nicest, but instant coffee still works; though personally I can’t stand instant coffee and would rather drink tea if real coffee isn’t available.

    Perhaps you could even consider investing in a real coffee machine. We have one here at SitePoint HQ, and it gets well used, for totes.

  2. Drink a lot of coffee!

    Just like you do not talk about Fight Club, this tip is significant enough to mention twice. The risk of course is that caffeine addiction is recursive — it calls itself in a self-sustaining loop: you drink coffee to stay awake, but that stops you from sleeping properly; so the next day you’re tired, so you drink coffee to stay awake, but that … and so on!

  3. Eat properly, not just junk

    Good food is the gasoline that makes your engine go, and just as low-grade fuel gives diminished performance from your car, so poor food gives poor performance from your body and your brain. If you want to be firing on as many cylinders as possible, you need to eat decent regular meals, and drink plenty of fluids like water and fruit juice (as well as all that coffee!).

    What you don’t want to do is spend the whole day or night snacking on chips, chocolate and donuts (mmm … donuts), however tempting that may be. There’s no denying the instant gratification of a sugar-induced energy rush, but it doesn’t last, and doesn’t keep you going. It’ll also make you feel gradually more nauseous over time, so eat decent food.

  4. Avoid power naps

    Many people recommend power naps as a quick way of refreshing yourself, however I find they often have the opposite effect — either you wake up an hour later feeling groggy and just as tired as before, except you’ve wasted an hour; or, your body takes over and you end up sleeping for three or four hours, at which point you’d have been better off just going to bed.

    If you do start to feel like you can’t keep your eyes open then stand up, walk around, perhaps even go outside for a short stroll; get some fresh air and smoke a cigarette or whatever. Have another cup of coffee. That doze feeling will soon pass.

  5. Get plenty of fresh air

    A hot, humid or stuffy atmosphere is a sure-fire way to send yourself to sleep. You need to stay alert, and circulating fresh air will help you to do that. Have a window open, and if it’s too cold put on extra layers rather than turning the heating up — cold air is much better for you to breathe and will help you stay awake.

Okay so that’s only four really, but the first one deserved both the top spots! I do however have one more tip that’s a little less self-evident:

  1. Allow yourself creative distractions

    You might think that distractions should be avoided at all costs, but I don’t reckon that’s necessarily true; what you want to avoid is unwanted distractions, but distractions themselves are not necessarily unwanted. This is where a lot of corporations, by having such strict content policies for personal internet use, are failing to see the bigger picture in the quest for greater productivity.

    Allowing yourself 20 minutes to snoop around Facebook, watch Neighbours, or whatever else it is that helps you to relax, you can find yourself invigorated and ready for the next few hours’ work. Unwinding like that for a short period of time can have a beneficial effect, by allowing you to shake things out of your mind, and then come back to them more objectively.

There is a risk with any of these tips that the distraction can be too attractive, taking you away for work for far longer than you intended; but hey — that’s the chance you take when you push your body’s natural rhythms. A little discipline is always necessary!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Lachlan

    I actually find short naps to be really refreshing. The trick is getting them to be short, NASA reckons 26 minutes is the optimal nap length. Now to find a pillow for my MacBook.

    http://www.boston.com/bostonglobe/ideas/naps/

  • Luke Cuthbertson

    I’ve heard the research about the “power nap” before, but my experience with them is the same as James. They usually make me feel much worse. Maybe if I was woken up 26 minutes after nodding off, and forced to do a series of tests I’d perform better. I’m sure I’d feel like crap while doing them though!

  • viveknarula

    Well…., This is very different blog than we used to see here on sitepoint. Nevertheless it is quite usefull.

  • http://www.tyssendesign.com.au Tyssen

    Yeah, I feel crap after a long nap in the middle of the day which is why I find 10-15 minutes usually does the trick. Long enough to refresh you but not long enough so that you fall into a deep enough sleep that you don’t wake up until much later.

  • http://www.magain.com/ mattymcg

    My recommendation for eating “decent” food is “food with a low GI”. That means wholegrain bread, not white bread or high-in-sugar hamburger rolls; lots of fruit and veg. The stuff that doesn’t make you feel hungry again 3 hours later.

    Then again, when I’m pulling a late one I often down a bowl of ice cream with choc magic. I’ve produced some of my best work on that stuff. I guess whatever works for you.

  • Lee

    Jesus, what a ridiculous post.

    How about getting some sleep, which your body actually needs? Why not just suggest amphetamines?

    One of the most debilitating things about this industry is the very fact that so many companies actually do get their employees to work these ridiculous anti-social hours.

  • huh what

    um. I think it is not a good idea to suggest “smoke a cigarette”
    addicts are already doing it every opportunity, and mentioning it make non-smokers or ppl trying to quit cringe..

  • colorbycolor

    Have to disagree on the nap thing-if I am careful and set my alarm at 15-20 minutes, I wake up feeling like I have new batteries. If I leave it up to chance and don’t set my alarm, I wake up 2 hours later, groggy and in a foul mood feeling worse than before and like you mentioned, with wasted time under my belt.

    Power naps are good, but you have to time them.

  • http://www.mikehealy.com.au cranial-bore

    I find working late to be very unproductive in the scheme of things. If something has to be done THAT night, then there’s no choice, but otherwise the long hours on Wednesday will directly reduce my productivity on Thursday. Not to mention the difficulty of maintaining quality when tired.

    To be avoided.

  • http://www.drewcking.com cholmon

    My personal schedule is the early morning hours (i.e., starting at ~4:00am). That allows me the rest I need, assuming I can get to bed at a decent time, usually before 9:00pm, and the morning coffee jolts me awake…much more effective than trying to down a few cups late at night after having been awake all day.

    Another tip that I had expected to see on this list is regular exercise, e.g., a bit of jogging, or even just a few rounds of pushups and situps. Muscular flexibility/strength makes for a body that doesn’t tire as easily, and results in a much sharper mind that can go the distance. Combine that with coffee and you’ll be a machine!

  • First Time Poster

    Agree with cranial-bore.

    Although everyone is different, I wouldn’t encourage anyone to work late into the night. It leads to mental and physical tiredness which in the short term will reduce the quality of your work, your productivity and patience. In the long term, it can lead to increased frustration with your job and poor health.

    If it has to be done to meet tomorrows deadline then you may have no choice. But in my experience, late night sessions are often necessary because of poorly managed time, lack of organisation, project creep or not dealing with clients successfully.

    This next bit might be a bit controversial but one of the reasons that web designers do more than their fair share of late night sessions is that they are quite often young and have yet to learn good project and client management skills that would prevent such last minute rushes.

    I’d rather spend 2 weeks working an extra hour a day than all weekend or all night to meet a deadline. In fact, there are just as few distractions at 5am as there are at midnight – I’d rather start at that time and finish with the evening spare. Quality of life people!

  • Anony

    There is a risk with any of these tips that the distraction can be too attractive, taking you away for work for far longer than you intended; but hey — that’s the chance you take when you push your body’s natural rhythms. A little discipline is always necessary!

    Jeez!! Use that discipline to finish your work on time and to professional standard then, rather than putting yourself in a position where you have to pull an all nighter!

  • http://www.jeanco.ca Jeanco

    This is flat out terrible advice aside from eating healthy.

    Buckets of coffee are not needed nor necessary. Its when you start drinking more then 2 cups per day that the stuff gets bad for you.

    If this is something that common place in your schedule, then you’re probably sleeping well into the morning as it stands and you shouldn’t need extras to be up later.

    Just eat right and get your sleep. There’s absolutely no reason to be working on such little sleep on a regular basis that it necessitates any type of strategy at all.

  • http://www.jasonbatten.com NetNerd85

    I drink coffee, get around 6 hours sleep, sometimes 7, sometimes 8 if I sleep in, sometimes 4.5 hours if I stay up. I drink ice-coffee and instant coffee – the worse the better in my opinion. None of that fancy expensive cr*p.

    What specifically are power and healthy foods? I eat subway a lot. I had to stop going to donut king =( damn those pink iced bites of heaven!

    My obsessive habits and the fact I just love the web and sci-fi shows keeps me up. My partner is a nerd and keeps me company – which helps!

  • dougoftheabaci

    A trick I learned in CAP while on night watch was to drink lots of water. Drink before on duty, drink while on duty and drink the day after. Dunno why, I assume it has something to do with keeping yourself fully hydrated, but drinking lots of water helps.

    And for those of you who are like me and don’t like coffee (smells amazing, tastes disgusting) water is actually a good substitute. Think about it this way: Your body can process something like 1 gallon of water an hour. On hot days of marching it was two canteens an hour we were expected to down.

    On long deadlines I drink water religiously. It helps me keep focused and stay awake. Dunno why, but it does. Maybe someone will know more.

  • fproof

    Drinking a lot helps indeed. It makes you go to the bathroom every 30 minutes forcing you to to stretch the legs regularly. Always does the trick.

  • Slim Maid

    As my boss tells me:
    “Work smarter, not harder”

    *** Working late does not equal working hard ***

    Besides, those of us with young babies already know how to stay awake – change nappies, do a bottle feed!!

    @ First Time Poster – a colleague once told me how his ex-boss used to take
    a dim view of anyone who had to regularly work late because in his opinion
    it indicated that they could not manage their time or work (Of course, it
    might have meant they were overworked or badly managed tho.)

  • graedus_dave

    I also find early morning to be the best. My wife sleeps about 9 hours a night, and as we are newly-weds I love going to bed with her when she does, which is typically around 10pm. Well, she’s still fast asleep when it comes time for her to get up at 7am, but I am refreshed and ready for the day by 5am.

    The early morning hours have all the advantages of late night (no phone calls, no e-mails, no IMs) but rather than burning the last of my energy to get my work done, I am fresh from a night’s sleep and functioning at my absolute best.

  • http://www.delvarworld.com DelvarWorld

    While most of the workforce has adapted mass coffee intake to stay awake, that does not make it good advice. In fact, articles on caffine suggest that drinking coffee after noon will start to affect your sleep cycle. If your advice is to chug coffee then that would imply that you have trouble staying awake yourself, making you a rather poor candidate to be writing articles on how to stay awake, no? I don’t mean to be critical, but this isn’t advice people should follow.

  • grrt

    I don’t drink coffee after midday because it affects my ability to sleep at night. Besides, too much coffee makes me feel too “up” and hyper for a short time, before the “down” sets in. I find power naps of about 30 minutes to be extremely refreshing and energizing. Call it power naps, call it meditation, it works great for me. There’s one thing better than power naps: an hour of lunch-time yoga. Very refreshing for body and brain.

  • oeyvind

    Another thing is that if you sit a lot in front of the computer, you might want to balance it off by doing something completly analog on your spare time, like taking a trip outside, experience nature, and be a human, not a cyborg :)

    During the past few years I have been sitting too much in front of various computers, and now I see that I need to do different things and be more analog and use the body more. As one guy on Ted Talks (www.ted.com) said: The body is just a means of transportation to get my head from one meeting to another :) (That was a joke on his part, but it is kind of true for a lot of people these days..)

  • Pacifer

    Tip 7: Live a balanced life with fixed hours for when you wake up and when you sleep. Then you don’t have to force yourself staying awake. You’ll stay far more focused and productive in the long run.

  • Breton

    The kind of advice offered in this article pretty much destroyed my life a couple years ago. But that’s okay, because on top of the ruins I built a better life. I sleep rational hours now, not because of any kind of discipline, but because I cannot mentally or physically function on any amount of sleep deprivation anymore. Whatever it was that let me do that just broke, or wore out.

    But really that’s okay because I’m getting way more done now during the sane hours of the day, with proper nutrition and the correct amount of sleep, than I ever did in the constant state of panic I was in from sleep deprivation.

  • http://autisticcuckoo.net/ AutisticCuckoo

    Get regular exercise. If you’re physically fit, you can also stay mentally concentrated for longer periods of time.

  • Taijigeek

    I know this was largely tongue-in-cheek, but I’d hate to think someone would read this and think it good advice.

    Coffee is indeed a stimulant. It’s also a diuretic, which means it leeches your body fluids and makes you piss them away. This causes loss of the minerals and other good stuff contained in those body fluids, and much of it is stuff your brain and body need. You can replenish some of that good stuff by following Tips #3 and #5, but you may also need an infusion of Gatorade or Pedialyte, or some other product that boosts your electrolytes. Headaches often ensue from excessive fluid loss, too.

    In my twenties, I drank a lot of coffee. I know better now.

    On the subject of power naps, I find them useful during daylight hours to refresh my mind. A 30-minute nap can work wonders, if you can get away from the noise of the world. But a power nap at night is just a rudely interrupted sleep, and does me no good at all.

    It’s a much better idea to budget your time and other resources wisely than to ever put yourself in a situation where you’re placing your body at any risk of collapse. I’m happy to refuse jobs from people who give me unreasonable timelines.

  • Tikila

    While coffee is undeniably a booster,it has its negative effect .Am not a physician,of course,but i have the feeling coffee clogs my veins like colestrol and lowers overall fitsness.The good news you can reverse this negativity.And guess what? Tea does just that

  • http://www.SitePoint.com Matt Mickiewicz

    The fact that coffee is a diuretic is a myth that has been busted by science.

    The amount of water that you consume from a cup more than makes up for any loss… According to Lawrence E. Armstrong of the University of Conneticut, caffeine consumption won’t dehydrate you and can actually help you reach your overall daily fluid intake.

    Coffee is no more of a diuretic than a bottle of water.

  • http://1-800.your-inforcom.com/ Joe@800Blog

    If you happen to succeed in working too long and become addicted to coffee, here is a great post by Steve Pavlina that can help you get rid of coffee addiction.

  • Alvaro Medina

    Wow, what a healthy post. Coffee, cigarettes, no sleep,… do we *really* need this “advice”?? I’m actually trying to fight all this stuff in my work, I’ve had enough of it. In time your body will take revenge.

  • vishrb

    Geeeeez, how about putting forth reasonable deadlines and staying on task. Seems to me that if you are having to sleep 20 minutes at a time and deprive yourself of sleep you should headbutt you project manager. If you are the project manager then fire yourself because you suck.

  • automatic_ab

    DAMMIT! I CAN’T THINK OF ANYTHING FUNNY TO SAY! Oh well.

  • Chris

    This post is stupid. The “sugar-induced energy rush” that “cannot be denied” has been. It’s an old wives tale and sugar does not give you a rush. The excitement and joy of having sugar does so in children…but nothing direct caused by the sugar.

    If you’re getting a “rush” from sugar it’s because you’re eating chocolate, which has caffine in it.

    And many teas have more caffine than your general coffee. It’s also much healther for you.

    Matt Mickiewicz has made a very poor and ignorant point. He states that coffee is not a diuertic simply because there is water in coffee. That’s like saying eating a twinkie doesn’t add calories simply because you eat a carrot with it. Firstly, look up the word diuertic. Then look at the very article you referenced which states – “Most of us know that caffeine is a diuretic”.

  • WebDevGal

    Just wanted to mention that there are a few people not really appreciating the nature of this post. To them I say “Easy-Tiger, to each their own, eh?”. I for one need to think of ways to enable my approach to work to work. I often find I get very absorbed on some concept or idea and when I glance at the clock and find I’ve stayed focussed until 3am yet need more time to finish my analysis/development… As a smoker, I find that if I go for a short stroll around the block in the crisp night air (smoking a cigarette), by the time I’m back at my desk I’m good for another hour or more. However, I don’t drink coffee myself, but find water exceptionally useful at keeping headaches and eye strain to a minimum.
    As for productivity the next day – I just tell them straight up, I was in the zone last night and need some rest – will be in late, sorry – here are the hours I worked and this is what I did… ’nuff said.

  • Skweekah

    I stay up late, smoke copious amounts of rolling tobacco, particularly something strong like Drum Original or Old Holborn Blue or Yellow. Sometimes a Djarum Super clove ciggie.

    I used to drink lots of cask red wine, until the clearskin proved to be better value. Now, I dont drink wine at all, for reasons other than those affecting creativity.

    I sit in front of my celeron 466 powered box, start up Photoshop CS 2 and go to bed. By the time I wake up, the program should have just about loaded. It is time to go to work now…

    I hope that this helps you …

    Skweekah

  • Craig

    “get some fresh air and smoke a cigarette”
    Kind of contradicting yourself there, but great tips otherwise. I’m sure I’ll be trying at least a few of them tonight.

  • http://www.aarontgrogg.com aarontgrogg

    power naps: maybe the guys at NASA are in better shape than i am, but i find no more than 10 minutes.

    i also do what i call “dozing”: sitting upright (or even standing on the subway, leaning against a wall), i close my eyes and let myself go right down to the line between conscious and sleeping. it took some practice, but i can even do this on the bus.

    basically, you’re relaxing all your bodily systems, letting them replenish, without actually falling asleep. if you can get 10 minutes like that, you’ll be surprised how refreshing it can be.

    also a huge fan of a walk around the block.

    and if all else fails, get that coffee into an intravenous drip!!

    :-)

    Atg

  • http://www.P163.sg jimbo_dk
  • Julia

    Self control is the key I guess, but on the lighter side, there’s some funky caffiene alternatives here: http://www.thinkgeek.com/caffeine/

  • ad network

    Really good tricks,

    maybe you can’t do it at the office, but
    hot shower, or get down for a couple of pushups .

    they both increase the bloodstream speed making you more awake.

  • ad network

    You know what’s better than a shower …

    a shower with Shower Shock Caffeine Soap Travel
    from http://www.thinkgeek.com/caffeine/

    (Y)

  • Neil Bradley

    I was waiting for some the next one with crap advice….

    7. Drugs – visit the local dealer and get off your face. Your work will be brilliant and those beeping sounds on your computer will make you feel like you’re proper raaaaaaaavin!

    Nearly as bad as the other 6.

  • http://www.hypothesistech.com/ neliason

    My problem is not staying up it is getting to sleep after I’m done. Staring at a computer screen keys me up and makes it hard for me to unwind.

  • Whosdigit

    For the time experts, how do you work during the day when you’re expected to be in 7 meetings for 6 of those hours? The constant phone, IM,and email takes up another 2-3 hours. Then there is the daily “brown bag” meeting over lunch and the daily paper work.

    Don’t say better time management, I’m required to do and attend all of these. I use GTD approaches on everything and It’s not until after 6:00 when the world quits that I can actually work on projects.

    Management doesn’t understand if you say it’s too much, they’re doing it also, plus more since they’re a level or two higher.

    Like it or not, “work life balance” is just a recruiting phrase. In reality, they’ll fire you if you can’t keep up.

    I’m lucky to have this job.

  • dougoftheabaci

    @Whosdigit: I used to have similar issues and the way I was able to sort it out was by defining half of my day to no client time. I usually did this in the morning and left the afternoon for talking with clients, responding to e-mails and the sort.

    Normally I’ll get into work and have a look over the collected emails. I’ll dog-ear anything that needs to be addressed first thing in the afternoon and look for anything else that might effect the work I’m about to start. I only respond to emails that require nothing more then a few words in response but nothing extensive. Granted I don’t get too many emails but it lets me prioritise my workload.

    Then, once I start working, I don’t respond to emails or IMs unless it’s emergency stuff. Normally I solve the IM issue by doing an “away from my desk” away. Usually all I get then are quick notes. Though, another way around this is to not give out IM except to inter-company stuff because then you avoid the nonsense we’re not discussing. Bets balance is contactable but not too contactable. If a client can get to you any time they wish they will and you’ll never get work done.

    That’s why I designate the first half of the day to pure work. Then I’m guaranteed to get at least something done.

  • http://www.ventanazul.com alexisb

    Hello everybody.

    James, a few years ago I would have agreed with most of your tips; however, now I’m sure that being organized and planning your projects realistically is the best for most web developers.

    I prefer waking up early to get the most complex work done in the morning, many times I’ve had a few good ideas during sleep and I can quickly solve problems that looked so difficult the day before, when I was tired.

    Eating well, and at the right times, is a very good advice. I also like cofee, it does help to be alert and more focused, indeed, but I just drink one cup a day and that’s all. Smoking? Thank you but no, that just makes you feel more tired.

    Ideally, you shouldn’t need to depend on any kind of stimulants to increase your productivity.

    I’d suggest using your days for working and your nights for having a good time with your family, your girlfriend or doing something else like watching a movie, reading a good book or enjoying some Sitepoint’s articles.

    Good luck!

  • JoeBlow

    I like the tip about going outside to smoke a cigarette. That is cool. Way cool. I think I might “go outside” about now.

  • Mike

    Look, for all of you who are saying “There’s no need to have such a wacky schedule, just get a regular one.”, sometimes you just HAVE to pull the occasional all nighter and have little choice otherwise. So stop acting like the solution is to just not do it because everyones situation is a little different. Glad all 150 doctors who posted here are so open and willing to give free advice.