If you want to be the best at something, billionaire Bill Gates suggests thinking back to whatever you obsessed over as a teenager.
"The thing you do obsessively between age 13 and 18, that's the thing you have the most chance of being world-class at," Gates told Charlie Rose in a 2016 television interview. It's a tip that Gates also shared with Harvard students in a Q&A last year.
Of course, in Gates' case, the activity he obsessed over as a teenager growing up in Seattle was writing software — and that hobby worked out pretty well. Gates went on to co-found Microsoft and become a millionaire in his 20s. He's is now a billionaire the second-wealthiest person in the world.
"I only have one thing that I did obsessively from 13 to 18," Gates told Rose. "And, that is write — [or] try to write — good software."
Gates, who says he was "obsessed with software from a very young age," famously started writing software as a student at Seattle's private Lakeside School, where he would meet fellow Microsoft co-founder Paul Allen. The first software program Gates ever wrote was a digital version of the game tic-tac-toe that could be played against a computer.
Though Gates showed an early aptitude for coding, he says he had to be hard on himself to improve his skills to the point where he was one of the best.
"I thought I was really good," Gates said in 2016 of his coding skills at the age of 15. But after working with some other people on projects writing software throughout his teens, he would occasionally meet someone with superior skills.
"That was super helpful to have my comeuppance about 'OK, how did my code compare to other people's code?'" Gates says in the interview. Eventually, he notes, he "was a bit on my own," in terms of writing software — meaning that he pushed himself to become a world-class coder. "But, yeah, I had to be pretty tough about: 'How good can you get?'"
Like this story? Subscribe to CNBC Make It on YouTube!