Dating in the 21st century can be very confusing. We have complicated ways of connecting that didn't exist 20 years ago, and many of our conversations with romantic partners happen via text message.

Comedian Aziz Ansari has a lot to say about this. In his first book, "Modern Romance," Ansari worked with sociologist Eric Klinenberg to explore how we date in the digital age. They talked to hundreds of single people across the world, asking how they connected with romantic partners.

Ansari and Klinenberg discovered that the culture of finding love had evolved dramatically, fueled in part by the invention of cellphones and the explosion in online dating.

They also found that a lot of people had questions about texting etiquette.

Here are some of their tips from the 2016 book.

Don't wait to send that first text

Though the three-day rule has floated around as solid advice for what seems like forever, Ansari and Klinenberg found it to be a myth.

After you meet someone you like, they concluded, the best time to send the first text is that same day. Touching base sooner rather than later keeps the romantic momentum going.

That person already gave you his or her number, so there's a good chance the person digs you.

Avoid 'heyyy' and make it personal

Ansari and Klinenberg found one of women's most common texting peeves was the generic "hello" text.

"After seeing hundreds and hundreds of messages in women's phones," Ansari writes, "I can definitively say that most of the texts women receive are, sadly, utterly lacking in either thought or personality."

Instead, mention something you talked about when you first met that person. Show the person you actually listen to what he or she says.

Aziz Ansari hosting "Saturday Night Live" on January 21. Will Heath/NBC Try to be clever

Adding a dose of comedy to your texts can really up your game, Ansari says. It keeps things lighthearted and makes you memorable to the other person.

At the same time, try not to overdo it, because sarcasm or offbeat humor can be hard to decipher over text.

Text at normal hours

It's best to text in the afternoon or evening and not early in the morning or late at night, Ansari and Klinenberg say. Otherwise, you run the risk of waking the person up.

Don't text back immediately, but don't overthink your response time

In their focus groups, Ansari and Klinenberg found that generally you shouldn't text someone back right away. Texting back immediately apparently gives off the vibe that you're too eager or desperate.

Waiting an hour or two will make you seem more desirable because it shows that you have other things going on in your life. That said, don't wait too long, which could show a lack of interest.

Use correct grammar and spelling

"Plz" and "Idk" may be OK in texts with friends, but Ansari and Klinenberg say you're better off using proper English with your crush.

Former President Barack Obama, probably texting Michelle to make dinner plans. Charles Ommanney/Getty Images

Bad grammar was a major turnoff in almost every focus group. Texting things like "Hey we shud hang out sumtimez" make the sender seem unintelligent and lazy.

Make concrete plans

Ansari suggests avoiding the generic "What's up?" or "Want to hang?" texts. Instead, be forward and direct.

Invite your crush to do something specific at a specific time. It shows that you're interested in actually spending time with the person, rather than just penciling him or her into your schedule.

Get to know them in person

Sending a slew of texts isn't a substitute for actually getting to know someone IRL (in real life), Ansari says.

When you do plan that first date, he recommends following what he dubs the "Monster Truck Rally Theory." Don't take your date out to a mundane place like a coffee shop or a restaurant — go somewhere exciting like, say, a monster-truck rally. An interesting date helps you see what it's really like to be with a person.

"Don't just stare at each other across the table while sipping a beverage and making the same small talk you've made a thousand times about siblings, hometowns, and where you went to college," Ansari writes. "A person may seem just okay, but if you really invest time in the relationship, maybe they'll be greater than you assume."