if (*success*) self-image += hard work + persistence + intelligence;
else self-image += bad luck + external obstacles + unfair handicapping;
The point being, this is all about the story we tell ourselves, and project onto others, and the correspondence to reality is shadowy.
The above coding could also imply the following:
if (*success*) self-image -= good luck + external advantages + positive handicaps;
i.e., an increasing tendency to overlook or discount the above as being contributing factors. There is also an increased tendency towards self-satisfaction and complacency, and arrogance towards others who are not as successful.
There is a remarkable tendency towards tautologies in this sort of discussion. If intelligence and/or hard work determines success and success is an indicator of the presence of intelligence and/or hard work then the terms become useless if one is trying to say anything meaningful.
Luck doesn’t have to be as extreme as being born in an impoverished country vs. the USA. Being born into a family in which there has been someone who works in a scientific sort of field is a big plus factor. One has to consider the imprinting that starts from day 1.
Being born in a cultural niche where group identity actively discourages being a pointy-headed nerd is also a factor, where “book knowledge” or being a bookwork is a cause for derision. Someone who tries to succeed in such a negative emotional environment has got it tough, especially if they hit a conceptual obstacle and receive “I told you so” rather than encouragement. There could also by well-intentioned but misguided help from a family, such as teaching a study model that is ineffective for that stage in the child’s development (e.g., rote memorization & drilling instead of problem solving? or maybe turning them loose to solve something on their own before they have the needed tools/skills), or otherwise turning the learning task into a system of negative-feedback shocks, turning it into a chore.
I know a brilliant women mathematician, but how many young girls with talent in this regard are encouraged? More now than in the recent past, but the pressure to not “show up” young boys or to be “unfeminine” still exists in various degrees. This friend had one incredible advantage, a father who was a University level mathematics professor. Imprinting, anyone? Sure, she also worked hard at her studies (is it still hard work if much of it happens to be fun and relatively easy?), but maybe was lucky her parents weren’t subscribers to strong preconceptions about appropriate roles for the sexes that would have conflicted with this career path, and grew up in a community that also supported rather than discouraged her.
The definition of hard work is especially dubious and shadowy and dangerously high in the degree of self-deception & tautology. Theories and effectiveness of useful skill-building strategies vary wildly. The clearest example of this that I can think of may not translate to this programming crowd; it comes from the music world. A young player can practice 8 hours a day, but if they are not practising effectively, no matter how hard or how persistent, they will fail. It is not uncommon for a teacher to have misguided conceptual framework for how they achieved their success, and ruin (despite being well-meaning) their most promising and talented students.
My main take-away here is the following (sorry for the tldr):
(1) If someone wants to try, if you can afford to help, then give them a hand.
(2) If they fail, try and put yourself in their shoes and figure out what the hitch is, don’t just judge them and write them off.
(3) Don’t assume that a strategy that you adopted and brought you success is necessarily the right one for the current situation. Try to understand the OP’s position and issues and tailor the answer accordingly.
That is what I try to do when I give OPs coding advice on threads where they are getting tons of flak and attitude. There are an infinite number of ways to succeed or fail, many of which will be new or eye-opening to those of us who are trying to help.