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 began to code 3 different projects, and it is alright, I have done it for 5 months, some php, some c, some matlab, but for some reason I got stuck...

Usually when I pass through this I leave for a while or go to sleep (and while sleeping I'm thinking on a solution to the problem I´m currently facing, the most important or urgent), and usually when I return (if I slept well) I have the solution and code comes easily. I don not know what you think, but I have been stuck for around 10 consecutive days! I can't get out of the hole, I only see how time is passing...

What do you do when you lose the inspiration?

Some friends say Go get some air, do sports, well I have tried...

I know lot of you have passed this stage but how?

share|improve this question

migrated from stackoverflow.com Mar 6 '11 at 1:22

This question came from our site for professional and enthusiast programmers.

closed as off topic by Yannis Rizos Mar 7 '12 at 14:57

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

Pursuit of Happiness –  Mahesh Mar 6 '11 at 1:21

6 Answers 6

In our team we have a simple rule. If you are stuck on something for more than 15 minutes, ask for help. Yes, that does mean we are frequently interrupting each other, but on the flip side we almost never have anyone being unproductive. On balance, it is a strategy that is a big win.

share|improve this answer
+1 for the 15 minutes. It will take the person interrupted that long to get back into the flow. After 15 minutes you are likely in need of a fresh perspective. When asking for help it is best to explain what the problem is and avoid suggesting solutions. I spend days when someone flipped the default on the end of file flag in a working program. Several people failed to find the problem when told it had been reading the file. The person who finally found the problem was told it wasn't processing the file. –  BillThor Mar 6 '11 at 3:35

Approach the problem from a new perspective.

Often a time, the 'answer' you have in mind to the problem you're trying to solve won't be the best solution. Do whatever it takes to start thinking from a new slate and tackle the problem again (independent to how you tried to solve it previously).

If you're still stuck, ask for help. You won't learn much from being too proud to ask for advice or guidance.

share|improve this answer

I think that our friend wants to say that his mind is burned out somehow...

I know this feeling. Days pass and you cant be productive. I feel you. My solution is this... Take two days off. Dont even turn on your pc. Dont do anything , that means dont watch tv,dont read anything nothing tottaly.. Then just do some sport ,go out with girls etc...

Then at your free time again dont do anything and try to do meditation... If you dont know how you shoud learn.. It will help you reset your mind... But dont be fooled by the first positive results... You must empty your mind sometimes from time to time...

I know some people inculing me ,that due to overthinking, overworking mentaly , were stucked for years.

share|improve this answer
Agree with this as well. We were built to need rest from time to time. I do the meditation as well as gardening. Helps to clear out the mind and distress a bit. –  mwgriffith Mar 6 '11 at 14:57

Shake yourself out of your routine. Suggestions:

  • Spicy food
  • Attend a sensational trial
  • Travel
  • Swap clothes with your girlfriend/boyfriend for one evening
  • Learn a new instrument
  • Go a week without wearing shoes
  • Get a tattoo
  • Write a poem versus code
  • Try a lemon juice and olive oil cleanse
  • Volunteer at a homeless shelter
  • Write a kind, physical letter to someone you miss and haven't seen for five years
  • Reverse shoplift - sneak vintage clothes onto racks with random prices
  • Adopt a dog
  • Try acupuncture
  • Believe in miracles
share|improve this answer
+1 for "Swap clothes with your girlfriend/boyfriend for one evening". Lulz. –  Bobby Tables Mar 6 '11 at 6:58

As people have suggested, asking someone for some help or to be a second set of eyes or even to just bounce ideas off of them will be a great help to you.

If you have already done this step, or for some reason can't do this step I'm would suggest:

Write something.

Seriously. It doesn't have to be pretty. It doesn't even have to solve all parts of the task. Just write something! Take the juggernaut approach and brute force a solution.

This will get you writing code again. It will get something working for you to test. And once you have code there and it hurts your soul to even look at it, you'll have something to refactor and clean up.

share|improve this answer

Get a stuff animal, explain to him/her the problem. At work one of my co-workers does this to me (I'm not stuffed though!!) and sometimes I make a very small suggestion (without even fully understanding 100% what was said) and then he goes off and gets the solution. Other times in explaining his problem, he comes up with his own answer. I suspect explaining to a stuff animal, action figure, or writing an e-mail message [I do this] explaining the issue will result in getting the answer most of the time.

Occasionally with my co-worker I need to go seriously dig into what he did to help him out and make suggestions. This is pretty rare, but it happens. If you are really stuck on something, then getting someone else's perspective may help you get past it.

If you are just generally burned out then go do something else or just work on a different project. Some people unwind by coming home and playing with Ruby/Python/other newer languages for fun because Java/C/etc. drain them. But it depends on the person.

share|improve this answer

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