I keep answering similar questions with similar answers, so I'm trying to put this stuff in one place. I'll just start referring people to this thread. Please feel free to offer comments or suggestions, and I'll make corrections where appropriate. I'm open to debate on anything mentioned here, but this is what I do, it works well for me, and is drawn from the advice of significantly more-experienced coders.
You can just scroll down and start reading, but the core of this thread involves these three posts: