There is nothing discouraging and demoralizing than failing to achieve your goals or anything that you want to do or learn. It can leave never wanting to try again whatever you wanted to do or achieve. Failure has got this ability to drain of self-confidence and put in you in depression ,but the truth of the matter is that in order to be good something you have to fail first.
Building is a startup is similar and you are probably going to fail a lot of times and you are probably going to feel like giving up. Everything that I have mastered, I failed first, from learning to ride a bicycle to programming. After sometime I have now realised that in order to learn one must embrace failure and stop feeling discouraged.
If you embrace failure and actual challenges yourself to master what you are failing I have found out that you will have more passion which will help mastering whatever you are learning. Turning failure to passion means you will more likely going to put more effort into learning which will increase your chances of doing that.
Failing first helps your remember the lessons very well. Our minds have difficulty in remembering things but if you struggle with something or put a lot of effort into something you are more likely to remember it first than had you got the first.
Also if you manage to get what were you failing you are going to feel like a winner and become motivated to actual learn more. This is very important because it gives a sense of achievement and the confidence that you can do anything.
Failure allows to ask specific questions to the people who know more better. If you try something and ask others, it will be easy to understand their answers because you are more likely going to be specific about exactly what you are failing to do.
Instead of being demoralised and discouraged by failure you should be motivated to try to understand and figure out how you are failing because if you keep on trying you will get it in the end.