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.

I'm a hobbyist programmer.

Often during a period of working on a project, I find myself having a hard time to actually get to coding. I sit in front of my computer, sometimes open the IDE, and instead of continuing work on the project, I find myself watching YouTube videos (often programming related), browsing Facebook, reading questions on this site, etc.

Also sometimes in the design phase of something, I think hard of different designs and solutions, come up with a cool solution which I get excited about, sketch it on paper, but eventually when I actually sit in front of my computer to implement what I designed, I don't program but rather do other stuff, or sometimes code a little bit.

I do like programming a lot. And I also enjoy designing stuff and thinking of ideas. However often when I actually sit down to continue my current project, I have this lack of motivation to code.

I have two questions about this:

  1. Is this normal? Are there other people - that enjoy programming very much - that experience the same problem? Is this 'starting-to-work-bummer' feeling common?

  2. How do you suggest I solve this? When sitting down to code, should I just 'power through' this initial phase of lack of motivation, knowing it'll get more fun after I 'warm up' and get deep into coding? Or am I risking getting burned out and tired of programming by forcing myself into this when I lack motivation? What do you suggest from your personal experience?

This isn't just a "do you sympathize with this?" kind of question. I'm asking in order to find a solution. Thanks for your help

I don't think this is a duplicate. There are a lot of questions about lack of motivation, but this one in particular is about a specific feeling of lack of motivation when sitting down to code.

share|improve this question

marked as duplicate by Neil, psr, gnat, Jim G., MichaelT May 15 '14 at 17:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

@Neil This isn't a duplicate: "Anyone have any advice for sticking with side projects when you spend most of your day coding?" - That's the question you linked to. Mine is very different –  Aviv Cohn May 15 '14 at 16:02

5 Answers 5

up vote 1 down vote accepted
  1. Is this normal? Yes. At least in my experience I am very passionate about programming, but also struggle to get started at times.

  2. In my experience, the best way to overcome it is to just do it. Maybe set a minimum amount of time you must code for every day.

share|improve this answer
I would add that it is best to work on a project with many small objectives. Going for the 3d physics engine working on all platforms is likely going to burn you out by the end. Being able to say every now and again "Good, another thing accomplished" is extremely helpful for motivation –  Neil May 15 '14 at 16:03
  1. Minimize interruptions. Only check your email twice per day. Let phone calls go to voice mail. It's all too easy to get caught up in the urgent, but not important.

  2. Commit to doing the important things first. This is really important; you can always check teh facebooks, watch that really important youtube, or talk to your coworker about your fishing trip later. Close your browser, and don't open it again for 4 hours.

  3. Ensure you're comfortable. Get a good chair if you don't have one. Pay attention to ergonomics. Get up and stretch every 30 minutes. Make sure you have a glass of water nearby to sip on. Don't let your blood sugar drop. Exercise three times a week for 30 minutes.

  4. Eliminate cognitive dissonance. Does your vision of the software differ from your bosses? Work that out. Do you have underspecified, vague, and/or untestable requirements? Work that out. Having difficulties with your significant other? Work that out.

  5. Break it into smaller tasks. If your tasks are more than one or two days long, break them down until you can get at least one thing finished per day.

  6. Get Started. This is both the easiest part and the hardest part. Once you begin moving, your momentum will carry you forward. Stay relaxed and calm. Think about the code, and what it needs to do. Write it. Write some more. Fix some errors. Keep going.

  7. Enjoy the process. You say you like coding? So do some of it. Still have writer's block? Recheck number 4, above.

Now excuse me while I close my browser and go get some work done.

share|improve this answer
So by your experience, if I'm lacking motivation at the start, I should just 'power through' this feeling and get coding? –  Aviv Cohn May 15 '14 at 16:19
Sure, after you've checked off all the other things I mentioned. :) Pay particular attention to #3; what is in your life that is bugging you enough to keep you from coding? There's something; what is it? If it's just your natural propensity to do what you feel like doing in the moment, trust me; you'll feel better getting some actual work done. It's not about gritting your teeth and exercising will-power; it's about getting started. You may have to get started a few times per day. The quicker you do that, the faster you're productive again. –  Robert Harvey May 15 '14 at 16:19
+1 for "Get Started" - it doesn't matter if you are making total rubbish at first, you need to get started if you're ever going to finish. Just open up your editor and start typing... –  glenatron May 15 '14 at 16:23

