How to Change the World: The Growth Mindset: Guy Kawasaki points to an article about Carol Dweck's work on growth vs. fixed mindsets, which is a great prod to me.
I went to a talk recently by Carol about how children's attitudes towards performance and learning greatly affects their performance, with some good statistical data on studies she and others have done. The take-away, for children: It's more more effective to believe that you can and should grow your abilities vs. believing that abilities are inherent. Don't tell your childen they're smart (fixed mindset), tell them it's great that they're trying hard and can improve (growth mindset).
The problem with the fixed mindset is that it leads to fear - if you can't do something right, then clearly you can't do it, and you'd better hide that fact as quickly as possible, mostly by not trying. The growth mindset, on the other hand, assumes that you can always improve. The latter, unsurprisingly, leads to better performance -- and to learning how to learn and improve.
The same mindsets appear in adults as well of course. Since software engineering is effectively a learning exercise, the growth mindset is much more effective than the fixed mindset.