How do you concentrate?
esila: Taken from "Time Management for System Administrators", however I feel this particular principle applies towards your situation:Figure out if you're a "morning/mid-day/late-afternoon/night" person when it comes to your brain activity.  Some people, for the life of them, can't get their brain functioning when they get up.  Others can't seem to concentrate until they've gotten lunch and feel "established" in the day.Figure out your natural cycle and make sure you attempt to get good quality coding time in during your best times.  If this is not possible, then apply the other response suggestions and hopefully you can increase the range of your concentration time.