Good advice for my kids. I've had similar experiences, since I lived in many different places and at each place, I had to go through it again. After awhile, I started to do it pre-emptively by scoping out the assholes and wait for them to say anything even remotely provocative then I pounced. Since I'm smaller and weaker, I can't say I win even half the time, but they leave me alone 100% of the time after the fights. Some even become my friends.
Don't underestimate the element of surprise! Hit first, hit hard, son! :)