I was listening to this youtube video called "The Myth of Genius Programmer" by Ben Collins-Sussman and Fritz and they shared an amazing view on failure. "Don't just fail, but fail quickly and pick up something worthwhile to learn with every failure." This is nice.