Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I find working in isolation, on a piece of code that won't be seen by anyone else for weeks, draining. I'm looking for ideas to try to keep myself productive and motivated.

What do you do to remain motivated and productive, when given a long term programming task, and working on your own (for example, from home, without any team-mates or coworkers)?

share|improve this question
1  
Good question, I'm in this situation at the minute. It's not too bad because I'm making something I'm really interested in. –  dan_waterworth Feb 28 '11 at 16:48
1  
I'm in this exact same situation right now as well. I have been for the last several months and expect to be for the next several months. Just knowing I'm not the only one is encouraging, so hopefully this comment will be encouraging to you as well. –  Jason Swett May 13 '11 at 14:20

8 Answers 8

up vote 21 down vote accepted

Maintain a balance.

Given something novel (e.g. playing a game, having a beer, etc.), we're able to focus and do that one thing for an extended amount of time. The only way to power through a mundane task (without overdosing on coffee) is to maintain a balance. I say 'mundane' because if this were a task you were really passionate about, you wouldn't have meandered to site and asked this question.

Suggestions:

  • Balance. Work on the long-term project for an hour two and then reward yourself with something you enjoy. Embrace the break from the task. Repeat.
  • Long-term mindset: thinking about the awesome work you will be doing after (this less interesting job) is invigorating.
  • Break your project down into small tasks. Tasks that will only take a couple of hours to complete. As you complete each of these small tasks, it'll give you the feeling of progression.
share|improve this answer
    
>>Work on the long-term project for an hour two and then reward yourself with something you enjoy. Embrace the break from the task. Repeat ---> NO!!! Don't Interrupt your groove! The hardest part is getting started! Take a brake when you feel you need one. –  Morons Feb 28 '11 at 13:53
1  
@Morons I do think some kind of discipline such as work X time and then take a break is helpful (like the Pomodoro Technique). If you always take a break when you feel you need one maybe you'll never get anything done ;-) –  Omar Kohl Mar 1 '11 at 8:46

Setting targets is the only way for me to work...

By the end of the hour, I want to have X done. And by lunch I want Y & Z finished. At lunch you review where you have got to, then set new targets. For completing each target, there is a reward; the reward might be a cuppa, or a walk from your desk or 10 mins on stackexchange...

It's clearly better to set achievable targets too - you are after the mental reward of ticking an item of work off your list. It doesn't matter what your target it is, as long as it can usually be achieved within your time window.

share|improve this answer
    
+1 Love the idea of the mental reward, I just realised I've been doing that without realising. –  Martin Blore Feb 28 '11 at 10:16
    
Small targets is key. Having a list of 15 items at 8:30 am and a list of 15 items with lines threw them at 2:30 is a great feeling! –  Zachary K Feb 28 '11 at 10:59

Approach it like a programming problem

It is easy to get so caught up in writing code that we separate out the way we solve programming problems from how we solve regular real world problems. But actually the conceptual tools we use to solve programming problems are pretty good for everything.

  • Gather Data - when does your productivity drop? What happens just before you get distracted? What is at the root of the loss of motivation? Keep a detailed and honest work diary for a week or two focussing on how motivated you feel and what you get done.
  • Analyse Requirements What would it take for you to maintain motivation in the light of the data you have gathered? How can you break the patterns that lead to loss of motivation?
  • Find Solutions - Sometimes you might find that there are software tools ( something like RescueTime maybe ) that can help you to keep your focus when working. Maybe you'll realise that you need more social contact in general and set up some regular nights out with friends to help keep your feet on the ground. If you have identified a specific problem then there could well be books that can suggest ways to work around it. Maybe the problem turns out to be that you aren't suited to this type of work and the solution will simply be to change jobs.

As a programmer you already have the tools you need to resolve this, it's just a question of applying them.

share|improve this answer

This is what I think according to me works,

  1. Clearly defining the task at hand: The most important thing here is to write the task down and not to keep it in memory.

  2. Break down into tasks if the single one is huge: Again break it down into tasks and write them down.

  3. Assign a ETA or a deadline: This is really important, and be very strict and disciplined about this. Else you will procrastinate.

  4. Use pomodoro technique for short term focus. And use the interval time for errands and other things like email checking.

  5. Make sure all your focus is on the task at hand. Avoid stray tasks as much as you can.

  6. Once you finish a task, mark it complete also a keep a track of the time you started and time you finished. Keep log of things that you did solve something special while executing a task.

  7. Once you have finished executing the task, Decide the Next step.

Make this data tabular. All this is there in David Allen's Getting things done.

A few more important things.

  1. Review what you have been doing once a week. You logs must suggest improvement over time.
  2. Take corrective action if you are going the wrong way.
  3. Ultimately your tasks must converge towards weekly, monthly, yearly and life time goals.

Remember:

Taking the next step is important. If you have a next step for each task your task opportunities grow linearly and if they they lead to more than one next step the task opportunities grow exponentially.

Indeed as Sun Tzu said : Opportunities multiply as they are seized.

Summing it all up:

  1. Being organized works. Plan, organize, schedule and track.
  2. Review periodically.
  3. Be truth full and analyze data.
  4. Discipline while executing. And focus on task at hand, the plan is already on paper you need no have to worry about that.

Follow this religiously.

share|improve this answer

I find that having peers who are willing to share your thoughts on whatever you're working on helpful. There's never been an entire problem I've worked on alone that hasn't benefited from being discussed with others.

Ask a senior or a friend if they can spare any time to peer review your code. If you can pair through the review, even better!

You may also find it helpful to blog about your coding experiences. I'm sure there are things you've learned or are practising (TDD for example) during this long period, or ideas about how you've done something and wondering if it could have been done better.

share|improve this answer

I'm working on a small project that is going to end up getting over-engineered. Nobody else really cares, but I'm trying to stretch my skills. I'm reading a book on refactoring, so I'd like to apply as many of the practices as I can. I'm not in a time crunch. As the lone programmer, no one is going to look at my code (not anyone who could understand it but the occasional visitor to my cube can get a glimpse.) I made a prototype and did a demo. I'm looking forward to the change requests.

Although I'm motivated to get things done, I prefer a good challenge as well.

share|improve this answer

I've done this on a few projects. I find the best way to keep motivated it to make myself accountable.

Even if no one is going to be looking at my code or what I'm doing, I still make it a priority to talk with either my supervisor, boss, or the PM and let them know where I'm at and what I plan on finishing by the end of the week. It takes 5min to run through it with them, and I've been told by a few PMs that it's really helpful to them as well.

For me it sets a goal, and a soft deadline that I want to meet. For the PM it lets them know where I'm at on the task and gives them time give their input.

If you can't do it face to face, fire off a short email. It's all about making yourself accountable for your tasks.

Also, try breaking a very large job down into small manageable and measurable tasks. Use a ticket tracking system and assign yourself tickets. This way you can manage how you're doing and keep yourself accountable for all the tasks you have to do.

share|improve this answer

Good music for programming (techno, trance) helps, keeping me pumped up when not in the mood or when working on parts of the software I'm not particularly thrilled about.

share|improve this answer

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.