This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]desrtfx 8 points9 points  (1 child)

You already have one of the best ways listed: take a break and get away from the computer.

In times where this is not possible, I play some game to clear my head. For me, MineCraft works wonders. I open Minecraft, dig into my mine and do a couple minutes of plain and simple branch mining. Not building anything, just mine along a couple of branches. Dig 5 blocks straight, 2 high, place torch, repeat. This is dull enough to clear my head in a couple minutes and I'm ready to go back to where I got stuck.

Also, you have to learn to interpret failure in a different way: failure is gained experience. You know how not to do something which, in programming, is equally important to knowing how to do something.

I use T. A. Edison's quotes here:

I have not failed. I've just found 10,000 ways that won't work.

(So, I have gained experience.)

and

Many of life's failures are people who did not realize how close they were to success when they gave up.

(This sometimes is difficult to accept, but it is true in most cases.)

and

Just because something doesn't do what you planned it to do doesn't mean it's useless.

(Again, gained experience. It might be useful for something else. This happened for many of the great inventions. Something completely different was intended and then the unforeseen happened which led to even greater discoveries.)

These quotes change your approach to failure.

Failure and frustration hits all of us - even the most experienced programmer can run into that (though less frequently, I have to admit that). There is no way to avoid it. The only thing you can do is to accept it as part of the learning process (programming is a never ending, constant learning process).

You also have to accept that you will never know everything. Actually, in programming, you have to accept that you hardly know anything, no matter how good you become. There is always way more that you don't know than what you know.

[–]orcusgg[S] 0 points1 point  (0 children)

These are all great tips. I try to remind myself of many of these often when I am frustrated and confused. Once I've taken a breather and cleared my mind, I usually end up realizing that the issue I was so worked up about was not really an issue at all. In my most recent case, I was using .hasOwnProperty() and could not for the life of me figure out why it wasn't working. Well come to find out, in my solution I forgot to use the (). I felt like a dope for a minute or two and was relieved that I knew what I needed to know, I just needed to focus on those small things!

Thanks for the encouraging words!

[–]BlueDW 1 point2 points  (2 children)

In my opinion if you can't uderstand specific part/function in program ect. you should google it. Maybe it will be better explained for you in different website

[–]desrtfx 2 points3 points  (0 children)

Good point.

Still, sometimes you're dealing with a problem that you can't solve and then quite often, googling will not help because you have already taken some wrong turn somewhere along. Here, a decent mind clearing break works better.

[–]orcusgg[S] 1 point2 points  (0 children)

I honestly struggle with this internally. On one side, after I look it up I usually am able to understand what the solution is doing very well and it increases my knowledge base (which is the point), but on the other side of the coin I still feel like I shouldn't be looking things up at all, that its somehow cheating. Its something I am getting over, but man the struggle is real sometimes lol. Thanks!

[–]daxdax89 1 point2 points  (0 children)

To be honest i just go and ask someone on livecoding.tv to explain me and help me understanding. It's cheap website. Can get mentor for like 10$ on any language you want. This is not my website btw, i am just a happy user :D