9

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?

Dynamic
  • 5,746
  • 9
  • 45
  • 73
maz3tt
  • 1,583
  • 1
  • 13
  • 24

6 Answers6

20

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.

Jan_V
  • 1,622
  • 1
  • 11
  • 19
  • 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
  • There is something I disagree about this useful answer not because I'm introverted and nothing to do in spite of professionalism in programming but you see my team leader only concerns about bigger picture (messaging, geofencing, etc.) over smaller picture (list item swapping for example). My team leader tell me it's just a listview swapping and he doesn't care for my help. After a few days of tasks and I'm still stuck. I explain it again for help my leader told me that I should ask for help more. This is why I go solo. I tried everything I could to seek attention for help. – David Dimalanta Jun 17 '14 at 04:14
11

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.

c_maker
  • 8,250
  • 4
  • 35
  • 53
  • 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." – 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
4

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.

Dainius
  • 340
  • 1
  • 8
3
  • 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.

Simon
  • 425
  • 3
  • 6
1

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.

Falcon
  • 19,248
  • 4
  • 78
  • 93
1

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!

Jaster
  • 153
  • 3