I'm gonna go against the grain and say it's a combination of both, but that it's nothing unique to you or something you should feel bad about.

Imposter syndrome is real, and it's rampant, but I believe it's because most of us are imposters. That's how the software industry has organized itself.

It's surprising to friends and family in other industries when I tell them that interviewing for a software dev role is always like starting over from scratch. Even as a senior developer with nearly 10 years of experience, every interview process is an exercise in convincing the other person that you're not a junior, and is more often a losing battle. Doesn't matter if you were recommended from within. Doesn't matter if you've got stars on your GitHub projects. Every time interview will be like Groundhog Day and you'll feel like you're interviewing for your first job. Every coding challenge will make you feel stupid, even if you complete it in time because you know you could have done better if you were given another hour and didn't have someone staring over your shoulder.

But sometimes we make it lucky and get that shiny new job. The paycheck is bigger than the last, and the benefits are better, but you quickly realize the reason your paycheck is bigger is because the work will be at least twice as difficult as what you were working on before, and probably more so. We applied for senior and even lead roles to find ourselves questioning whether those titles make any sense. How senior can we be if we still need help from others because nothing is adequately documented, or because the code is too confusing to us? For all we know, the person whose position we're replacing understood everything and was a "genius" within the company. How does one at least feel adequate when one's mental ass gets kicked at least a few times a week by astonishing problems and never having a complete enough picture of the problem domain?

We tell each other wonderful things about code quality and best practices, but the reality is that we don't work our way up from shitty problems to interesting and enjoyable ones. Far from it, I believe, most of the time. We get more monies and prestigious titles not to write better code or do the real exciting work, but to be the ones who manage to make the code do what the owners want within an expected period of time, and have a willingness to frequently be wrong and be able to fix at last as many wrongs as are created. It feels like being an imposter when a decade went by and the work difficulty seems more related to the passage of time than your ability to code. In a way, it is a form of imposterdom.

What disorients us is the sheer amount of opinion and theology in the field of software that we disguise as fact. Everyone is constantly wrong about everything. Take any given "best practice" or "way of the future", wait a few years, and those best practices will now be "considered harmful" and the way of the future will be "yesterday's software." How is anyone supposed to feel like an expert at anything when the inner reality of the software industry is frequently flipped on its head? How many of us are able to actually be experts at anything? How do we know what's right and what's wrong? If we can't answer those questions, how are we supposed to believe in ourselves and know what we're doing?

The only option left is to power through the slog, fool yourself and others into thinking that you belong, and focus on the better things in life that don't directly involve software.