Take the 2-minute tour ×
Personal Productivity Stack Exchange is a question and answer site for people wanting to improve their personal productivity. It's 100% free, no registration required.

I'm a coder. It's what I do. It's what I like doing. It's also what pays the bills. I do this at home and I set my own hours.

However, I have a problem. I have a very, very hard time getting in 8 hours of work a day doing this. I work at home, and I have tried so many different strategies to help me stay on task. I've tried working at different times of the day and night. I've tried timing myself and taking breaks and various intervals. Certain things seem to help some, but not enough.

I realized just recently that I believe one of the reasons for this is that the work I do does not allow any way of simply 'going through the motions' as most jobs do. For example, if I were a custodian, even if I were distracted or had trouble focusing, my mind could be in the clouds while I sweep or vacuum and I could still get the job done well because it's primarily physical. With my work, every bit of it requires a certain level of focus and concentration.

With that all in mind, this kind of work is still something I'm really good at. I just need help with strategies on how to get motivated when I'm not, stay motivated and focused for several hours every day, and overall just make it work.

share|improve this question
1  
This is going to be specific to each person. What has worked most for you? Maybe then someone can suggest a variation that will work. –  Jeanne Boyarsky May 1 '13 at 0:27
2  
Hmmmm.. I understand. I think what has been the most effective for me has been starting early in the morning and forcing myself to take timed breaks no matter what, as in, no matter what I happen to be doing, just drop everything and get up and walk away, then force myself to stay away for X amount of time. To be honest I'm not sure how I got away from that strategy. I think I starting thinking it wasn't a huge deal and when my alarm would go off I'd think "well i will just finish this part first..." –  vertigoelectric May 1 '13 at 1:44
    
Try taking a 20-minute nap (use alarm clock) after lunch. To me it helps a lot; it's like starting a new day with a fresh brain. –  Viliam Búr May 14 '13 at 14:07
    
@ViliamBúr, I wish I could do that, but that's a big no-no for me. Almost every time I take a nap during the day, I sleep very well but I wake up feeling like a train wreck. Head aches. Can't think. Certainly can't focus. Sore all over. No, I don't think a nap would help. Although just resting for a while would likely be quite helpful. –  vertigoelectric May 15 '13 at 3:58
add comment

11 Answers 11

I dropped out last winter. I deliberately took a year break to learn, understand and practice the art of coding.

Though my daily cognitive productivity/activity may vary a lot from you, I study/build things for twelve hours, six days a week. Yes, it takes a lot of discipline and motivation to strive for consistency. I too fail a lot. But during the process one particular methodology helps me more than any other.

I never do any single thing at a stretch for more than two hours. I sense monotonicity really affects your productivity and your focus is shifted solely to completion of that particular task and you end up not enjoying what you are doing.

I figure out a balance to distribute my working time among the tasks at hand.

So, if you happen to have tasks which differs slightly, try to create an alternating pattern.

As productivity, it may not be the same for all.

A question, do you try music when you are exhausted?

share|improve this answer
    
I almost always listen to music while I work, and usually actually turn it off when I take breaks to sort of let my brain rest in peace for a while. Why do you ask? –  vertigoelectric May 1 '13 at 5:23
1  
It may be just be a personal thing, when I fail to focus I re-orient myself with classical music/soundtracks(philip glass, einaudi...). I find them to calm me down. Sometimes, your mind is just filled with numerous thoughts, you keep switching between them. This may disorient you. –  Arijit Bhattacharya May 1 '13 at 14:51
add comment

I think this is a facinating question, and for me, it's quite linked to the classic 'how come I can play a computer game for 14 hours in a day and not be able to deal with my email for half that'

I'm going to try and challenge the assumptions in the question a little bit. I remain to be convinced that eight hours of coding is better than six hours of coding - because there are so many other factors: Energy, inspiration, focus, distraction.

Consider that there might be better things to measure - yes being able to say 'I worked hard for eight hours on this project' is a satisfying thing, but maybe not as satisfying as finnishing the project (or being paid for the project).

I would suggest that if you focus on improving your ability to work for longer, you will find ways to work long, but if you focus on improving your ability to complete projects, then that shift in approach may pay better dividends - so that you are more likely to find places to deligate, to renegociate, to simplify and to cruially, stop when something is done, rather than keeping polishing it.

