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?


6 Answers 6


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.

  • 2
    +1 for reminding us that even the highest ranking members of a team can still learn from lower ranked members.
    – oosterwal
    Mar 21, 2011 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, 2011 at 13:34
  • 3
    Or just speak to your rubber ducky.
    – Carra
    Mar 21, 2011 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, 2011 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, 2011 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.

  • 3
    ++ 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." Mar 21, 2011 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. Mar 21, 2011 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.

  • 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.


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.

  • 2
    What's this "box" that everyone talks about and how do you know when you're in it?
    – JeffO
    Mar 21, 2011 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!

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