Not at the same time, but in alternation, sure. It's all reactions to underlying shame and inadequacy beliefs/feelings which are there all the time I expect.
Here too the Schrödinger's equations apply: a programmer's state during coding is a superposition of both of these states until actually trying to run the code, at which point it collapses into one of the two states.
I'm pretty firmly in the second category only. I have had the first a few times, but when whatever thing you were so stoked about inevitably fries or fails a few weeks in, you quickly learn to stop doing #1 altogether.
The trick there is that you'll be developing forever unless you get your hands dirty, because it like 80% works, and you need 99% to put it in any kind of prod.
Isn't that first artwork from the Atari BASIC book cover? I suffered enough with BASIC on my TI-99 and IBM XT, I can't imagine how rough the Atari version was.
The HACKER MAN knowing everything, always have the only solution and being boss in their realm
The DAUBTER thinking they know too less, always searching for the best solution for the problem and trying to get as many information to solve the problem as possible
Even having the imposter syndrome as a big problem for mental health. I genuinely have the opinion it makes the better devs.