Former President Barack Obama spoke at a tech conference in Salt Lake City, Utah this week.

At the conference, which was organized by software company Qulatrics, Obama discussed his famous reputation for keeping cool under pressure.

Some of his techniques can be easily adopted in everyday life, helping you to focus on performance and tune out the distractions.

Barack Obama was famous during his presidency for always appearing cool and calm. The press sometimes called him "no drama Obama" and didn't always mean it kindly.

He said there was some truth to the nickname when he repeated it on stage this week at a tech conference in Salt Lake City, Utah hosted by software company Qualtrics. But he said, just because he appeared calm, when he was younger he would still sometimes agonize with fear of making a mistake.

"I have an even temperament and I don’t get too high and I don’t get too low, but that doesn’t mean that throughout the presidency and throughout my professional career that there weren't times when I was constrained by, ‘Man I don’t want to screw this up. I don’t want ot let people down. I don’t want to be seen as having made made a mistake or having failed'," he said.

It was during his second term that he experienced a "shedding of fear" as he described it and that helped him perform better.

"There’s no doubt by the time I was in my second term I was a better president than I was in my first term and it did not have to do with analysis or policy," he said. "It had to do with what comes with any career — whether it's sports or teaching or you name it — you get enough reps, enough repetition and familiarity with the nature of the problems that you start being focused on the task and not how-are-you-doing-on-the-task and the self-consciousness that comes with that."

He says that's the attitude that he carried into working on the Iran nuclear deal, which sought to squash Iran's nuclear weapons program and the Paris Climate accords, a landmark agreement between governments worldwide to jointly address climate change. (President Trump has since vowed the US would abandon participation in the Paris agreement which called for each country to make its own emissions-reduction pledge.)

By learning how to get comfortable with tackling large, complex problems, Obama says he stopped worrying about making mistakes. Instead he realized, "You know, I got this. And if I make a mistake we’ll figure out how to make up for it, we’ll learn from it."

He didn't focus on poll numbers or pundits but focused on "advancing this vision that I have and I hope the country will share, that we create a better country," he said.

But it was more than just self-confidence that comes from experience. He also took deliberate steps to keep himself focused. This included "not reading my own press."

He didn't (and doesn't) look at comments on social media, or watch the cable news pundits. That included the people berating him, but it also included avoiding people praising him. " If people were complementary, people assume you know more than you did," he joked, and that can lead to an inflated ego, which is just as detrimental.

He started to view all of that public commentary on him as a distraction, "Not useful to me in doing my job or solving a problem, but designed to feed possible anxiety."

And these techniques can work for anyone:

Spend time in learner's mode, collecting information from people who know more about the topic than you do. Obama says he'll ask questions and keep asking them until he understands, sometimes making his experts "speak English" or explain things to him in layman's terms.

Focus on the task at hand. Do your homework. Do your best and trust that if a mistake or problem happens, trust that you can do the same process to fix it and learn from it.

Don't fill your head with what people are saying about you, good or bad. Make your work about the work, not about yourself.

"One way I describe it to my girls is, ironically, by taking your ego out of what you do, it will liberate you and you can ultimately perform better and more comfortably," he said.