Dear future programmer,
As programmers, we are problem solvers. In fact, we rarely have the solution to a problem the moment it is presented to us. It is the best and sometimes, most frustrating part of our job.
As a new programmer, you will face many unknown challenges. Learn to love period of time between when you are presented with a problem and the point at which you discover the solution. This period of time is where many things are unknown, a period of time where the solution is uncertain. This is also the period of time where the most learning occurs.
In this period of uncertainty, it is easy to become frustrated or angry. It's easy to give up here. You might let depression sink in because you feel like you'll never figure out your solution. Or even worse you'll try everything you find on Stack Overflow without giving the problem any real thought.
All of these feelings are very normal, but they keep you from thinking clearly. When the pressure of uncertainty starts to affect your mood, the best thing you can do for yourself is to take a break. Never quit, Never accept defeat but always allow yourself a break. Go for a walk. Go lift something. Hell, go play some video games. Disconnect from the problem for a period of time. When you do this, you'll find that when you return, you will be able to approach the problem with a fresh perspective.
You should be mindful of your attitude while learning to program. There is a saying taught to me by a Green Beret I had the pleasure to train with; Attitude is everything, keep yours positive. Our attitude affects others around us. Our attitude while learning also determines how willing others are to help us. If I'm always negative or if I always look and act frustrated when under pressure, very few people will want to work with me. However, if I approach challenges with a positive attitude, if I celebrate even small victories, and always thank others for their help, I will always have someone to help me when things get tough.
Whenever you start to feel frustrated, remember this: the uncomfortable feeling of not knowing the solution is only a precursor to the exhilaration of solving the problem. Embrace the suck. Don't let a negative attitude or frustration cause you to stop. Stop stopping. Progress, no matter how small, is still progress.
Someone who has been there.