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.

Let's say you get stuck on an solution for a while. What do you do?

How do you get it solved?

What is the best way to not feel frustated?

share|improve this question

closed as not constructive by ChrisF Jan 20 '12 at 10:54

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

8  
Best way to get out : solve the damn problem –  Ranger Mar 21 '11 at 11:55
    
Do you work alone or in a team? –  TeaDrinkingGeek Mar 21 '11 at 12:41
3  
Post on StackOverflow? –  JeffO Mar 21 '11 at 12:54
    
Related post: Dealing with frustration when things don't work. –  Péter Török Mar 21 '11 at 13:05
1  
"A Day" ha! try 20+ years then its problem. –  Darknight Mar 21 '11 at 13:54

6 Answers 6

up vote 20 down vote accepted

Ask your co-workers for help

Really, talking to other people about your problem helps most of the time. Most of the time when you try explaining your problem you'll come up with the answer yourself because you are looking at it from a broader view. This is the main reason why I like working in a team. You'll be suprised how much knowledge there is within a team, even if you are the 'highest ranked' developer in the lot.

share|improve this answer
2  
+1 for reminding us that even the highest ranking members of a team can still learn from lower ranked members. –  oosterwal Mar 21 '11 at 12:26
1  
Another reason why it is good to talk to your coworkers in such a situation is that it helps to spread the knowledge around--both of what is to come (and why), and how things are presently done. –  Sparky Mar 21 '11 at 13:34
3  
Or just speak to your rubber ducky. –  Carra Mar 21 '11 at 14:45
1  
+1 -- My coworkers and I typically sit in each others' cubes when discussing programming issues we're dealing with. Just getting up from my desk is enough to help me start thinking differently. –  bedwyr Mar 21 '11 at 15:25
1  
I find that, half the time, just explaining the problem helps to frame it and provide solution without even needing a response from the person I'm discussing with. You can still use them as a sanity check on your new solution, too. –  HorusKol Mar 21 '11 at 22:44

I would shelve it for a while. If you got time, work on something else for a day or two. The solution or other ways to find the solution might come to you at oddest times, like right after you wake up or in the shower.

You sometimes just have to let your brain do some background processing and cleaning up unnecessary data.

Also, according to Andy Hunt in "Pragmatic Thinking and Learning: Refactor Your Wetware", while you are using your 'logical brain' your creative brain is being put on the back burner. Many times you need creativity to solve problems. He suggests doing things that activate your creative brain, like drawing.

share|improve this answer
2  
++ This is just what I was going to suggest. If you're trying too hard to push one line of thinking you can just get more and more stuck. Thinking about other things entirely can allow fresh approaches to bubble up. For me, often, it's 3:00 in the morning when I think of them. Then my wife says "Why are you getting up?" I say "I gotta try this out before I forget it." –  Mike Dunlavey Mar 21 '11 at 12:41
    
In college, this was called the "Gilligan's Island" approach - if stuck, go watch an episode of Gilligan's Island and then come back to it. They didn't mention specifically right-brained activities like drawing, but that does sound like it's worth trying out. –  Ethel Evans Mar 21 '11 at 18:43

if you really stuck with some problem leave it for few days and do some other work. And after few days go back to that problem and try look from different point.

share|improve this answer
  • Google it
  • Search on Stackoverflow.

You might not be the first one who would have come across the problem or something similar to it. You wouldnt get the whole solution but I have found hints to be useful.

I try to do the above before interrupting my co-workers, it just shows that you didnt even try.

share|improve this answer

Start over, use a different solution. Try to think outside of the box, or apply at least a workaround, even though it might be ugly.

When all you've got is a hammer, then all your problems are nails :-)

The best way not to feel frustated is having experience. Experience taught me that all source code related problems can be solved, sometimes it just takes a little longer. You'll almost always solve the problem eventually or at least mend its symptoms to an acceptable degree.

I am a person who can't relax when having an unsolved problem. But sleeping one night over the problem usually helps. Often times, you've just overlooked some part you'll find on the next day, when you start over.

share|improve this answer
1  
What's this "box" that everyone talks about and how do you know when you're in it? –  JeffO Mar 21 '11 at 12:55

Go home, rest and lose attention to the problem. Return in a Day or two and start from the scratch, usually the solution is about to "jump" you at that point.

Do not try doint other stuff, you really need deffusion. Focusing something else isn't gonna provide it!

share|improve this answer

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