62

You ever try to implement something simple but for some strange reason it doesn't work.

So you try a possible solution but then something else doesn't work. You keep trying different workarounds but every time something different isn't working.

Every time you get one step closer you also get one (or more) step farther from solving this problem and its now been 3 hours when this should have taken you 10 minutes. And it still isn't solved.

There is no one in your company who can help, and you are about to put your fist through your screen.


At this point you are so frustrated you can no longer think about the problem clearly. What should you do at this point? Or what can you do to avoid reaching this point?

gnat
  • 21,213
  • 29
  • 113
  • 291
JD Isaacks
  • 8,936

15 Answers15

70

Although this is a real problem, it isn't specific to programming. However, it is IMHO so important that it deserves a place on this forum.

My suggestions: have a break. Go for a walk, meditate, sleep, do physical activity* - do something completely different to allow your brain to relax and get out of the mental rut, while letting your subconscious work on the problem in peace. Usually it delivers results surprisingly fast - it just needs to let you know about it. But while your conscious mind is desperately repeating the same cycles of thoughts over and over again, it won't be able to listen to anything else.

what can you do to avoid reaching this point?

Relaxation and mindfulness techniques are a key to get over the stress reactions and allow your mind to focus clearly. And practicing these really pays off. When someone is experienced in these, (s)he can already notice the stress level rising before the frustration could take over. Then one can interrupt the cycle of thoughts e.g. by taking a few deep breaths, or doing a couple of minutes relaxation practice. This may be all what is needed at that point.

* kiss your partner, caress your pet - suggestions from my wife :-)

  • 12
    +1, Our mind is ALWAYS attempting to solve problems, just because we aren't consciously trying to solve it, our mind is still churning away. That's why you seemingly remember a name out of the blue, an hour after not being able to recall it. And wake up with a problem solved in the middle of the night. A great book explaining this is Pragmatic Thinking and Learning: Refactor Your Wetware – CaffGeek Feb 02 '11 at 20:42
  • +1 Couldn't of said better myself. I actually get out of my cube, leave the office, and walk around town, call my wife, and then go back to the office. Works almost 100% of the time. – Mr. Ant Feb 02 '11 at 20:50
  • 9
    And don't work more than 8 hours a day. The more tired you are the easier you get frustrated. – HLGEM Feb 02 '11 at 22:25
  • @HLGEM, very good point indeed - I took it so granted I forgot to mention it, but it is worth repeating. – Péter Török Feb 02 '11 at 22:27
  • my first thought was taking a break,+1 for that – Mahmoud Hossam Feb 03 '11 at 01:40
  • 3
    When I take a break to pee, I often have the problem solved by the time I'm walking back to my desk. It's like your subconscious is waiting for your conscious to shut up. –  Feb 03 '11 at 08:14
  • 1 for "mindfulness"
  • – pufferfish Feb 04 '11 at 11:06
  • Love the suggestion but what about if we in a tight deadline? – junxiong Jan 05 '12 at 12:28
  • 1
    @junxiong, one can use these techniques even when under time pressure, but this requires experience. Someone who has been e.g. meditating for years, can control and calm him/herself in a matter of minutes or even seconds. But trying to learn something new - and especially mindfulness - under time pressure is very difficult. If all else fails, take this as an important lesson, and once the deadline is over, start preparing for the next crisis by analysing your behaviour and practicing some techniques mentioned here or in other answers. – Péter Török Jan 05 '12 at 12:37
  • @junxiong - This is a very opinionated view of mine. Honestly, while deadlines are a crucial part of software development, you're doing everyone a favor to be honest about your progress. If you describe the issue well, no one should be calling you incompetent for not having it solved immediately. Sometimes managers can help come up with alternate, indirect solutions, or suggest more eyes on an issue. A manager who replies "Get it done tonight OR ELSE" is only going to have themselves to blame; and you may be surprised to find your own manager isn't one of those types. – Katana314 Jul 16 '13 at 21:43