I agree pills can fuck you up, but so can water if you ingest too much in too short a period. I am always worried about street made drugs because you never know what it really is. If it is a prescription drug you atleast know that is made to a certain quality and should be safe provided you use it correctly. Here are the rules that I have always followed.
1. Know the effects of the drugs you plan on taking.
2. When you buy a large batch of stuff for you and your friends always insist on the same batch of drugs. Most people stamp or label the pills they make.
2. Take a small amount of the drug to see what it does to you.
3. Once you see the effects you should be able to tell what you have taken. Most drugs start to kick in less that 30 mins so you will know quickly.
4. If you and your friends experience something other than you expected, if you know you drugs you should be able to figure out based upon the effects what you are on (this comes with experience).
5. If nothing that you didn't expect happens take the rest, if you see some effects of other drugs you don't want to be on you can always stop.