The method that I use and which works very well is to try to take on different roles in your application, and then program as if you were in that role. For example, when you work with a database, do not even think about the graphical interface. Instead, consider providing classes and methods that simply work with data. If you create your own SDK, which you will use later, you will find that its maintenance will be much easier.
Test-based development is your friend. Get to know DUnit and create small, concise tests to run any nontrivial code. Document interfaces and everything that is not visible when looking at a screen full of code.
skamradt
source share