WhiteSites Blog

How to stay focused during a coding marathon

Posted on Aug 18, 2010 by Paul White

Any Athlete will tell you that success is just as much about staying mentally focused as it is about being physically strong.  Well my fellow desk jockeys the same applies for you.  So in this blog I will share my thoughts on how you can be a more effective programmer.

Temperature Control

If your work station is anything like mine its a 500 Watt beast.  In the winter it also serves as an excellent space heater.  However heat is not friendly to your computer.  We often overload our computers with fans to ensure proper removal of heat.  The same applies to our bodies.  Running central air to keep your office cool might not be a good idea, as the result is your office will be 72 and the rest of the house will be 65.  Another problem is cooling the ambient air around you doesn't always get the job done.  A better idea is to use a fan to ensure you remove body heat.  However this may change depending on the season.  I personally enjoy being cool in the summer and toasty in the winter.  Keeping your body comfortable is key during coding marathons.

Hydrate

First of all Coffee is not food, nor does it provide any kind of hydration. Its important to understand what dehydration really is.  You body uses key electrolytes to store water and maintain health.  Try drinking something that is high in potassium, in between your cokes and coffees.

Noise

Some people work while listening to music,  others would rather have something like the hum of a fan to help them zone out.  However things like a baby crying is never good for work.  This might mean you will have to reserve your coding marathons for night when the baby is asleep.  Also when picking music I have found that non vocal types of music are best.  Light Jazz or classical seems to help your mind relax.  This will depend on your mood.  If you code best while listening to Death Metal Chain Saw Music, then so be it. 

Code at Night

If you are like me this means you have a home office.  However if you have a baby, trying to focus on code while your wife is entertaining your child ( reading books, watching educational videos ) can be very distracting.  I have found that sometimes the best time to code is at night when everyone else is sleeping.  Some of my most productive hours have been between 10PM and 6AM

Close your Email

If you are like me you get Carbon Copied on every transactional email for everyone of your client's websites.  Unless you are expecting something important its better to close your email client.  Other wise the new Email alert will distract you every few minutes.

Turn off your Phone

Just like your email, Phone calls and text messages can be just as distracting.  Turn your cell phone off.

List what you want to achieve

What I have found is when you have a bunch of tasks you need to get done its best to list them out on paper, then as you complete each one, check it off.  This will help give you a sense of completion as you move forward on your project.  Also break up your project into smaller micro projects.  Its easier to reach a big goal when its broken up into many smaller goals.

Don't rush through code

As you write code make sure its clean, and well documented.  Not only will this make revisions easier, but it will also give you a sense of organization seeing your code neat and tidy.


Permalink
4658 Visitors
4658 Views

Categories associated with How to stay focused during a coding marathon

Discussion

ngc0202 | Dec 21, 2010 6:31 PM
That explains a lot...
name
Email Needed to confirm comment, but not made public.
Website
 
 
When you Post your Comment, you'll be sent a confirmation link. Once you click this link your thoughts will be made public.. Posts that are considered spam will be deleted, Please keep your thoughts and links relavent to this Article