Ann Patchett revealed to the (London) Times Magazine that her primary motivation for writing her first novel was to get revenge on the nuns who educated her and considered her "somewhere between slow and stupid." She suffered this for twelve years, and then, in her first job she had a patronizing boss who called her "Dolly."
She says, "One day, I used to think, one day..."
She did show them all and her fourth book, Bel Canto, won the Orange Prize for Fiction in 2002, and her new one, Run, has just been published.
Maybe success IS the best revenge! And even if it's not, if it keeps us going when other motivation is low, that's fine.