Citation missing, but I've read a paper that claimed rather convincingly that you need a certain mindset both to be good at programming and to enjoy programming (unsurprisingly, this comes hand in hand).<p>It's not really problem solving, it's rather a specific kind of structured thinking. It's the attention to detail and the will to think through every aspect of an issue, to find a complete solution. That's also a useful skill outside of software or even engineering (I'd imagine law isn't all that different in that regard), but apparently it's really critical for software engineering. At the same time it's not necessarily linked to general intelligence or problem solving ability or creative thinking, it's just a particular way of approaching problems.<p>Said lost article had tests showing that only a small fraction of the population thinks this way, something below 10%.<p>Of course this isn't proven, but it matches with my personal experience. This always makes me very skeptical of things like end user programming, or programming as a mass profession. People without the skill can create programs, in particular in environments, but the results are usually quite fragile and expensive to maintain. "Real" programmers can usually create much greater value at lower cost, so there really isn't much of a point in employing lots of "not really" programmers.