It is a method. It is a long, slow and frustrating method but it does work. For example my latest project is learning Unity. Unity uses C# as its scripting language. No big deal there, I know enough C# to get me in trouble so I should be OK. I am learning through doing so I am building a little 2D platform game just as a learning exercise. I got the basics down so I figured I would get cute and build a recycling elevator to carry my little character up to a higher platform. Many hours and several days later the elevator still drops like a rock. No continuous up and down like I want it to. I have perused all the Googled suggestions, tried all the sample code and even, at this point, understand the code. Owl boogers. This should work. I am at the point of just staring at the screen. It works! (The staring at the screen part, not the elevator part.) Somehow I made my elevator platform a Rigid Body. Rigid Bodies are subject to gravity. If the platform is subject to gravity it falls off the screen. I kill the Rigid Body component and the elevator works.
How has this helped? I rewrote the code in about 5 different ways and I understand them all. Before I was just cut-and-pasting with only a vague understanding of how this worked. I know to watch out for the Rigid Body thing. I know after hours of trying different code and scattering print statements all through the code to see what is happening that sitting back and staring at the screen is not a bad thing to do. I know that even though I spent many hours trying to find the solution when it was actually something really simple having nothing to do with the code I was troubleshooting, I came away knowing a lot more than I did going in to the problem.
I also learned that although making mistakes like this leads to great learning experiences, it is still a royal pain in the ass.
Now I have to figure a way of teaching this technique to my students in a way that they do not think I am more of an idiot than they already know I am.