Another motivational statement...
If at first you don't succeed, ... you're in good company.
When you fall flat on your face, the only REAL tragedy is if you liked your nose before the fall.
I had a teacher once who graded like a wild person with a long, sharp knife. My papers used to bleed they had so much red on them. When our class complained, she said, "Failure builds character. Easy exams don't prove anything. Don't you like a real challenge?" Only one of us had a good response: "You mean you like us so much you want to see us again next year?" Tests got easier after that.
But I digress... failure in the programming industry is a GOOD thing. As long as you are careful to fail BEFORE you take product to market. That's why on any systems I have managed in the past, I will NEVER EVER run version x.0 of anything. Except, of course, that for a long time, Microsoft never released minor versions of programs. Access was 1.0, 2.0, 3.0, etc. for a long time. Only lately have they started showing the detailed build number and lower-level version sequences.
Hey, everybody fails now and then. You want failure in a BIG way? I'll give you some REALLY big failures...
New Coke
Windows ME
The Edsel (automobile, for you young whippersnappers)
The movie Heaven's Gate
Fashion designer "Pop Top" Terp. (He made dresses out of ring-pull can tops. Looked like chain mail.)
And historically, ...
Phlogiston theory
Aether as a medium for light transmission
Ben Franklin's lesser-known contribution to the study of electrical phenomena. (No, not the kite experiment. Ben is ALSO the guy who established the convention that it is the POSITIVE charges that define the direction of current flow. Today we know it is the negative charges, but hey, he had a 50-50 shot at being right...)
The guy who invented the game of Russian Roulette - and practised it by himself.
Wrong-way Corrigan, the famous cross-country pilot. He flew across the country, one coast to the other, in a non-stop flight. First man to do so. Problem is, he wanted to cross the ocean, not the continent. Got his directions wrong by 180 degrees and never noticed that he wasn't over water. Sheesh!
William One-Shot Beaudine, the Hollywood director who NEVER shot a retake on a scene no matter how cheesy it was. But he was always on budget and on time. Never mind that the imperfections in the scenes showed up a bit more often... Like the time he had someone walking with a lit candle down a long hallway. Well, the "standard" way to show this using normally lit sets is to have a spotlight shining from off-camera to track the position of the candle. Never mind that when One-Shot shot it, the position of the spot and the candle rarely had anything to do with one another.
Then there was the director/producer who put together that cheese-fest from the late 50's, Robot Monster. Problem is, he didn't check schedules, and the only guy in Hollywood who had a working "robot suit" was booked solid throughout the entire shoot for this epic piece of fluff. So with a little creativity, he hired the guy who had the gorilla suit and had him wear a diving helmet with an antenna glued to it. Mistakes? No, sir, not a one.
So don't worry about failure. You're in good company! LOTS of people make mistakes in a very public way.