When I learned to play MtG many moons ago, it was standard practice to tap your mana first and then announce the spell you were casting. David Mills was even disqualified from the finals of a pro tour event in 1997 because he repeatedly paid mana after announcing the spell, which was not allowed at the time. These days, though, it has become accepted to pay mana after putting a spell on the stack, and in most cases it makes no difference provided your opponent lets you complete your actions without responding.

Suppose I have a Lotus Petal and one other artifact on the battlefield and Emry, Lurker of the Loch in hand. I have to pay for Emry with the Lotus Petal since I have no other blue sources. If I have to pay mana before announcing the spell, then Emry costs 1U, but if I can pay mana afterwards, then Emry costs only U. Which is correct? I've found that xmage uses the latter, but I have my doubts this is right.