Take the 2-minute tour ×
Personal Productivity Stack Exchange is a question and answer site for people wanting to improve their personal productivity. It's 100% free, no registration required.

I have a problem that whenever I struggle with a programming problem, for example in computer vision or game programming, I try to look for an existing demo or some code that does that job. I always run away if the problem is hard, so I try to cheat, to copy. I don't know how to solve that problem, I tried but I couldn't. I also get very anxious. I'm also worried about my next new job that I also face that problems that I faced in my previous job...

share|improve this question

closed as off-topic by AsheeshR, Adam Wuerl Dec 20 '13 at 5:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking career advice are off-topic here, but once you find that dream job we'll be happy to help you become more productive in it!" – AsheeshR, Adam Wuerl
If this question can be reworded to fit the rules in the help center, please edit the question.

8 Answers 8

up vote 19 down vote accepted

As a matter of fact we all at some moment of time struggled with code. some one will share it and some one will not. You will find a lot of fakers in our field. at least i have found a lot. so don't worry at all.

1) As far as your problem is concerned i truly understand what you are facing because i was in your shoes not so long ago. the solution to your problem is that try to solve 2- 3 programming problems in a day at your job ,the best you can do. you have to repeat this exercise everyday. you have to say to yourself i am doing this to improve my self confidence in programming. you will notice that in a month or so your mind set will improve, your anxiety will decrease and now you will start attacking the problem in the appropriate manner.

2) the problem seems very large to you. the best way to attack a problem is to break it in manageable chunks on the piece of paper and allocate a time frame for each part.

3) it is very important to think about only one problem at time. for example if you creating a very complex insert of the form.only think about insert and forget about updates and deletes

4) try projecteuler.net

5) also read programming books on design patterns, object oriented programming, architectural designs of the applications, data structures. this will definitively help you build your confidence.

6) well also always keep your skills sharp. you must be a better coder in 2013 then you were in 2012. that's also the key to confidence.

7) "try to solve problem but couldn't" because you are not in the right of mind. try to improve that by doing and repeating my first point that will definitely help you in this regard.

8) why not subscribe to sites like tekpub.com or pluralsight.com.

share|improve this answer
    
mention books in 5) is appreciated –  Moaz ELdeen Dec 17 '12 at 12:07
1  
+1 for projecteuler.com –  swapnesh Dec 18 '12 at 18:10
    
+1 for projecteuler.com –  Zagorulkin Dmitry Dec 25 '12 at 19:00

Many programmers get into the same exact scenario. It is easy to panic when you try multiple solutions and can't get anything working correctly. I find that this causes you to get a "coder's block," preventing you from being able to think logically and solve the issue.

One great way to approach a stubborn issue is to remove yourself from the context. Take a walk. Discuss the issue with someone else. If it is not immediate, come back to it after lunch or the next day. With a clear mind, you are rejuvenated. When you return to the problem, you are able to take a logical approach to it.

share|improve this answer
  • try to pair with someone; it always makes things much easier; it's a lot of fun to work in a good team
  • when you're done, make sure your code is as good as you can make it to be (if the product works but the code is a mess, it's not what your employer needs) - imagine if you hire a plumber who will be cutting corners, doing a poor job etc - would you like to fix all these leaks in the future? Ask someone to review your code; there is no shame in it and you can learn a lot
  • read Clean Code
  • relax, don't let hard tasks to scare you
share|improve this answer

Copying code is normal. You learn programming like you learn a language or musical instrument - by repeating something over and over until you naturally understand it. It's all a part of the apprenticeship learning process.

With more complex architectures, there's a lot more abstraction. You will often need to understand only a small component of it. And in the software engineering field, you'll often have to unlearn methods as they grow obsolete, and learn new techniques. Mastery can be a liability.

Keep doing it, but try to understand why it works that way as you go along.

You're most likely not being paid based on what you know, but on how you're solving the problem, even if it's utilizing someone else's solution. There is no guilt in engineers using an 'open sourced' mathematical formula without understanding it, so don't feel any guilt in using a fully functional open source code.

share|improve this answer

Even though the question has been answered I would like to add my answer .

If you are struggling at coding it's most likely because you are getting anxious .If you understand Hello World program in any language it's good enough start .You need to divide your problems(program you are given to do ) into a number of smaller problems .Then try solving them individually .If you are still not able to solve it divide it further until it can't be divided anymore and then try solving it .Smaller problems are lot easier to solve individually .

Like lets say you are asked to make a graphical UI system or a game start with the absolute basic like creating hello world GUI . It can't be that hard right ? And then start building small incremental features on it one at a time .At first it will be slow but soon you will pick it up .

That's how many people learn .

share|improve this answer

It looks like you are driven by the fear of failure. This can be paralising for.your creativity.

The small steps way, f.e. modifying existing demo is in fact very good to deal with complex problem. This is the decomposition. You learn how to achieve your goal by applying small changes. The full understanding will come with time, but when it won't happen, don't be stressed about it, because nobody expects you to be genius and understand everything.

You should analyse if you're not trying to be perfectionist, be better than others. Try to find pleasure in what you are doing, and not in being always better than someone else.

share|improve this answer

I don't know if I should say this, but if your job is making you anxious. Probably you need to start thinking if you actually like the work you are doing? Are you happy? Maybe its time for a change....Give yourself sometime to think. Hope you will understand the reason behind better.

share|improve this answer
1  
Trying many different solutions to a coding problem and not succeeding can cause these emotions. It isn't uncommon to programmers. –  Gaʀʀʏ Jan 26 '13 at 6:50

Find articles that do something similar (it doesn't have to be the same) to what you are trying to achieve. The more you will read and educate yourself about the problem, the easier it will appear.

The fact that you find something difficult and resist working on it is common. The workaround is to make the problem easier by educating yourself. If the problem is around computer vision or game programming, you might need to educate yourself in Mathematic and see it doen in code several times before you would grasp it yourself.

Also trying to teach how you would do it to someone will help you realize what aspects of the problem are not clear to you, and will make you understand the problem better.

share|improve this answer

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