We have a rather clever cat. We generally focus on a positive reward strategy; it is more effective and less frustrating than punishment. He's even learned some tricks/commands. However, we, like many cat owners, do have a water squirt bottle which can be used to modify undesirable feline behavior if necessary.
Our cat has figured out that if nobody is wielding The Spritz Bottle of Doom, then it cannot squirt him with water. He's started hopping up on the counter (where cats are Not Allowed, and he is well aware that he is Not Allowed there but hops up anyways) and cuddling brazenly right next to the squirt bottle.
As soon as you pick up the spritz bottle, he goes to condition orange. Once it has been pointed at him, he winces and considers relocating.
Its almost like the cat understands ability, opportunity and jeopardy; he can operate in the Cooper Color Code system; he realizes that inanimate objects are generally inert unless operated by someone.
That's pretty impressive considering what you can find on the internets about people.