I am not sure about the hard work part. Some people don't seem to think the right way for programming.
I studied a one year IT masters conversion course back in the dot com boom, and chose the best / hardest course I could find. The first 3 weeks of the course was an intensive Java programming course. There was an exam at the end of this. They suggested that anyone who didn't pass this exam, don't do the rest of the course, but they didn't actually force them off. I was friends with at least two people that failed that exam, but continued anyway. They struggled and I don't think they passed the final exam despite plenty of hard work.
I’ve worked with people who didn’t care at all, it was a job, but they studied and worked hard and were pretty good.
Of course, I’d rather work with someone who had both.
Some personalities are better suited for programming, although I think hard work can overcome anything.
I remember an old blog post [0] of mine that used Hammerstein-Equord personality quadrants of smart/industrious, smart/lazy, stupid/industrious, stupid/lazy and describing it for how that effects tech team planning.
[0] http://www.prepend.com/2009/05/programmer-classifications-by...