Someone I once knew found out I was writing, and he said to me, "It's not a Mary Sue story, is it?"
I went "Huh? What's that?" and this person proceeded to direct me to a Mary Sue test.
Now, for everyone who is currently just as confused as I was in that moment, let me provide a definition. Wikipedia defines Mary Sue as "a fictional character with overly idealized and hackneyed mannerisms, lacking noteworthy flaws, and primarily functioning as a wish-fulfillment fantasy for the author or reader." See the link for more info about the origin of the term and other details.
My first characters were very Mary Sue (thank goodness I never actually published those stories). I was never quite satisfied with my writing until I began writing about characters who were so little like me as to be completely alien. It ended up being the only time I could be objective and craft a decent story.
To be honest though, there have been successful characters that are overly idealized, have hackneyed mannerisms, lack noteworthy flaws, and still managed to succeed as a character. James T. Kirk from Star Trek has been pointed out as one such character.
So, this makes me wonder. Why do we pick on Mary Sue characters if they can be used to some good in story lines?
Well, you really only have to read some fan fiction to understand that. Most of the time, the Mary Sue character isn't used very artfully. They can become sickeningly sweet, or angsty over non-problems to the point of nausea.
Now, we can probably all agree that no one likes to read a story about Little Miss Perfect or Mister Wonderful and their wonderful lives with tiny little molehills that turn into mountains. However, I wonder if you could take a Mary Sue character and put them in abnormal circumstances to make a meaningful and interesting story. I believe the movie Pleasantville did something similar to that. It started out with the perfection of an old TV show that eventually became more "real" thanks to the invasion of real life. It was interesting because the characters in the movie started out Mary Sue and eventually became real.
I'm thinking, though, that it could be interesting to take a Mary Sue and place him/her in circumstances that make the very act of being a Mary Sue type character awkward or inevitably disastrous. For example, take a wonderful, handsome, perfect man who every woman wants, and place him in a situation where he is out of his element. Such as an accidental member of an all-male submarine crew. Or take your typical Mary Sue type woman and force her to make a decision that has no good answer.
The argument can be made that because you're no longer being nice to your "Mary Sue" character, they're no longer Mary Sue. But perhaps that's a good alternative to completely revamping a character. To be honest, I think there's a very fine line between a Mary Sue-like character and a literary tool at times. I believe the real difference is how attached the author becomes to the character.
It's always important to keep in mind (when writing) that characters are tools. You're helping others to live vicariously through them and experience their lives, if only for a few hours. You, the author, however, need to remain slightly detached so that you can mercilessly torment them, challenge them, and even kill them off (not entirely detached though - we do need to consider what the character would do by putting ourselves in their shoes!). I think Mary Sue really becomes Mary Sue the moment an author stops treating a character like a tool, and in my (very) humble opinion, anything else is an exaggeration of the term.