share|improve this answer
1  
Thanks. Well, in my case I get paid by the hour, and not by what I actually get done... so even if I do really well at something and finish it quickly, I still have to work the same amount of hours. I'd just have to go do another project. Yes, it is true that an increase in work quality can result in better pay, but the issue is not only the pay, but the fact that being able to work full time is going to have an impact on opportunities that may arise soon for me. –  vertigoelectric May 1 '13 at 8:47
1  
I agree, I think it is better to focus on completion for 5 hours, than insisting on working an 8 hour-day. Use the free hours to prepare for the next day and generate some balance in life.. –  Håkon Hægland May 1 '13 at 20:23
    
@vertigoelectric ah, well that is a factor - apologies... –  Joe May 1 '13 at 20:36
    
@HåkonHægland, while that sounds nice, there isn't any kind of preparation or anything I can do during "free hours". If I complete a task/project, I either start on another task/project or clock out until I have more work assigned to me. –  vertigoelectric May 1 '13 at 20:40
    
@Joe, no need to apologize. I consider all of this feedback quite helpful. I may not get an absolute definitive answer or solution here, but the feedback leads me to other ideas and that is helpful. –  vertigoelectric May 1 '13 at 21:32
add comment

I'm a software developer by profession (just shy of a decade professional experience) It's very common when you're nose to the grind stone for every two hours you work your effective productivity drops severely. By the time you approach 8 to 10 hours you're practically wasting your time.

What has worked well for myself and those I work with is to break up the day. You said you work from home which is excellent for this purpose. Split your day up, instead of start, work for 8 hours, stop put designated breaks in your day (that can be fudged around, when you're in a groove you shouldn't interrupt it)

I recommend splitting your day into 4 stretches take two shorted 30 minute breaks, and one long hour break and see how you hold up mentally at the end of the day. Even with that from time to time you'll have a day or two of mental burn with particularly involved tasks, but most days your work fatigue should be within reason.

More fatigue makes for more bugs, bugs can be extremely costly in both time investment to resolve and monetary impact to the company using the software.

share|improve this answer
    
This is one of the strategies that has worked best for me and I plan on trying again. Thank you for the advice. –  vertigoelectric May 2 '13 at 19:38
add comment

Making brakes to take some fresh air is definitely the way to go to avoid exhoustion - But I warn everybody to believe blindly in such simplistic methods like the pomodoro technique which sounds great (I like the basic idea) but which works against our in build clock and our psychological nature.

The Pomodoro technique says to make a short break after 25 minutes but it takes us 20 minutes to get concentrated on a task so you've got effective working time of 5 minutes = not the best solution IMO.

So I adapted the basic idea with timed breaks and I'm using a pomodoro like timer widget for chrome but I use other timings.

I take 45 minutes for the work period followed by a 10-15 minutes break. This timings are in use in schools so I believe them to be more appropriate and it feels good for me.

But there is more. When I feel to be in the flow state I take no break until the flow ends.

share|improve this answer
    
I have found that frequent breaks also help. I usually go for a break each hour. That seems to be okay for me... and also if I'm in the middle of concentration I usually finish what I'm doing then take a break. –  vertigoelectric May 8 '13 at 20:33
add comment

I think you need to take some time for tasks like responding to email, documentation, source control management, compiline, code review and refactoring that should not be as taxing. Manage your time, so you make sure you do this stuff. It may be difficult to motivate yourself to do some of the mundane tasks, but that is another problem.

share|improve this answer
    
Unfortunately there aren't any mundane aspects to my job. The only emails I get are from my boss and responding to them takes but a few minutes. Reviewing/refactoring code may be less taxing than coming up with brand new code, but as long as that code is functioning, that sort of 'clean up' and optimization is generally very low priority, and I need to work on the tasks based on priority. For example, if I have 5 tasks to do and finish one, I can't spend much time reviewing or cleaning up what I did because the other tasks are more important. –  vertigoelectric May 1 '13 at 20:44
6  
The benefits from refactoring and cleaning up code is another dicussion, but you need to realize, no one can perform at a high-level all the time. The productivity you think you are gaining in the short-term is going to be lost in the long-run. The goal isn't to work more hours, but get more done in a given hour which is much easier if you aren't exhausted and burned-out. –  JeffO May 2 '13 at 19:13
add comment

