I’ve been in a rut lately. Missing obvious things, shipping less than my best code. It’s come to my attention that I’m not as good at programming as I am at crafting database queries and tuning them but that’s such a small niche given how easy it is to pick up SQL that I’m having an existential crisis. So I’m working on getting better and getting more confident.
FWIW, I'd say the most important characteristic of terrible programmers is their supreme unearned confidence!
Which is to say: Focus on getting better. The confidence is secondary.