I’m reading a book about beekeeping. In the beginning of the book the author states that the most important thing we need to learn in life is how to learn and we learn by making mistakes. Yes, we can learn from the mistakes of other but the primary way we learn is through our own mistakes. He also states that the reason children learn so rapidly is because they are not afraid to make a mistake. We adults let our ego get in the way of learning because making mistakes implies a certain deficiency—a lack of knowledge. The result is that we do not push the boundary of what we know. If we want to learn we will make mistakes but what is most important is that we learn from our mistakes. 
It is because we are finite that we must learn through our mistakes. Because we are finite we will encounter situations where we will not know what to do. If we do not know what to do we will try something and quite a few times what we try will be wrong.
When we make a mistake in the area of morality, we call it a sin. Now most of the time we know what we ought to do but there are times where we do not. Regardless, what is important in either case is that we learn from our mistakes (sins). That is what God requires. Ezekiel 33:12-16 and Ezekiel 18:20-24 tells us that Israel’s pattern of behavior was important to God and our pattern of behavior is determined by whether we learn from our mistakes or not.
God considered David to be a man after his own heart in spite of David’s failings because David learned from his mistakes. When the prophet Nathan talked to David about his inappropriate relationship with Bathsheba, David could have told Nathan to take a hike or could have had him killed—after all David was king. Instead David learned from his mistake and his repentance is recorded in the beautiful Psalm 51.
Each one of us will make mistakes throughout our lives. The question is whether we will learn from those mistakes.
 Michael Bush. The Practical Beekeeper. X-Star Publishing Company, 2001, pp. 12-13.