Absolutely. Thinking of an idea and then coding to its realization is a classic method of learning to program. It sounds like you have a great system for learning. I'd only caution that even if you come up with a solution to a problem on your own: do the search engine/stack overflow research anyway to see alternative methods. If you don't find any: blog about it.