Some say that insanity is doing the same things over and over again expecting different results. When I was younger I never understood why a phrase like that even existed. It seemed like common sense. But now I see the simple wisdom in these words.
Like it or not, we live life by trial and error a lot of the time. Learning from our mistakes and changing our behavior requires humility and courage. It also requires the Atonement of Jesus Christ to forgive, forget, and truly Change ourselves from the inside. (The following graphic illustrates how change must originate from the individual and radiate to the world around us, not the other way around.)
One of our church leaders has said, "...realize that it’s okay to make a mistake—even [a painful one]. One of Satan’s greatest lies is that trial and error learning is wrong. It’s true that it hurts, but much of our mortal experience is composed of trial and error learning. Repentance wouldn’t even be possible if our Father hadn’t known before we started that mistakes would be a part of our learning process."
So, don't get down on yourself (or others) if you have made errors in judgment on the road of life. Just commit to CHANGE! I know that I have!