I understand completely...I also teach.
Some teachers just should not be teachers.
What I tell my students is this; I can only give you so much, you have to do work too.
Whether the teacher is great or not.
Google things, phrases you dont understand, words you don't understand, ask for help, ask lots of questions, go to office hours. Never expect, in any class, to get it all from the teacher.
You should want to know more, want to look at other books, websites, tutorials.
To me a textbook is a guide and there are plenty of them. I need to look at many to find something I feel will make sense. Or just make it up myself. But a student needs to do the same. Sometimes another person (or web site etc) says it the way you need to understand it.
Forget about failing and jobs right now. Don't get distracted by the grade. First employers dont look at a grade. They will give you code to debug or code to write.
It should be that you find something so curious you need to look for more examples. You MUST write the code, MUST use a pencil and paper and trace the variables, see what they are doing. Use printouts every where to see whats going on in loops (take them out later).
I find many students come to me and say I don't get it.
Ok, which part.
All of it.
Ok, we start again. What did you read in the book and let me see your notes.
I didn't read the book and/or I didn't take notes. (or if they did, I and the student can hardly read them).
So its not always the teacher. But presuming it is, you're stuck with him/her. So, get out there and find out, get other students to work together. NEVER feel like they all get it, trust me they don't.
I need to know if the student is getting it and I only know if they ask questions. The student needs to stop me when I say any questions. Stop me when I am doing something and ask to explain before going further.
Its not you, its just learning how to learn, or how YOU learn. And it applies to all subjects.
So ask questions, use other sources and don't give up because the teacher sucks. That doesn't mean you do.
Good luck and stick with it !!!