I think I'd put "environment" in at #3, maybe even #2. Where environment is a wide umbrella including the obvious (time and space to devote to study, quality of study materials and support) to the somewhat less so (your gender, your race, your affluence or lack thereof, the supportive/skeptical attitudes of your family and friends etc).
Environment is subject to limited control by an individual. But young, affluent people have the most control. Environment winds up being largely a matter of luck.
This environmental influence - which so often is matter of luck - is one subtlety that seems to get consistently left out of all these "10,000 hours" and "100 hours" type discussions. Even a clever person can spend 10,000 hours working at something under terrible conditions and have poor results. One doesn't have to be particularly bright to spend 10 hours under ideal circumstances and make real progress.
By leaving this out, we offer unwarranted support to a certain Utopian/libertarian/meritocratic mythos that is so popular in the software/startup field. And I think that's a shame. I think the field will ultimately be better off if it can view itself more clearly.