@futurebird unlike math, when writing code you will get almost instant feedback. the code editor could complain, the compiler could say no, etc... so more to get frustrated with.
ive mostly taught highschool to college students and it really doesnt get better. the impatience will always be there. however I have noticed that giving students tools or guides such as a "troubleshooting framework" does a lot. if you notice similar patterns in their questions or errors, this can help build that framework.
You could also just throw the computers out the window and just write pseudocode on paper and do dry running. My highschool compsci teacher did this to help sharpen our problem solving skills