When you're first learning to code, it's likely you'll find yourself frustrated and overwhelmed pretty frequently. The biggest frustration that I had when I started teaching myself how to build my own apps was the lack of resources and guidance to get started. Udemy was just beginning to gain popularity and coding bootcamps were not really a thing yet. Stack Overflow and Google existed, but for an outsider, there are times when you simply don't know what to Google. There is a difference between drowning and learning how to swim. When you first start learning there are definitely times when you feel like giving up, and there can be periods when you feel like you're going in circles without any progress. But once you get yourself oriented, it's likely you will start to see your skills improve quickly. But how do you get there?
These days, Udemy is well-known and more communities like IndieHackers exist, so it's not quite as difficult to get started as it used to be. There's still a lot of conflicting advice on blogs, forums, and Stack Overflow on how to get started though, so it's still easy to miss the forest for the trees. Here's some general advice I wish I had several years ago when I first started building my own apps:
Start now. Learning to code is not going to be any easier tomorrow. Get off "Someday Isle" because there's never going to be a perfect time to start learning. Start today. Udemy has made it incredibly easy (and cheap) to get started learning. If you say you want to learn to code yet you're sitting on 10 unfinished Udemy courses, this is an indicator that you lack motivation, not that programming is hard. Find a course on Udemy and follow along with the projects. Don't just mindlessly copy what the instructor is doing. Branch off at some point in the course to try to build something that you want to build in parallel with the course content once you gain enough confidence. Build more projects until you're comfortable working with the tech stack you're learning.
Don't waste time trying to pick the perfect language. If you're learning web development, learning HTML and CSS, a backend language, how to set up a database, and a JavaScript framework for the front end will almost certainly get you where you need to be.
Code every day. That's right. Every. Damn. Day. You're learning a new way of thinking, and the more you immerse yourself in code, the faster you'll pick it up and the more productive you'll be.
Don't give up. If you've exhausted absolutely all of your mental energy and willpower trying to solve a certain problem, go for a walk, take a nap, do something unrelated for awhile or just come back to it the next day. You'll often have an easier time finding your solution after returning from a mental break.
Politely decline friends' advances when they ask you to build their app idea. Many people, once learning you know how to code, will suddenly have an app idea pop into their head and think if they "just knew someone who could build it", the app would be a great success, making both you and your friend rich in the process. This is almost always a bad idea and you should decline. Unless you're getting paid, don't bother.
Lastly, if you're learning to code in the hopes of building a SaaS product or app, you should know that learning to code alone will not guarantee your success. Yes, you'll be able to ship faster and build your app/idea exactly they way you want. But building an app and building a business are two different things.
There's definitely more to add here, but in general this is the advice I would give to someone who is thinking about learning to code or who has just started. Hopefully it can save some of you guys some time and frustration.