Believing its difficult makes it difficult!
There is no such thing like code learning, learning algorithms yes...
You learn progamming, progamming languages...
Then you write your own or correct others... with time you develop your own style...
When you say and believe its difficult, repeat:
"Programming is easy, there is only 3 types of instructions:
Sequence
Condition
Loop
With that I can do all..."
Feeling better?