If you have never programmed before, the first thing you need to do is read a book on algorithms. The programming language does not matter (a lot of books use english as an example), but that will give you the basics.
Usually in school they teach you to build binary trees and sorting mechanisms of different types.
Now why is this relevant? Because it will teach you to optimize your code and to think like a programmer (and not as a "scripter"). Maybe you won't use most algorithms later, but at least exposure to them will make you undertand different ways in which you can program a computer.
[download a life]