Programming is like a roller coaster ride. Sometimes it goes up, then down again. This also applies in private life and shapes the personality.
And when you are at the "low point", all you have to do is get up, push up the weights and just keep going.
This is my life motto since I could think and helps me in many situations - whether in my private or professional life.
The experience you gain through it just makes you stronger. That's why the path to success is experience.