B-ZaR said:
It's hard to actually learn best practices when you're still wrapping your head around the concepts they involve. A small test project helps figure the concepts out which in turn allows deeper understanding of the rationale behind those practices. I don't mean you should code an entire software with no regards to practices. Just something to get you comfortable with the environment.
Ok I can totally agree to that.
But as you said, when starting a bigger project you should really worry about such things and most important: Planning (ahead). That's probably the thing I tell all people I give any advice, because I made that mistake several times in the past myself and now think it's very important if not mandatory.
So in case you want to start a bigger project (this does not account for little test games or minigames for let's say PandoraPanic!), plan first and code later. Grap a pen and paper and start writing down what elements you want to have in your game, what should the setting be like, what is the player supposed to be able to do, and most important what type of game is this going to be. Then when you have a list of ideas, go through it again, look which play well with each other and which don't, maybe connect them with arrows, add comments, draw an idea-map (these connected bubbles with the ideas in it) and critically see what's left of your initial ideas and how you can integrate that into your type of game and gameplay (maybe even take a break of a day between these steps).
After you have all your ideas sorted, don't start coding directly, but start drawing class diagrams (UML charts for example). See what classes you are going to need, which properties do they need, where can you make use of inheritance, etc.
None of these figures and diagrams need to be perfect or final, but they can evolve through the process and you should always take a look at stuff you did not read through for a time to update them and keep your ideas fresh.
I know this is a long, tiresome and boring process, but in the end you will have a good list of ideas and game concepts and even some class-charts, which will greatly help you in the process of coding. The reason behind this is to not get lost and keep your code clean from the start.
If you plan ahead what classes you are going to need, you did most of the work already and coding will be easy and quick. At the same time you avoid being forced to use nasty hacks as you won't need to forcefully integrate new game concepts in your network of classes which they don't fir in - as you have planned ahead how to integrate each feature.
Of course you won't be able to plan everything from the start, but try to do as much as you can, the rest will evolve eventually. Just keep yourself from starting to code too early.
But that really does only account for larger projects, not the early test ones (though you can probably test this process, too and find your preferred way of doing it).
I just thought it's an usefully advice worth sharing to novice developers.
foxblock out