I thought I was done with homework when I finished grad school. But I wanted to be prepared for my commencement speech. So I did what any self-respecting social scientist would do. I started reading studies of graduation speeches. And I decided I would give a graduation speech about graduation speeches.

It would be like the Seinfeld episode with the coffee table book about coffee tables. Wait, wrong generation. It would be like when Ryan Gosling wore a shirt with a photo of Macaulay Culkin, and Macaulay Culkin then wore a shirt with a picture of Ryan Gosling wearing that shirt.

So today I want to give a meta-graduation speech. I want to tell you what I think is missing from most graduation speeches. 

It turns out that almost every commencement speech is about virtues. Living by a set of worthy principles. It’s easy to be virtuous when things are going well. It’s when you’re down that your virtues get tested.

Last week Facebook COO Sheryl Sandberg and I published a book, Option B, about building resilience. We all face challenges in life — whether it’s a failed exam or a failed marriage, the loss of a football game or the loss of a loved one. Resilience is what gets us through these events. In the face of adversity, how do we find the strength to stand by our virtues?

In graduation speeches, three of the most popular virtues are generosity, authenticity, and grit. If you want to live by these virtues you need resilience. You need resilience to stay generous on the days when you lose faith in humanity. You need resilience to stay true to yourself on the days when others have lost faith in you. And you need resilience to persevere on the days when you’ve lost faith in yourself.

But if you’re too obsessed with any of these virtues, you might undermine your own resilience. Virtues can be a little bit like vitamins. Vitamins are essential for health. But what if you get more than your body needs? If you take too much Vitamin C, it won’t hurt you. If you overdose on Vitamin D, though, it can do serious harm: you could wind up with kidney problems.

A great philosopher named Aristotle thought virtues were like Vitamin D. Too little of a virtue is bad, but so is too much. He believed that every virtue lies between vices of deficiency and excess. Too little humor is dry; too much is silly. Too little pride makes us meek; too much breeds narcissism. Too much self-restraint leaves you doing homework while your friends are tailgating. Too little self-restraint means you’ll really regret eating that fourth Scotsman Dog.

If you’re not a fan of the ancient Greeks, the same point was made by another great philosopher named Goldilocks. Like porridge, virtues can be too hot or too cold. More isn’t always better. Barry Schwartz and I have argued that if you want happiness and success, you need to find the sweet spot between the extremes of too little and too much. You need to look for just right.

Let’s start with the virtue of generosity. The single most common theme in commencement speeches is “help others” — it shows up in nearly two thirds of them. I’m a huge fan of generosity. I’ve spent my whole career studying it and I wrote an entire book about how it can drive not only our happiness but also our success. I found that in the long run, givers tend to outperform takers. It’s true for engineers and salespeople and doctors. And even if giving doesn’t guarantee more success than taking, it’s a more meaningful way to live our lives.

But there’s such a thing as being too generous. It’s a recipe for burnout. Take teachers. Education is about helping students, so we love teachers who are selfless. But in our research Reb Rebele and I found that the most selfless teachers ended up being the least engaged in the classroom — and their students did the worst on standardized achievement tests.

And you know what this means about the best teachers: they had about as much compassion as Frank Underwood — if he were half-Demogorgon.

No, the effective teachers were the ones who cared deeply about their students but also did what we’re all supposed to do on airplanes. They secured their oxygen masks before assisting others. George Carlin laughed at that advice — ” I do not need to be told that” — but it came in handy. They felt less altruistic, but they actually helped more. Their giving was energizing instead of exhausting.

So help others, but don’t sacrifice yourself.

A second beloved virtue is authenticity. “Be true to yourself” is a core theme in more than half of commencement speeches. I wouldn’t encourage you to be false to yourself. Of course you should be genuine.

But if authenticity is the value you prize most in life, there’s a danger that you’ll stunt your own development. To be authentic, you need to be crystal clear about your identity and values. You need to know exactly who you are. And that can tether you to a fixed anchor, closing the door to growth.

When I was in grad school, a friend asked me to give a guest lecture for her class. I was terrified of public speaking, but I wanted to be helpful, so I agreed. I figured it would be a good learning opportunity, so after the class I handed out feedback forms asking how I could improve. It was brutal. One student wrote that I was so nervous I was causing the whole class to physically shake in their seats.

My authentic self was not a fan of public speaking. But I started volunteering to give more guest lectures, knowing it was the only way to get better. I wasn’t being true to myself, I was being true to the self I wanted to become.

A few years later I was turned down for my first professor job because after watching me give a presentation, the hiring committee was convinced I wouldn’t be able to teach. I ended up getting hired by a different school, and in my first year I was asked to teach a four-hour class for colonels in the U.S. Air Force. I was 25, they were twice my age, they had dozens of medals on their uniforms and thousands of flight hours under their belts and billion-dollar budgets under their command. Plus they all had cool nicknames, like Striker and Sand Dune.

I knew I needed to establish credibility, so I began by sharing my credentials. Their feedback forms were even less fun than the ones from the college students. One wrote “More quality information in audience than on podium.” Another said “I gained very little from the session. I trust the instructor did gain useful insight.”

