We learn through experiencing things. It is called applied learning. But our actions can either go into two ways; good outcome or bad outcome. What we should do is to be able to measure what actions we have to do against all the consequences whatever they may be, think before you act, so to speak.