I tell my students to view me as their mortal enemy. They should know where I am in the dojo at all times. If I'm not there, they'd better be ready for me. This is cultivation of awareness.
If a student repeatedly gabs, comes late for practice for no good reason, and doesn't pay attention, IT REALLY PISSES ME OFF!!!, and I let them know it.
The result is a better learning curve and it's now really difficult for me to sneak up behind them and throw them down; something I used to like to do to test their ukemi.
It's rude to repeatedly have your back turned to a teacher and to be talking a lot in the dojo (before, during, or after class); as a student, be aware of that, because as a teacher, such behavior comes off as inconsiderate and lacking proper martial awareness, even if you, as a student don't intend to project such an image.
Now that we have a good teacher/student understanding in the dojo, harmony is restored and we all have a good time.