Learning how to create an efficient computer program is a never-ending struggle. There’s no rule of thumb, albeit there are still some basic points to ponder before your start learning or decide to go for it.
Learn by doing: Always play with the code. There’s no best alternate of hands-on learning.
Even if you blaze through an entire chapter of reading and a topic like “switch statement” seems pretty straightforward. You’ll still be scratching your head when asked to implement the code for the first time. So don’t wait, just roll up your sleeves and dive into coding.
Grasp the basics
Programming basics always need to come first: the better you understand them, the easier it is to learn more advanced features. Basic points to ponder of anything, not merely of programming, are the first thing one has to learn. If you skip this part, you will find trouble learning the more advance things and most likely you’ll have to get back to learn the fundamentals.
Ask for help whenever needed
The fact of the matter is that people learn faster with mentors and a senior’s feedback. So, don’t be afraid to seek help. But keep in mind; do your sufficient struggle before you find no way other than help, because frequent “pinging” others may irritate them and let them be less kind to help you the next time.
Look for more online resources.
There’s a wealth of content. If a particular concept doesn’t make sense, or difficult to understand then look for alternate resources. The online resources to learn computer programming are countless. Sometimes an image, an animation or a video saves you lots of time learning complex things.
Don’t take the sample code sufficient
Reading sample code is not enough to understand how it works. To build up a true understanding, you need to actually execute the code and play with it. You may want to make little changes of your own to see how does it work the other ways. It will certainly fill you with great pleasure that you have done “something” yourself.
Take breaks while Debugging your code
While debugging, after spending a substantial time, if you don’t figure out where the problem exists and there’s no guarantee that you will fix it, the best idea is to step away from the bug for at least a couple of hours and return with a fresh mind. Experience tells that you almost always come up with a better understanding of the problem in question after a break.