If you are serious about this, I suggest you go down to the bookstore and pick up a book on "Object oriented design and analysis" which typically teaches you how to structure your programs to get the most out of organization, code reuse and the planning it takes behind it.
Another book you may want to look at goes a little more detailed into the world of actually writing code to make it easier to maintain, read, and organize. It is probably my favorite code book called "Code Complete 2" by Steve McConnell. It is a grey and black book and comes from the year 2000-2002 time period. However the principles it teaches are awesome and still in use today. It tell yous everything from how to structure loops for optimal performance, how to write great comments and documentation, and even shows you speed timing comparisons between different methods. Here is a link to the site and a picture of what the book looks like, plus a link to what the book has in it...
Code Complete 2nd Edition by Steve McConnellThis book in combination with an object oriented design book will put you on a great track for making large well organized and maintainable programs.