I hope your friend was able to positively impact a few children's lives. It is a Nobel cause to do that sort of thing.
I think the programming skill you are referring to it some combination of all of the above. Many very successful people come from poor backgrounds, but going to a good school and having a steady household certainly increase the odds of success