I think it is crucial to recognize the knits and purls when you see them. Once you establish that, when you see that you are having the same problem over and over, make a practice of checking your work regularly...at least each row/round, if not more frequently.
I do this, especially if I'm watching tv or something while I'm knitting. If you look at your knitting every few stitches to make sure you're knitting where you're supposed to knit and purling where you're supposed to purl, you won't get too far along before finding the mistake.
Next, make sure you know how to unknit or "tink" (knit, spelled backwards. :)). Then it's not a big deal at all to undo a row or half a row, and it keeps you from feeling like you have to start over all the time.
So...learn to read your knitting, and check often. That will keep your frustration levels lower and keep your mistakes to a minimum!