What do you do when you are faced with a problem you need to solve that you have never faced before? Do you jump right in and come up with a solution on your own? Maybe you google the issue and see if anyone else has already solved this problem. Perhaps you consult a co-work or post a question on a forum. What do you do when everything you have tried hasn’t worked out and the problem remains unsolved?
I think there is a deeper question to be asked. When you need to solve a problem, do you assume there is a solution? The problem might be new code you need to write or updating or rewriting existing code to run better. It is interesting to think about because when you approach a problem, if you believe it can be solved, you often find a solution. When you assume you have a problem that can’t be solved or at least one you cannot solve, it becomes a self-fulfilling prophecy.
So what is my point? Approach all problems with the belief they can be solved. Don’t give up when the going gets tough. When you are frustrated and haven’t been able to make any progress, set it aside and come back to it later. When you come back to it, believe you can find a solution. Try something new, who knows, perhaps you will surprise yourself with what you come up with. Believe in yourself and don’t give up. You can find a solution.
Sometimes the problem is improving code that already exists. Often this code can be poorly written or doesn’t perform well. Use this as an opportunity to improve your skills. Learn something new. Perhaps with a new version of SQL server or whatever language you are writing code in, there might be a new faster, better way of doing things. Look for that better, faster way, don’t give up.
Finally, when you are writing new code, spend some time thinking about the problem and the possible solutions to that problem. You may have a predisposition to use a method (like cursors, etc.) that you have used in the past, but take this as an opportunity to at least consider other solutions to the problem you are facing. When you believe there is a better solution and commit yourself to not give up and keep working the problem, I believe you will find the better solution you are looking for.
Let me know how you go about solving problems you run into at work?