One of the most demotivating things a new developer can face is getting stuck and not knowing what to do! It can be very hard to stay motivated and to know what to read and learn when you are just starting out, being stuck somewhere often means you might feel like giving up.
Maybe I am not good at developing? Maybe it is easier for someone else with a different background/age? Maybe I won't ever 'get it'? All these things are NOT TRUE, the only difference between someone who made is a developer and someone who did not is being able to push through and keep going even when you think you cannot fix whatever is wrong. Knowing when to take a break, knowing that there is always more to learn and keeping an open mind for changes. Sometimes things change because someone proved that that is the best way to it.
That feeling of "I am not good enough" and "I just don't get it!" never leaves, every developer still has bad days and those "I am stuck moments" but we simply learn how to overcome it and how to stay motivated.
So I wanted to share what I normally do when I feel I hit a wall and I hope it may help others too:
Take a break, often coming back in fifteen minutes or even just the next day can make all the difference. Being tired can make you miss little things
Try explaining your problem to someone else, and if no one is around just talk your problem through out loud. Verbalising your problem can make you realise where you went wrong. Developers sometimes have little ducks to talk to because of how often you go to ask for help and by just explaining the problem you realise what you did wrong, so not to waste anyone else's time you can chat to the little rubber duck first :D
Google it! Stuck somewhere? Google the problem, googling for a solution is a skill. Knowing what to put as the search term takes practice and over time you will get better at arriving directly at the right kind of problem on the internet with the exact solution you need. Be specific in your search terms.
If you feel that something is simply too hard, take a step back. Review what you know and what you are unsure of and try reading a little more about it to see if you can gain a clearer understanding. Being a developer you never stop learning, so if this is something you do not enjoy yet this is a chance to figure out what makes you learn well and how you can make it more interesting for yourself.