Determine what's your next task

When you sit in front of your empty IDE, do you have a clear idea of what you should do right now? What feature to implement? Where to start?

The problem I noticed frequently is that sometimes, while the project is clear enough, the roadmap is less clear, and it's even less clear what should be done right now. This encourages watching videos or reading blogs, and while you may believe that you wait for inspiration, you're actually waiting to know the precise task to do.

If this is your case, what may help is:

  • To clearly ask yourself what should be done ASAP. You have done the architecture. You have your design in front of you. Is it this task which is more important, or that one? Would you be able to do that task if you haven't done those ones? This involves prioritization.

  • To have tasks in the first place. If you're in front of hundreds of pages of design and architecture which look like a monolithic project, you may have a hard time prioritizing.

  • To make the tasks granular enough. Starting something you'll maybe finish in a week (if you don't move to another task meanwhile) is not very rewarding. Starting on a task which is finished two hours later, then do a thirty minutes long task, then another one during one hour puts the project on a pace where you know probably better what you have done, where you are right now, what should you do next and what are the current blocking issues.

Don't try to be perfect

You're talking about design. This shows that you're not someone who starts a new project by opening an IDE and starting typing, without a clear idea of the project itself.

This is good, but it shouldn't penalize you. I had a few colleagues who had a hard time starting to write code, because they weren't truly sure that their design is right or that their first idea of a possible implementation is the best one.

Don't do that. Your design is probably good enough for now, and your first idea of an implementation is acceptable, until you find a better one. Don't spend days searching for the best one: once you get enough design to have a clear picture, write code, and then refactor.

You may get your first design wrong, but you'll get a better one faster if you start implementing right now than if you spend days watching videos, awaiting inspiration.

share|improve this answer

There is a difference between "soft work," such as designing, watching or reading (programming related topics), and "hard work," such as coding. Your issue seems to be that while you like programming, per se, you prefer to do "soft work."

That's fine, up to a point, because it helps your creativity. At some point, though, you need to crunch your teeth and do some "hard work." One way to motivate yourself to do "hard work" is to schedule it before or after some "soft work" which you use as a "reward."

Basically, you need to determine for yourself the ratio of "hard work" to "soft work" you need to do to get the job done, then do the minimum of required hard work. The soft work will take care of itself.

share|improve this answer

Is this normal?

Yes, it's very normal. It's somewhat akin to writer's block.

How do you suggest I solve this?

Although, I think that Robert Harvey's emphasis is misplaced, his first point is spot on. When you're in this state, you must minimize interruptions. In fact, my best advice is: Force yourself through at least three Pomodoro sprints.

Robert Harvey recommends that you "Commit to doing the important things first." By and large, I agree with that, but not when you're in this state. Specifically, I think that deciding what's most important takes up too much energy and willpower. Instead, I think that you should try to trick yourself into doing something, namely anything, to get this project off the ground.

By my calculations, if you make it through three Pomodoro sprints, and you manage to check-in some code that can stand by itself, or really do anything at all that furthers the project, then you will have broken out of your funk, and will have set yourself up rather nicely to continue on with the project in earnest.

share|improve this answer
@glenatron: Please see my answer too. –  Jim G. May 15 '14 at 16:51
So what you're saying is that the best approach is to just 'power through' the initial funk and just force myself to code? Thing is I don't want to be burnt out by forcing myself to code, so that's why I'm asking people here. –  Aviv Cohn May 15 '14 at 17:22
@Prog: If you can't slog through three 25 minute Pomodoro sprints, then you might want to consider a different profession. –  Jim G. May 15 '14 at 17:23

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