We were all non-programmer at a certain point in time, so I guess you are talking about people started their career is a very different field and are willing to become developer.
Anyone can become anything with enough time and work. You will develop the qualities needed to be a good developer.
The problem is changing your orientation late. As we get older, we get more and more conditioned to a particular way of thinking, working, acting and so on. You have certain beliefs that become your enemy.
When people fail to become something they want, they usually think they don't have the required qualities. Well sometimes it's true, but in the vast majority of the case, it's because they handled improperly their emotions and toughs that came with them. Fear is one common emotion you will get while walking in your path.
The key is your ability to:
- Embrace change (avoiding resisting and fear of change)
- Be motivated
Every point is related to your ability to decide what behavior you will have facing the difficulties you will encounter. Because you will encounter many of them.
Between stimulus and response there is a space. In that space is our power to choose our response. In our response lies our growth and our freedom. [Viktor E. Frankl]
This quote is the key to many of the problem you will face in life.
Unlearning and embracing change is very difficult because you are in the confort zone of your own knowledge. Your conditioning trigger fear and the resulting behavior. Understanding how conditioning works will help you with the negative emotions you will get.
Proper motivation is also important because it will help you pass trough the dip.
Conclusion: the required qualities are motivation/perseverance and your ability to choose your response to the negative tough that will pass trough your mind.