The way I've heard that principle phrased is "praise in public, criticize in private."
It's good advice, because criticizing people in public (i.e. in front of their peers) always backfires -- it just makes the criticized person defensive, so they stop being open to learning from their mistake.