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.