One of the reasons dialogue writing is tricky—it’s not written like normal speech.
Real-world dialogue is filled with ums, ers, repetitions, pauses, repetitions, tangents, and repetitions. It’s also filled with mundane stuff, like asking your partner if they remembered to buy laundry detergent or what your buddy thought about the new Spider-Man movie. Unless your novel is about detergent-eating aliens or a Marvel-obsessed film critic, these things are probably not important to the plot.
Dialogue, when done well, is used to advance the plot, reveal something about characters, define relationships, and provide information. Sometimes it’s used for humour in addition to these things, and Douglas Adams was a master at that:
“So this is it,” said Arthur, “We are going to die.”
“Yes,” said Ford, “except… no! Wait a minute!” He suddenly lunged across the chamber at something behind Arthur’s line of vision. “What’s this switch?” he cried.
“What? Where?” cried Arthur, twisting round.
“No, I was only fooling,” said Ford, “we are going to die after all.”
—The Hitchhiker’s Guide to the Galaxy by Douglas Adams
You don’t have to be good at one-liners to write funny dialogue. Adams used the characters’ situations and their personalities to get his readers to laugh, plus the quirky nature of Arthur’s adventures helps.
The piece of dialogue above is accomplishing everything I listed—revealing information about the characters and the situation. If you want to write snappy dialogue, there’s no better author to look to for inspiration.
Go forth and write!