punishment suppresses behaviors best when it occurs as the response is being made , or immediately atterward (timing) , and when it is given each time a response occurs (consistency) Thus , a dog that has developed a habit of constantly barking can be effectively ( and humanely ) punished if water is sprayed on its nose each time it barks