First of all, great programmers are made, and not born. Ability to write great code is not inherited nor depends on nationality. Everyone is equal and have a chance to be a great programmer.
Here are several ways that will increase your chances to be one of the best programmers out there.
#1 Make your own decision
Many programmers tend to read a lot of books, blogs, listen podcasts and etc, and blindly apply all what they hear in their projects without even thinking about whether this or that approach is applicable in their situation at all. When asking them why they think that this solution is better than that one, they refer to the articles from books or blogs, or simply say something like:
Well, Martin Fowler said so in his book, so I don’t see a reason to not believe him.
Well, there’s nothing bad in having your role model, but you should keep in mind that your are the one who eventually makes a decision about how to handle a particular situation in your code, and not Martin Fowler, or any other smart programmers out there. They supply you with good knowledge, and your job is to weigh up pros and cons and make a final decision in your particular case.
#2 Know how it works
There are situations when a simple change in the code fixes an issue, but you have no idea how this happened, and what was the cause of the issue at all.
Bad programmers would stop there and move to another task. They would forget about existence of that issue in a minute.
While, great programmers would stop there, and try to figure out how the issue was fixed and what was the main cause of the issue anyway.
Remember, if an issue disappears it doesn’t mean that you fixed it. You could simply hide it. You should prove the fact that the issue is fixed. To do that, you have to be sure how your change in the code works and why it causes the issue to disappear.
#3 Don’t stop there, keep digging
There could be millions of solutions to the same problem. Therefore, we as programmers are responsible to choose only one that best fits our needs.
Obviously, you cannot tell whether your selected solution is the best one without comparing it with other solutions. That means that while trying to solve the problem you don’t have to stop on the first solution. You should dig deeper and deeper into the problem and generate as many as possible solutions. After that, you can weigh pros and cons of all found solutions and tell with confident which solution is the best and why.
#4 Communication is a key
Really, you cannot be a great programmer without knowing how to communicate constructively with colleagues in your company. It’s not about talking about random topics at your office water cooler. It’s more about how to be efficient when discussing new project/tasks, pitching a new idea/technology and etc.
Great programmers are always specific. We are focused on the result. We stick to facts. We believe in strong arguments instead of feelings. We stay calm and open to other ideas.
#5 Don’t get married to a single company
I found that programmers who worked in the same company for entire their carrier are too narrowly focused. They tend to reject new ideas more often than those who worked in many different projects/companies. It’s hard to convince them to accept something even if good arguments are provided. Finally, they believe that everyone out there write code the same way as they do in their company.
Well, I think great programmers have to have greater experience than that. While you are young it’s a great chance to switch companies to see how other programmers work, and compare your observations to make fair conclusions. Don’t stick to a single company for whole your life. Be open minded and judge the things with facts. That’s what great programmers do.
We as great programmers are good not only in technical part of what we do. Throughout our careers, we gain knowledge from different domain areas. We learn things quickly. We are adaptable and flexible. That’s what valuable to companies. Not great code that we write, but great results, adaptability and flexibility.
The great code is valuable to us in order to provide what’s needed to the companies.