Here is an unordered list that can help you to be more productive in your 8 hours of work.

  • Meetings and other distractions. Some meetings are necessary, try to distribute them throughout the day (e.g. 1 hour coding, 15 minutes standup, 2 hours coding, lunch, 2 hours coding, meeting, ...)
  • Pairprogramming: Get yourself a programming partner. One is the driver, the other the navigator. I think that this helps with the exhaustion, as both roles require a different kind of thinking.
  • Give yourself time to understand problems and solutions. Instead of just "googeling" your problem and copy/pasting the first hit, try to understand why it works and read the documentation. Next time you will be faster.
  • Delegate as much as possible and customize your tools. Create "snippets" for your editor and use a private wiki to keep track of weird function calls and algorithms. Free your mind from this kind of information.
  • Exercising helps you to concentrate over long periods of time. If you "don't have time" try to do burpees in the morning before you shower.
  • Try "test driven development". Writing tests and running them will help your confidence with your code. Furthermore you break down the feature into solvable mini tasks (tests).
  • Do not switch between many languages and libraries. If you code a long time in one language you will learn the syntax and the standard libraries by heart. You will start to think in algorithms instead of struggling against the language.
  • Learn stuff in advance. If you regularly read tech articles and books you will start to know what you are doing instead of "reinventing the wheel".
  • Automate everything you can. Compiling / deploying and testing should be one keystroke away.
  • Use version control all the time. Fixed one test or edge case? Commit.
  • Ask other people for advice. If you have never implemented a "migration script" or "versioning" then ask a coworker or someone on the internet how to start.
  • Try to relax at home. It is better to meet some friends than to play computer games or code even more on private projects.

While none of these items alone will help you with your problem, all of them together will allow you to be more productive and push your personal limit.

No one expects you to be focused all the time.

share|improve this answer
add comment

I too program for long hours, which is not the same as playing games. However, the issue I find is that after a while my mind starts drifting. So I work approximately 3 hours and then take a break or do a different task. I go for a short walk or exercise. Then I change my focus, emails, accounts, shopping online or go to the gym. After that I do another some more work, when my mind has rested from the previous work. A coffee break isn't needed. I need to change focus, do physical excersise like walking around or cleaning the house cleaning to relax the mind.

share|improve this answer
    
Welcome to Personal Producitivty. I've tried to improve your grammar. Please check if I kept the meaning of your post. –  THelper Mar 17 at 8:46
add comment

One thing I haven't seen in an answer yet is the environment. If you work at home, you have the liberty to change your environment to suit your needs. Have a work room and a play room, and try to keep them separate. When mixed together, we do not have the external stimulus pushing us to remain in one mindset or the other. We associate an office room with being productive and a living room with relaxing. Maybe you are most productive at the coffee shop down the street. The point is to find the environment in which you have the strongest inclination to get things done.

When you need a break, change your environment. When it is time to get back to work, move back into your productive environment.

share|improve this answer
add comment

I'm practically in the same position - coder working from home since a long while - 2005.

And what i found to alleviate mental stress has been to multi-task in between work and games, social networks, chatting, and even watching anime (japanese, futurama, anything) all at the same time.

15 minutes of coding - or until i am stuck and there is tension building up - and then i alt tab into one activity. I release enough mental stress, relax enough, and/or even come up with the solution for the problem i'm stuck with (magically happens - subconscious being released provides for inspiration probably), and then i alt tab back into work.

One downside is, it makes ~4 hours of concentrated mental work take ~6-8 hours.

However, the stress at the end of the workday is much less, and it doesn't create accumulating stress over the course of days.

Good side is, it keeps your mind in a much better shape, which enables you to tackle very intricate and heavy problems.

Ah - by the way - you also need to manage the times when you are enthusiastic - i know how it is - you are going on a good, new enjoyable project or something you really like a lot and you just do NOT stop doing it. For hours and hours even up to 12-14 hours of straight coding.

Kills in just 1-2 days.

It's VERY hard to stop in such cases, but the mental stress when doing something you really enjoy or something you don't enjoy at all, seems to affect the mind fatigue similarly.

share|improve this answer
add comment

Make sure your environment is ok:

  • Noise: your kids playing in the same room is a killer, radio or meaningful songs also take up your head space
  • Temperature: make sure it's not too hot in your room, or you brain will get hazy
  • Air: ventilate often, and maybe buy a CO2 sensor to make sure your brain has enough oxygen
  • Popups: make sure no Skype messages arrive every 5 minutes, make email checking interval 30 minutes or more
  • Context switches: when a long process is going (e.g. compiling), don't alt-tab but take a stroll across your room
  • Maybe there are some other distractions specific to your case.

These small things, which take some of your head space, may add up and lead to increased fatigue.

If nothing helps, maybe you could just work for 6-7 hours a day? Especially if there is a drop in your productivity at that point, as it happens for me.

share|improve this answer
add comment

Sometimes I'm in a similar situation. It's most helpful for me if I can talk to someone about my work. The best partner for this is someone who doesn't know much of the topic, but intelligent enough to understand the details; who is curious and asks the obvious questions of a lay person. When I manage to find someone like that and we talk through the project I get a fresh view on the topic and new motivations to continue in a sensible direction.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.