The environment that we are in today, where every type of knowledge is available on the internet. When you want to solve a problem and write code. The moment you type the question, most of the time, 95% of the time, you get the code with different solutions in most of the popular languages. That too as the first result and answer in the right side box, showing you the code.
As described in the current environment, learning to code becomes a hard task. Once you see a solution code, you feel like you understood the logic. But the problem with this is that it is stealing away your opportunity to solve the problem and the joy you get once you solve yourself. Both of these are being robbed from you.
In the long run, it is making you crippled and dependent. You can never create software in your life. You will be in-competent to code. You can show off somehow and get the task at hand done. But never you can use it to solve any problems at your hand by writing code.
So it is essential to be committed to putting the effort needed to solve every problem on our own and take how much ever a time to solve it.
Take this principle to heart. I will never ask a solution or search for a solution to the coding problem I am solving. I will try to solve and after trying for one or two days, if I don’t get it, I will ask for hints. Never look into other code. But once I get my own working solution, I will look into other solutions to see how they have done.
At the end of successfully solving a coding problem. Reflect on what you don’t know at the start and how did you arrive at the solution. What is the pattern that you have found to solve the problem? Can you use this pattern to solve similar problems? Can you compose new questions, which might require the current pattern to solve it?