The biggest lessons programming taught me are that thoughts are creative and we can change our mind.
The first is simple. Although science has come a long way in mapping the brain, no one can predict the next thought or "where a thought comes from." Groups are predictive, but individuals are not. I truly believe that thought is is a creative process we should embrace. It is there in code, when we use our thoughts to take ideas and manifest them through code. But it also means we can apply this to other areas in life. Everyone has an inner dialog and most people just let it play out. You end up with habits and "ritual thoughts" that play on auto-drive. Taking some time to be conscious of what you're thinking and create the right thoughts is a powerful experience.
That's really the basis of "change your mind." I used to have a lot of negative/what-if thoughts and assumed I was destined to be depressed and pessimistic. This journey taught me I'm in control and the easy way out is to let thoughts take a downward spiral every time something negative comes up. I've learned just like a computer we can reprogram ourselves and break the cycle. I live a much more positive, happy, fulfilled life as a result. I don't waste time with "what if" or negative thoughts and instead embrace the moment. This helps me be more productive with programming, writing, training, and all of my life pursuits.
Jeremy