The best advice for learning to program is basically: write a lot of programs.
Project Euler contains lots of problems well suited for this purpose, as the resulting programs are manageable in size while actually allowing you to solve an explicit problem.