My advice is to answer this question:
"What, in addition to the content of the dialogue, does the speaker wish to reveal?"
Consider this example:
Peruvian writer Mario Vargas Llosa complimented the Times Literary Supplement by saying, “I have been reading the TLS since I learned English 40 years ago. It is the most serious, authoritative, witty, diverse and stimulating cultural publication in all the five languages I speak.”
Showing off a little, were we, Mario?
SECONDARY INTENTIONS AND WHERE THEY COME FROM
The speaker doesn't even have to be aware of his or her secondary intention. In fact, most would deny it. Generally they stem from insecurities created in childhood. More examples of these kind of messages and their secondary intentions:
"That's a lovely dress, I'm beginning to regreat I spent so much on a designer when dresses as lovely as yours are available off the rack!" = "No matter what you have or do, I own or have done something better."
"I'm so sorry you have such a bad case of the flu. I know from my time in a coma that being bedridden is no fun." = "No matter how badly you have suffered, I have suffered more."
"You would be much more comfortable sitting over there." = "I'm in control here."
"It's kind of you to invite me to play with you, I know you're by far the better player. I just hope it's enough of a challenge not to be boring for you." = "I'm not a threat or a rival"--unless it's said by a person who knows they're a better player than the other person, in which case the message is, "I feel safe behind a wall of false modesty" or "I can con manipulate people easily.")
AN ADVANCED FORM
There's an advanced form in which the speaker bigs himself up while appearing to put himself down, as in these examples:
"I was so stupid not to stop playing roulette when I was a hundred grand ahead--I ended up with only fifty thousand in winnings."
"The breakup of the relationship was my fault. I was too nice."
"I really admire prolific writers. I can manage to prouduce only two books a year."
LISTEN FOR THESE AND MAKE THEM WORK FOR YOUR WRITING
If you listen for examples of these kinds of statements over the next few days I guarantee you'll hear some.
Being aware of people's secondary intentions is a good way to get insight into real people, and using them in your character's dialogue is an excellent tool for letting your reader in on what your character really is like, without saying it outright.
(Among the many masters of dialogue who give writing advice cited in my book, "Your Creative Writing Masterclass," are Dickens, Hemingway, and Elmore Leonard. Find out what they reveal--you can get the book from Amazon or your other favorite bookseller.)