These are tips that I discovered after many years of learning and teaching programming. I found that students who succeed, eventually becoming programmers of some sort, practice these tips. You have to form good learning habits, otherwise you could be spending hours in front of your computer without really learning. On the other hand, if you practice these and other good habits, you get steady progress from less time.
* You **cannot learn to code by watching other people code**. You have to code for yourself.
* Importing modules is one thing but **Never cut and paste code** if you don't completely understand the code. Whenever code is unfamiliar to you, go through it line-by-line with scratch paper. Type the code in character by character.
* To learn to code you have to **get into the details**. At every point in a program's execution you should know the value, scope, and type of each variable. You will need to have a piece of paper and a writing utensil to keep track of this information.
* When you encounter a tricky topic (recursion for example). **Test your knowledge by trying to explain it to someone else**. If you cannot get your thoughts together and communicate clearly then you don't understand the topic. You should spend more time studying this topic.
* Before searching for a solution for a programming problem, **spend time struggling to figure out your own solution**. You will likely make mistakes but the time and effort you put in will help you remember your mistakes and how to avoid them.
* Programming is about taking a large problem and breaking it into smaller, easier subproblems. **Before you write any code, write out a plan of attack**.
* Tutorials and walkthroughs can be useful but you should **learn by reading the official documentation** as much as possible.
* Ask questions and make comments during class.
* As soon as you can, start on a significant **programming project**.