And that can be demoralizing in itself. Early in my career, after make a stupid 'single character mistake' that broke my entire program, I started to think "maybe I'm not cut out for this".
For a long time, I've had the superstition that if I don't have to fix a couple of syntax errors (or other triviality) initially, it's a bad omen and there's probably some much more significant logic error lurking. Any time something compiles/runs for the first time without adjustment, I get nervous.
When I was first learning how to program it felt like arguing with the most pedantic person in the world. I would write a script that felt like I had crafted a concise and elegant argument, only to have the computer respond, "Invalid. You missed a comma somewhere on line 564".
The first and only programming course I took in college (a very long time ago), I still remember that after making a few typos or whatever on some program, you'd run out of your computer time and would have to beg the grad students who ran the computer center for some more CPU time.
Well, it isn't always. As in the latest big mystery I was a part of solving -- the build failed because there were files left over after the "clean" step of msbuild. This obviously shouldn't happen.
The culprit was an extra build action (among ~20) that had been cut-and-pasted from Stack Overflow 1.5 years ago and worked splendidly, until an unrelated update (dev machine prerequisite, installed organization-wide) caused it to behave differently on local builds but not on the build servers. The check-in comment of the commit in question was "merge hmm", and the start time of the failure is uncertain because the project was rarely built outside of the centralized build infrastructure (where it worked fine). 10 cumulative hours of debugging across four developers was spent to figure this out.
In my experience, these kinds of "WTF" errors happen more often than the ones that make you go "wow, I am stupid". At least when you reach a skill level where the obvious problems don't show up so often.
But the point stands that this requires an uncommon kind of patience. Hooray, we solved it. Now we are finally able to modify the back-end behavior of this specific type of mutual fund order, which is what we wanted in the first place. Think the finance part of the task is more interesting than the banging your head against the wall debugging the tech stack part? Tough luck! Should have been born at the time when this happened by manually operating a terminal in the back office.
Well, sometimes, the _root cause_ is so bloody obvious. But now you have to figure out how to fix it without breaking everything around and spending a year refactoring.