Code is good to know, but it won't actually protect you from someone who does not follow it. There are few things I do to try to minimize chance of injury on crowded runs.
- Ski at the speed of traffic. If this is too fast for you, pull over and wait until there is a gap to ski the speed you want to.
- If you hear someone behind you, ski 'predictably'. This means doing short rhythmic turns or otherwise minimize the amount of trail you are using. This makes it easier for someone to go around. Even better if you can find someone else doing this, just get behind them and ski like they do.
- If you notice a herd of 'bros' coming down, best to just pull over and assume a defensive pose. I like to stand with my poles pointed as weapons uphill with the grip braced against my pelvis. Basically like a pikeman against cavalry. This will keep them from buzzing close. YMMV - I am 6' and 210lbs, so this works for me. If they run into me and my poles, they will get seriously injured.
- If you have the skills and know the area, get off the trail. Go in the trees or traverse to an adjacent run. Alternatively, if there are bumps on the run, ski there instead of on the groomer.
- On top of all of these things is you can wave your poles around wildly. People are less likely to try to cut near you if they are likely to get whacked by a pole.
The general theme here is if someone is ignoring the code, you need to appeal to base instincts (i.e. fear of injury) to avoid getting hurt yourself. The more dangerous you can make yourself appear, the more others avoid you.
And then of course there's the basic 'don't ski there' advice... not super helpful if you find yourself in this situation.