Good advice here so far.
For me, it boils down to:
1. Know what the item is worth to you going in to the negotiation, not what the local price would be. $30 vs $40 to you is not much of a difference, but it can be a huge difference to someone in a place like Thailand or China. Don't pay more than it's worth
to you.
2. Don't ever give the impression that you're in love with an item. Mild, polite interest is where you're going for.
3. Don't be afraid to take a step back and pause negotiations to stall the momentum.
4. Walk away if the merchant won't meet the price you set in #1. The price he calls out to your back is often his best price given your price constraints.
5. Ignore all signs that the merchant is annoyed or selling under duress. They will only ever sell if they're making money. Everything else is an act.
6. Don't be an American. Literally. I was in Dubai and wanted to buy a dish dasha (the Arabic robe garment) and headdress. Went to a store with a friend who is American but born in Russia. The guy insisted that this poor quality dish dasha was a $200 item and wouldn't budge...until my friend started talking to him in Russian. Suddenly I was only paying $15. As my friend told me after we left, he knew I was American and that "Americans don't know what things cost...but Russians have a keen eye for value."