Try this simple method for learning the art of Great Dialogue:
First, get yourself born into a large Catholic family. If possible, make it an extended Italian/Yugoslav family with undertakers, embroidery factory workers and actuaries. Marinate your brain in the constant stream of emphatic speech while not being able to get a word in edgewise.
Pick a father who is loud and funny and smart. Install a hair trigger and watch the sparks fly. Follow his work to every corner of the country, so that you are always the new/smart/weird kid sitting in the back of the class. Keep your ears open so that files of “Jersey”, California” and “Tennessee” compartmentalize in the back of your brain.
Attract the attention of the bullies. No new/smart/weird kid is going to sass back when the mouth-breathing knuckle-draggers travel in packs of four or more. Replay every encounter over and over in your head until the perfect come-back snaps out of your mouth each and every time. Keep quiet to prevent your teeth from doing the same.
Keep this up for a decade or two and you, too, will be ready to write witty, engaging dialogue. Either that, or climb a clock tower with a high-power rifle.