This is a relatively common question for early-career developers. It is not a question which is formed well enough to give you a specific answer.<p>Some ways which might refine one's thinking on goals:<p>What does it mean to be the "best"? Is it synonymous with foremost? Is that your <i>real</i> terminal goal, mastery for its own sake, or are you motivated by another goal (e.g. social acclaim by peers or easy employability) which have easier ladders to climb or levers to pull than technical mastery.<p>What is your field? From a marketing/sales perspective, the easiest way to be the best X in your field is to constrain the set of people competing with you by applying multiple independent low-pass filters to your definition of a field.<p>For example, if you're in the top 50% of programmers you know, but you have no other information, you're astoundingly unlikely to be the best programmer in e.g. compilers. You have a surprisingly good shot if you attempt to be the best bilingual Japanese/English programmer working in fintech frontends, a field which is commercially relevant to many companies' interest and probably has four people in it. (I do not think my estimation is off here by an order of magnitude or more.)<p>Non-specific advice on getting better at things: Work with people who are good at the things you want to get better at. Aggressively optimize for skills growth. Write about what you learn; use that to expose yourself to opportunities to work with people who are better than you at them.
Rather than technical skill in isolation, I'd encourage you pursue work that has the potential to be high impact. Many of the "best" programmers are simply very good programmers who have worked on problems that matter.<p>The benefit of this approach is that it doesn't require chasing some nebulous goal. Instead you just have to pursue unsolved problems.<p>A prime example of this is Kenneth Reitz, who made Requests for Python. Yes, it's good engineering, but even more so, he applied solid engineering principles to an undersolved problem. It's now been downloaded hundreds of millions of people and saved countless collective hours.
Disclaimer: I'm not sure how one would even measure this, as intelligence, skill, and aptitude are all highly dependent on situations and context. With that said..<p>The formula is going to be the same for most: Work your ass off and be tenacious like a pitbull, never let go or give up until you've dug all the way down and achieved what you set out to do. Then you'll have a shot at being the best there is, ever was, and ever will be :D<p>It takes huge dedication and commitment just to reach even the top 1%, .1%, or .01%.
Practice Practice Practice.<p>Start with easier problems, go towards tougher problems then shift to multi-domain projects that are complex.<p>See an interesting solution to a difficult problem, solve it again on your own, then compare it to the approach used originally.<p>Being an expert programmer in a field, is actually being a good problem solver with a programming language.