honestly i havent warmed up to using tons of tools for this kind of thing. when i first started to program a few years ago i hated the idea of using engines, frameworks, tools etc (i understand how absurd that is now
)
as far as keeping your code ready for that sort of thing or following methodology i would definitely say read about the AGILE programming methods and way of thinking. i personally learned a lot from that. in general i would say that it is important to keep your code as generic as possible. dont ever let yourself get roped up in one specific implementation.
make sure that you do everything in stages that build from the last step you completed. like, you identify a specific problem area or goal and attack it. then you prepare for the next logical piece that would lay above step one and start to build in that area. after this you go back from step one and refactor all your code together with step 2 to make it more robust. then prepare for step 3 rinse repeat. it really solves a lot of problems down the road because you are always ready for any possible changes and are skilled at filling in the small gaps that come up along the way.