One of the best coders I know majored in Cell & Structural Biology, long ago. He says: “I used to think I could never be a programmer, because I couldn’t imagine myself doing it.”
My husband is a metallurgist. He picked it because it’s the engineering degree that requires the least math. He now wishes he’d gone into law, but as a child he didn’t know any lawyers. His professional role models were engineers, so he could imagine himself doing engineering, even though he didn’t like math. Back then, he couldn’t imagine himself doing law.
The more diversity in programmers, especially in visible areas of leadership, the more people will be able to imagine themselves as programmers. A person has to make it real in their mind before they can make it real in their life.