I was asked by one of my students how to become an expert programmer. Peter Norvig has already given an excellent answer: work hard for ten years.
Let me revisit the main points that should be common knowledge by now:
- Do a lot of it. I have published over a thousand blog posts. I have published dozens of research papers as a primary author. I must have written at least 100,000 lines of code. While the rule that says you need many hours of practice to become an expert is debated at the margin, the core truth remains. Most people need a lot of time and practice to become good.
I will add one point that is often glossed over: use it or lose it. Once you stop using a skill at a high level, it starts to slowly deteriorate.
- Constantly push yourself. You can setup 10,000 web sites for clients, and still be a bad programmer. And God knows that you can write 10,000 research papers and still be a mediocre writer. You have to constantly raise the bar.
As a rule, the more effort you make, the more you learn. The problem is that as you get better, it takes harder problems to challenge you.
Notice how generic this strategy is. Almost anybody can do these two things: work a lot for a long time and push oneself. But notice something else: the earlier you start working hard, the earlier you can become good. For most people, there is no shortcut, you need time and effort.
Note: The exact question the student asked me was about becoming an expert in Java programming. I am not an expert in Java even though I have been using the language since 1998. When I try to answer language quizzes online, I routinely fail 20% of the technical questions. E.g., I rarely use abstract classes in practice and inner classes confuse me. I do not know the list of reserved keywords in Java. There are still large sections of the standard API that I have very little experience with. But my generic reply is still valid. If I wanted to become a Java expert, I would study hard for years, constantly working on harder problems, passing ever more difficult tests.