A newbie dev asked a community I'm a part of asked if he should give up on learning programming. He's been learning python for about 2 months now, and has seen nothing but frustration. Here's my response to him and any budding developers like him:
I started programming when I was 8 years old. I had an Atari that had a BASIC module and a keyboard. I didn't realize that what I was doing was called programming. I just thought it was some game that I read the manual to and could type things in to make it do stuff.
Fast forward to today. I'm 32 years old. As recently as a few months ago, I stopped and asked myself "What the fuck are you doing? Are you sure you want to be a programmer?"
This happens to every single programmer multiple times in their life. The first time it happened to me, I swore off programming for 2 or 3 years. (It was right after my initial formal training with programming in highschool in the late 90's). But then, a friend asked me to help him with a project, and I couldn't help it. I got sucked back in. I've been doing it professionally for nearly 10 years.
The most important thing to realize about programming (or any art form, really), is: Our chosen art medium is very reactionary.
You can spend a lot of time planning architecture, but when it comes to solving problems you've never run into before, you're almost never going to get it right on first compile. Much like a frustrated sculptor, it's not uncommon for us to wipe an entire commit and start over from scratch. We can spend days or weeks down a rabbit hole trying to solve a problem, only to say "Fuck it.", wipe our commit, and try a different approach.
Programming is a study in frustration. That's why we do it. The "coder's high" we get when something works, or when you've written a beautiful piece of code, is one of the most rewarding payoffs you can have as a professional.
tl;dr: Think of learning programming like learning an art form, and our medium is "problem solving". Don't give up. When you get it right, it's totally worth it.