Many writers say they find writing dialogue difficult, which I always find surprising, as, without wishing to sound self-aggrandizing, dialogue is the one aspect of writing I find easy. To me, it isn't that impressive to find dialogue easy. After all, we are primarily verbal creatures, we are surrounded by conversation every day, and most of us spend more time watching films and TV than we do reading books. I am always far more impressed by writers who are able to craft complicated plots, for example, since this is an aspect of writing I find difficult. To my mind, plotting is a superior skill because it isn't something that occurs in reality: events don't pan out in a neat, compelling sequence, loose ends are not neatly tied up and much of life is mundane, unsymbolic and random.
Here are my tips on writing dialogue:
Read it aloud. If it doesn't sound natural, it isn't. Make sure it sounds different from prose. Remember, few people talk in complete sentences.
Don't dump too much information in dialogue. In real life, we don't always helpfully explain what's going on.
Get rid of filler dialogue that doesn't add anything to the plot or help with understanding the character.
Don't write out "ums" and "ers." They are realistic, but they look cartoonish in a piece of literature. Instead, use ellipses to give the impression of pauses or uncertainty. Ellipses can also be used at the start and end of dialogue, when someone has been talking for a while and is likely to go on awhile, to give the impression of the other characters tuning out. For example:
you think you're so above everything; you think you're so much better than everyone else; you're always going around looking so superior; pisses me off
Use dashes to show interruptions. For example:
"—let me read it."
"No!" Patrick clutched the letter to his chest.
"What the hell is she playing at? You haven't—?"
"—of course I haven't." Patrick stormed out.
If writing dialogue for a character with a specific accent, don't write it out phonetically, as this can look patronizing and old-fashioned. Use odd syntax and a few choice bits of slang to convey their accent.
Don't be afraid to let conversations hang unresolved in mid-air and move on to another scene.
Only use exclamation marks sparingly for moments of real shock. Don't ever use them for jokes as it kills them.
Dialogue tags ("he said," "she said") should be kept to the minimum as they slow dialogue down. Avoid elegant variation in dialogue tags ("he cajoled," "he opined," "she responded"), as it sounds amateurish.
Avoid adverbs in dialogue tags. ("If you come near me, I'm going to use my knife," he said, threateningly.) Make sure the dialogue itself carries the tone.
Dialogue is really important. It helps us to get to know characters, it conveys place, it can move plot along quickly and is an excellent way of showing rather than telling. It also breaks up indigestible chunks of solid prose. Make sure you insert some dialogue early on when writing a story. If you find dialogue difficult, spend time eavesdropping in public places. Transcribe your eavesdroppings but, remember, when it comes to writing dialogue in prose you need to convey the impression of reality rather than verbatim speech. And, of course, as with perfecting any aspect of writing, the best way to learn is to read, read, read