The Duties of the Heart, by Rabbi Bachye, tr. by Edwin Collins, , at sacred-texts.com
He who is humble before God will not only do good to all men, but he will speak kindly to them and of them, and will never relate anything shameful about them, and will forgive them for any shameful things they may say about him, even if they are not worthy of such treatment. It is related of one of the Chassideem, that once when he was taking a walk with his disciples, they passed the carcass of a dog in an advanced stage of decomposition. His disciples exclaimed: "Oh, how this carcass stinks!" He replied: "Oh, how white its teeth are!" so as to counteract their remark.
If it be wrong to speak disparagingly of a dead dog, how much more so, of a living man; and if it be a merit to praise a dead dog for the whiteness of its teeth, how much more is it a duty to find out, and praise, the least merit in an intellectual human being? But it was also the intention of this pious man to teach his pupils to habituate themselves to speaking favourably, and to the avoidance of evil speaking. For that to which one accustoms the tongue becomes its natural speech.