1. Write big enough programs of your own such that you experience them collapsing under their own weight. That forces you to see the consequences of your actions. Only then can you really learn how to structure things better.
2. Try to learn the underlying technologies thoroughly. For example, try writing a simple C compiler and linker. That will teach you about a lot of things that a lot of the programming world sits on top of.