6 of the smartest pieces of advice Bill Gates has given students over the years

But as the second-richest person on Earth — and someone who is heavily involved in efforts to alleviate poverty and health burdens for billions of people — he does know thing or two about finding success.

The Microsoft cofounder has given students his fair share of advice over the years through interviews, commencement speeches, and social media.

Here are some of Gates' best nuggets of wisdom for those on the verge of entering the real world.

1/

Artificial intelligence, energy, and biosciences make good majors.

Sean Gallup/Getty Images

At the end of the 2017 school year, Gates wrote in a Twitter thread that incoming college freshmen would do well to study one of those three majors, given how relevant they'll be in the coming decades.

He called them all "promising fields where you can make a huge impact."

2/

Surround yourself with people who challenge you.

Kevork Djansezian/Getty Images

In the same Twitter thread, Gates advised students to be intentional about who they spend time with in the pursuit of growing and getting better.

It echoed what his best friend Warren Buffett has said, —namely that "You'll move in the direction of the people you associate with," so choose wisely.

For Gates, that person is his wife of 23 years, Melinda.

3/

Trust that the world is getting better and can be improved further.

Thomson Reuters

Contrary to how it sometimes seems, Gates likes to remind people that the world is the best it's ever been. He frequently recommends the book "Better Angels of Our Nature," by cognitive scientist Steven Pinker, as proof.

"If you think the world is getting better, you want to spread the progress to more people and places," he said. "It doesn't mean you ignore the serious problems we face. It just means you believe they can be solved."

Have convictions, but always stay curious.

Often, those books will inform his view of the world. But occasionally something will shatter that view, and he'll need to rethink his perspective. It's something he told Columbia University students to try out for themselves.

"You try and predict what's going to happen," he said, "then when it doesn't, you think: What is it about my model of the world that's wrong?"

6/

Take time to think about the world's inequities.

Peter Bernik/Shutterstock

Gates has told students on numerous occasions that one of his big regrets upon leaving Harvard was his lack of awareness of the world's imbalances in health, wealth, and resources.

In his 2007 Harvard commencement speech, Gates told graduates to consider the responsibility of being so aware of those realities and perhaps even correct them.

"I hope you've had a chance to think about how, in this age of accelerating technology, we can finally take on these inequities, and we can solve them," he said.