Samuel Beckett's words "Try again. Fail again. Fail better." are one of the best mantra in a software career.
It may seem counter intuitive, after all doesn't "fail" equate to "crash" or something similar in software? It does, but that crash if timed right (preferably early on in the development cycle and early on in the developer's career :) ) may prove to be the best thing that happened to the software or the person who wrote it. A crash, you see, tells a developer what not to do. It gives her a chance to find a solution in a better way, it teaches her the invaluable lesson of things to avoid the next time she writes her code. The more fails she has, the more experienced she becomes and the more robust her code becomes.
The value of experience in software is not in the fact that this person spent that many years in front of a computer, it is in the fact that this person knows that many ways of not doing something. So if you are in the career of writing code for living, welcome the mistakes you make, learn from them and make sure you avoid making that mistake the next time.
I was recently reminded of this when reading about an Arctic expedition that had failed a long time ago.
It was the Andrée's Arctic balloon expedition of 1897 - where three people attempted to fly to north pole on hydrogen balloon and thereby by passing all the dangers and difficulties of a trip by the seas.
In theory great, but they failed in their planning and their safety precautions. They never returned and for a long time nobody knew what happened to them. At last in 1930 their last camp and remains were found in an island. They left detailed log of what they did and many pictures. From these we know that their balloon crashed on the 3rd day of the trip and they tried to walk their way back to civilization. They may have failed, but they taught future explorers about what not to do, about survivals in the extreme cold environments and, of course, not balloon out to north pole with late nineteenth century technology!
I'll finish with a definitive quote attributed (sometimes) to that great inventor, Thomas Edision, in the context of his failures with creating the light bulb: “I have not failed. I've just found 10,000 ways that won't work.”