I personally feel if you want to understand programming language, you have to learn the concepts using any good text or having guidance from someone, then collect code segments written by other programmers and understand those segments using dry run (extract output on paper for each step considering yourself a compiler) after that try the program by yourself compile and run it and be confident that output would be same as you have at your paper using dry run. Now try to write same program by yourself without looking at it, also try new approach to write the same program. After having some practice sessions, you would be able to solve programming problems without any help. Never afraid of errors while compiling the code. Error resolving enhances your capabilities of conceptual diagnosis of the problems in code. There are lots of things to discuss for making your experience better in any programming language, for now we have to stop here.