The great way to learn programming is to write small programs - e.g. solving some tasks - and then comparing results with some good solutions. You may read in biography of Benjamin Franklin that he successfully used the same technique to improve his writing style.
Now, where to find such programming problems? Here at CodeAbbey we have collection of over 200 puzzles with difficulty increasing by and by - and covering topics from general algorithms to data processing, basics of web-development and low-level coding.
Solution for every problem is accessible after you solve that problem yourself - which helps to keep motivated on writing the code by your own hands (one really can't learn coding without writing a lot of code).
Below are links to some top-rated users which have solutions in most popular languages and could be recommended for learning.
You can easily browse the user list yourself filtering it by your preferred language!