If you want to become a great programmer: read. Read anything and everything you can get your hands. Don't just read books but also read code. Study the great programs written by other great programmers. Then write. Put what you learn into practice. Write some more. It's been said a great programmer can solve pretty much any problem in two weeks and if it takes more than two weeks it's impossible. Not exactly the truth but you should be able to sketch out solutions to even the most sophisticated problems fairly quickly. The intuition comes from your own experience but also because at that point you've learned how to learn -- if somebody asks you to solve X you're at least passingly familiar with system Y and Z that are sort of like X.
A great engineer is something else. This involves careful analysis and deep understanding of the domain. This involves knowledge and contribution to specialized academic and corporate research. This involves the ability to communicate clearly and succinctly. But mostly it involves a highly developed sense of the problems that your clients are actually trying to solve. The big part of it is actually being able to work with and manage a team to evolve a solution that exceeds the client's expectations.
It's rare to be both. These are the mythical "10xers" that can not only deliver innovative solutions but also create systems that make those around them more productive.