In many science fiction movies, we see that the various alien species, however intelligent or technologically advanced, do not have the ability to understand or engage in sarcasm. They are shown as being very literal, and focusing on only the direct meaning of the words and completely failing to register the intent behind them.
Thanks to you: Let us consider an example. If you run into some difficulties, such as reaching the class late because a friend delays you, you can say to your friend: ‘Today I was marked as a late arrival, which is a new record for me, all thanks to you!' We understand from the context that the words are not meant literally. In fact, in this context, 'thanks' is meant to convey blame rather than credit.
But the trick with sarcasm is that the words themselves do not give away the meaning--the words must be interpreted in the context in which they are used--which is why it is no surprise that aliens and robots invariably struggle with our brand of sarcasm.
Let us consider a few common phrases that are used sarcastically.
Good luck with that: The literal meaning is straightforward, so we will not bother discussing that. But this phrase is interesting because it does not really mean ‘I wish you good luck;' instead, it means something like, ‘what you are trying to do is not going to work.' When you just say, ‘good luck,' you are wishing someone well. Or if you say ‘good luck with your new job,' you clearly mean what you say.
But the phrase ‘good luck with that' implies a shrug of the shoulders, and a lack of concern. Here is an example: If a friend tells you that he has invited thirty people home for a party, and is going to cook on his own for all of them, you could consider the amount of work involved as well as his culinary skills, and respond with ‘good luck with that.'
Let me know how that works out for you: Similar to the phrase ‘good luck with that,' this phrase happens to be dripping with sarcasm, and implies a difference of opinion combined with a slight lack of concern.
For example, if a friend tell you that he is going to study only one day before the exams, since the rest of the studying is all forgotten anyway, you know that he is wrong and sure to fail, so you can sarcastically say, ‘let me know how that works out for you.'
In this context, you express your disagreement politely, and also convey that you are not interested in arguing and pointing out the mistake that your friend is making.