Programming isn't just about writing the code itself; in many ways, that's the easiest part. It's about identifying and solving problems, many of which aren't actually your problems, meaning you have to have the ability to step outside your own frame of reference to understand the problem in the first place and continue doing so in order to work up a solution. Even for a junior developer, those skills can be a huge boon.
Learning, say, Wittgenstein's philosophy regarding grammar and language [1] gives an interesting insight into how humans express ourselves and delves directly into the heart of modern programming, IMHO. Rarely do we software developers write low level algorithms anymore, but writing consistent and complex API's is crucial and shares more in common with be conversant with large volumes of philosophical treatises.
Based on that, it makes sense many philosophy students would have successful careers – being able to reason and solve challenging problems is always key point in making good money. :)
My experience would support this. You need a mindset keen towards rigor, and motivation. Given those, and guidance, anyone can learn to program - at least in limited contexts.