I had already signed up to give one more class for their colleagues. I didn’t have time to change my content, let alone learn something new. All I could do was change my introduction. Total authenticity would’ve been to tell them that I had bombed the first session but I was going to be teaching them the same material. That would’ve made me look weak. Instead, I tried to find the sweet spot. I didn’t say a word about my expertise. I opened by saying, “I know what you’re thinking right now. What can I possibly learn from a professor who’s 12 years old?”

The only sound I could hear was my racing heartbeat. Finally, a colonel — code name Hawk — piped up: “Come on, that’s way off base. I’m pretty sure you’re thirteen.”

I taught the same material, but the feedback was much more enthusiastic. One wrote: “Although junior in experience, he dealt with the studies in an interesting way.” And another: “I can’t believe Adam is only twelve! He did a great job.”

So be true to yourself, but not so much that your true self never evolves.

A third popular virtue is grit. “Never give up” appears in more than four of every ten graduation speeches. Persistence is one of the most important forces in success and happiness. There’s the author whose novel was rejected half a dozen times. The artist whose cartoons were turned down over and over. And the musicians who were told “guitar groups are on the way out” and they’d never make it in show business. If they had quit, Harry Potter, Disney, and the Beatles wouldn’t exist.

But that’s only half the story. For every J.K. Rowling and Walt Disney and Lennon and McCartney, there are thousands of writers and entrepreneurs and musicians who fail not for lack of grit, but because of how narrowly they apply grit.

I know from experience. As a kid I loved sports. I spent hours shooting baskets and when I didn’t make my sixth grade basketball team, I went to Chris Webber’s basketball camp. When the Orlando Magic drafted him, I spray-painted Shaq and Webber kick butt across our driveway. The Magic immediately traded Webber away but the kick butt stayed on my driveway. I worked my butt off practicing. But… I didn’t make the seventh grade team. I didn’t make the eighth grade team either. When I started high school I was under five feet tall, and I finally gave up. I suddenly had a lot of free time and I decided to try my hand at diving. My coach told me I walked like Frankenstein and his grandmother jumped higher than me. But diving was a nerd sport: it attracted people too short for basketball and too weak for football. I ended up qualifying for the junior Olympic nationals twice and competing at the NCAA level.

Never give up is bad advice. Sometimes quitting is a virtue. Grit doesn’t mean “keep doing the thing that’s failing.” It means “define your dreams broadly enough that you can find new ways to pursue them when your first and second plans fail.” I needed to give up on my dream of making the NBA but I didn’t need to give up on my dream of becoming a halfway decent athlete. And if you’ve ever watched Shark Tank, I bet you’ve seen a pitch from someone who has potential as an entrepreneur but desperately needs to give up on the current startup. (Not that I have anything against a café where you can sip latte next to cats, a tongue brush that lets you lick your cat’s tongue, or a wine for cats.)

Sometimes resilience comes from gritting your teeth and packing your bags. Other times it comes from having the courage to admit your flaws. When I decided to write my first book, my literary agent asked for a proposal. I got so excited about the ideas that I ended up writing the whole book. Over 102,000 words. I sent it over and my agent gently told me that they might interest fellow academics but that was about it.

“Never give up” might’ve meant going to another agent or trying my own hand with publishers. Resilience meant having the strength to take the feedback to heart and start over from scratch. Same goal (writing a book about generosity) but different strategy (writing something people might actually want to read). My agent told me to write like I teach. So I started over from scratch. I threw out over a hundred thousand words (there were a few hundred I just couldn’t let go). The book I wrote that time became Give and Take and it’s the reason I’m standing here on this stage.

So don’t give up on your values, but be willing to give up on your plans.

Today, my advice for you is to take a page out of the Goldilocks story. Watch out for virtues that burn too hot, not just too cold. If you want to be resilient, find the right amount of generosity and authenticity and grit.

But there’s one part of the Goldilocks story that you shouldn’t take literally. If you know your thermodynamics, the biggest bowl should retain its heat the longest. Yep, Papa Bear’s is the hottest. But why is Mama Bear’s porridge too cold and Baby Bear’s just right? As an academic I spend a lot of my free time thinking about questions like this. Apparently Mama Bear’s porridge got cold while she was busy making sure Baby Bear’s was just right and then reheating Papa Bear’s bowl so he could build his character by burning his tongue like a proper misogynistic male bear.

I’m thrilled to see that unlike the bear family, Utah State University has played a pioneering role in challenging traditional gender roles. Your alums include astronaut Mary Cleave, one of the first ten women in space, and Paula Hawkins, the first female Senator from the South and still the only woman elected to the Senate from Florida. And now President Cockett is the first female Aggie president.

We should celebrate when glass ceilings are shattered. But we need to be careful not to get complacent, because the fight to support underrepresented minorities is never finished.

This is one virtue that doesn’t follow the Goldilocks rule. “Appreciate diversity” shows up in a third of graduation speeches. I believe it’s the one virtue where a lot more is always a lot better. There is no such thing as too much diversity in our lives.

Diversity lies at the heart of resilience. In biology we have diverse genes to protect different species against disease and prepare different species for different climates. In companies, we have diverse expertise to protect against groupthink and prepare for a changing, turbulent, disrupted world. In countries, diverse backgrounds and values are essential to a strong and successful democracy. And in communities, diversity is an unlimited virtue because it keeps different virtues in balance.

That’s what you all contribute to the world: different virtues. You should be incredibly proud of the diversity of those virtues.