a. Whatever you agree to do - always get a deposit
b. Draw up a workable and legal contract between yourself and whomever you are doing the work for - to protect yourself
c. Always, always leaves enough time to test, test, test
d. The client is not always right, and sometimes they have to be educated
e. Compromise - even if a client wants something that you know is ugly, un-wise, etc - give it to them, after all you are working for them, plus they will play you
I am sure more will come to me.