There’s a book I can’t recommend highly enough from the 80s(?) written by a tennis coach about teaching tennis. It’s called The Inner Game of Tennis. In it Tim Gallaway, the author says there’s really two games of tennis: the outer game, involving an opponent, a ball, a racquet, scoring, all the rest. And an inner game where the player brings themself to the court and give it their all. The inner game deals with setbacks and losses. He gives a really simple “formula”:

Performance = potential - how much you get in your own way.

Gallaway says everyone focuses on the outer game. And ignores the inner game. And that inner game is what stops most people from learning tennis.

I’ve been reading The inner game of music lately, which was inspired by the inner game of tennis. There was an exercise in the first chapter - which I did and it made me cry. He said to just sit down at my instrument and play anything, while saying out loud all the inner thoughts. I must have talked for about 20 minutes straight - “I’m worried I’ll look like an idiot. That note didn’t sound good. I’m worried my GF will think I’m bad at piano and unlovable. I’m worried that I’m not very good and I won’t get better than I am now.”. It went on and on. I don’t have a problem with the outer game of learning piano. I’m held back by the inner game. When I play I swear half my brain is devoted to generating, and quashing those thoughts. There can’t be many brain cells are left over for actually playing and listening to the piano!

> And yet, every single day, I have felt frustrated, annoyed with myself and the problem I am trying to solve, mentally exhausted, stupid, dumb, feeling as if my brain is just incapable of grasping these simple concepts, keeping these simple details in mind.

I’ve been programming for 30 years, and by any external measure I’m really good at it. I’ve been doing it since I was 8 or 9 years old. For some reason I don’t doubt myself in programming like I do in music. Do I have setbacks? Every. Single. Day. Finally my point: We might be no different in our actual programming skill. Yesterday I refactored a simple 10 line for() loop. The new code should have been equivalent but it somehow wasn’t, and it took me 2 hours - even knowing where the bug was - to figure out why.

How many of your brain cells are actually devoted to programming, vs generating and quashing all your negative self talk? It’s possible you just need practice, and to go back and watch a Python course for the Nth time. But I suspect your trouble is you’re struggling with the inner game of programming, not the outer game. And you’re only programming with half your brain. Someone once said that the average error rate for a professional programmer is about 1 bug per 10 shipped lines of code. For every 10 lines of code written by professionals, we maybe write 3 bugs and only find 2 of them. If every one of those bugs is evidence that you’re an idiot, programming will crush you.

But the thing to learn isn’t how to make programming “smooth”. If you do it right, it will never be smooth. You aren’t making 1 million pizzas. Every program is new and different (else you should just reuse your old code). The thing to learn is how to stop abusing yourself like this when you struggle. As you said, Programming is hard. But you’re doing fine.

And read the inner game if you have a chance. If I’m right, that’s where the work is. Not in some Python fundamentals course you’ve already seen 8 other times.