The most important part of coding is being able to solve problems. If you cannot solve problems than you wont be able to code. Make no mistake there will always be problems when you code. If you're code runs on the first try you should be skeptical. This is inherit in coding and as a developer you need to accept bugs for what they are and learn to move past them. The Uber driver doesn't get angry when he runs out of gas he goes to fill it up. It's the same thing for great programmers(GP). GP's don't get angry when they encounter a bug, They start debugging.
My Rule #1 of programming is anything is solvable if you just know how to google it. 95% of your problems can be answered using a quick google search. The other 5% will be problems you will need to spend time debugging trying to figure out. It's an obvious rule but that's how it should be.
I love programming for this reason. It makes me feel like i can do anything. If you ever run into something there is always someone who has gone through the same issue and took the time to ask a question on StackOverflow. Google is your best friend when programming.
Using a logger can save you a lot of time and effort in the long run. If you have it setup so that your game tells you important information about the systems that started it will be a lot easier to understand the class that is the cause. This is especially useful to implement in your own Engine.
This rule will always be true; if you want to be good at programming you just have to get good at googling. Sometimes whether or not you find a search result depends on what your keywords are. It's important to think of google as a keyword searcher. Sometimes searching for synonyms of words or rephrasing your question will help you find what you need just keep going at it before you decide to spend hours trying to debug your code.