When I started programming 2 years ago I remember the frustrating process it was. I started with game development coding in GameMaker Studio 2 using GML instead of starting with something easier to understand and it was a long process. Mostly because game development by yourself is way more than writing code.
(It's small I know but if I resize it looks horrible. If you want to see more go to my website https://commithub.com on the about me section there are a few more)
To be honest for any beginner the first few months will be hell. Don't let that discourage you. Programming can be very fulfilling and fun it just takes a bit to wrap your head around.
This question is one that if you spent too much time on Reddit or any forum that has a tag for programming or is a strictly programming forum gets asked the most. Now I'm not saying the question is wrong because when starting out we often feel lost and with so many languages, frameworks, shiny things and things to come we get scared and that is ok, languages are scary.
In the case of programming, there is not a single language that is better than all the other ones. You don't even need to worry if you made the right decision picking that first language because at it's core, programming is about problem-solving, thinking logically and breaking down a problem into steps to find a solution.
As you continue learning different languages you will realize that they share similarities and with time you'll pick up languages faster and faster. It's more important to actually pick one and start out that just stall waiting for a random lightbulb to light on top of your head.
Like I wrote a bit back I started with Game Development and I still remember when I was introduced to for loops. I felt like the biggest loser and spent like an hour or two just trying to understand it. Even today when I keep learning different libraries and languages I feel stupid and that is ok. Programming is hard and it will make you feel uncomfortable. When you feel this way remember that this is an opportunity for us to grow and strengthen our character.
If it wasn't for those hours after college I stayed on my room hacking away I wouldn't come this far in life. The greatest lesson that programming taught me was learning not to give up and be persistent.
Often programmers are pictured that they type a 100 words per second like a madman. This is portrayed by TV shows like Mr.Robot (I love that show so much actually) that the hacker is typing very intensively and has the solution right away. In the real world, we actually spend more time figuring out how to solve the problem. A good rule of thumb before writing any code is to grab a piece of paper and outline what you want the program to do step by step. Even experts sometimes forget to break the problem step by step and then get stuck saying "I don't know why my program works".
By breaking the problem it will help clear out any questions you may have. A skill you probably have heard around forums too is called Google-Fu and to summarize it's the skill to research on google for answers to a given problem. If you break the problem it will be easier to ask the right questions and look in forums, documentation of the language or others people code to get what you need. A tip if you feel overwhelmed with documentation of a language is that don't feel like you need to memorize every piece of syntax. No matter at what stage in your career you will consult the documentation for that language about different things you need to do.
Another misconception about programmers is that we are math wizards and if you hated math class you are not going to make it. Honestly, math has little to do with programming in the sense you are not working with equations for the most part unless you are programming a math program. I actually was horrible at math before I started to program and struggled a lot to get the most simple concepts. Now programming and math share one similar trait. They teach us how to break a problem step by step to get an output.
After I learn a few things in programming it actually made math easier not because they look and act the same. Just because I became more patient and liked to problem solve way more. Now, this doesn't mean math is useless and you should flush it down the toilet. It helps us how to problem solve so don't worry about being the best student in your math class to be a programmer just start coding.
For everything having a clear achievable goal motivates us to do better and keep doing that activity. Like programming, a goal looks more achievable by breaking it up in pieces. Haven't you had that summer goal when you said I will lose 30 pounds and you give up the first week cause you lost only 2 pounds and feel discouraged cause the objective is far away. Now wouldn't it feel better if you break it up into small goals like every week I will lose 2 pounds and everytime you achieve it you feel happy because you achieved something?
Sometimes we don't achieve this small goal and that is okay also as long as we put in the effort and try to do better each day and not give up I'm sure you will achieve what you want to do. Things get tough and times change just let that frustration be a trampoline to jump-start you to your goal instead of an anchor sinking you down deeper and deeper.
This quote is my favorite about mistakes
"A failure is not always a mistake, it may simply be the best one can do under the circumstances. The real mistake is to stop trying". B. F. Skinner
Not only beginners but experts make programming mistakes all the time. We are human made of flesh and blood so we are bound to make mistakes. I'm pretty sure better writers than me have noticed thousands of grammar mistakes in this post and probably are screaming at the screen calling me stupid. Does that stop me from writing? Absolutely not because the more you write the better you get. Nobody gets born and created the next Linux distro before even learning to walk. Skills and knowledge can be developed with trial and error. Just be patient.
Programming can be frustrating at times but it's also a very rewarding endeavor. The thing that most fascinates me about it it's that you create stuff using your brain. The resources below will help you out if you want to dive a bit deeper or just want to get started programming right away. Hope this article helps!