From Cecily Carver in Things I Wish Someone Had Told Me When I Was Learning How to Code:
I’ve found that a big difference between new coders and experienced coders is faith: faith that things are going wrong for a logical and discoverable reason, faith that problems are fixable, faith that there is a way to accomplish the goal.
I'd exchange faith for confidence. I'd also say that much of what's discussed in the article, including the above quote, applies to mechanical and electrical systems, as well.