How to survive all-night coding sessions
Developer Tammy Coron on how to improve your skills as a night crawler.
In a previous post, I provided 10 tips for the work-at-home ninja. Those tips are great for the average day: eat right, have a dedicated workspace, take breaks, so on and so forth.
But what about those times in which it's virtually impossible to stick to a routine? What about those times when deadlines are looming and time is short? No worries… it just calls for a slightly different set of tips.
01. Work anywhere
Skip the dedicated workspace. While it's great to have a place specifically dedicated to doing your job, sometimes you have no other choice but to work elsewhere – correction, anywhere! This is especially important when you're putting in a long day. For example: if you're tired, work in bed or on the couch. While these conditions may not be ideal, they will help you get the job done.
Pro tip: If you need to leave the house, ask a family member or friend to drive. This way you can work in the car on your way to the destination.
02. Toss the schedule
How long did you work today? 8-10 hours? That's good. That's a typical work day, for most. Now imagine the work you need to get done will take 18 hours. What then? Should you space it out over the next two days? Well, that's an option. Unless, of course, there's a pesky little thing called a deadline.
I don't advocate for long hours, all the time (despite the fact that I often do work them myself). But there are times when they're unavoidable. In those situations, I recommend you ditch the clock, put your head down, and tend to whatever task is required in order to get the job done. You can come up for air later.
03. Limit distractions/breaks
Yup! You've heard this one before. Don't let yourself get too distracted; especially when you're working late. One minute you're taking a five minute reading break, and the next you have drool all over your keyboard because you fell asleep at your desk (while reading!). That's not good for you, your work, or your keyboard. Stay focused. Stay on task. And keep your eye on the prize.
If you do need a break, limit it to something that includes some type of physical activity, like walking. In fact, that's the best type of break when you pull an all-nighter; it helps to keep your mind sharp.
04. Stay hydrated
Drink plenty of water. I can't stress the importance of keeping yourself hydrated during your all-nighter. While it's true caffeine is a great way (for some) to stay awake, it can also wreak havoc on your body.
To counteract that, have a bottle of water by your side. In between your endless coffee slurping which no doubt you'll be doing, be sure to have a little water every now and again. You might be surprised how much this helps.
05. Nobody's perfect
This one is particularly difficult for me. Sometimes I find myself agonizing over a few lines of code when it would be more productive to move on to solving the next problem. The key here is that things don't need to be perfect. They need to work; they need to look good; and they need to do what they're expected to do, but they don't need to be perfect.
If your code is working – but it could be better – leave it for now, and come back to it later when things aren't so tight.
Next page: five more tips for your all-night coding sessions
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
Get the Creative Bloq Newsletter
Daily design news, reviews, how-tos and more, as picked by the editors.
The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.