The Imitation of Christ, by Thomas a Kempis, tr. by William Benham [1886], at sacred-texts.com
Open not thine heart to every man, but deal with one who is wise and feareth God. Be seldom with the young and with strangers. Be not a flatterer of the rich; nor willingly seek the society of the great. Let thy company be the humble and the simple, the devout and the gentle, and let thy discourse be concerning things which edify. Be not familiar with any woman, but commend all good women alike unto God. Choose for thy companions God and His Angels only, and flee from the notice of men.
2. We must love all men, but not make close companions of all. It sometimes falleth out that one who is unknown to us is highly regarded through good report of him, whose actual person is nevertheless unpleasing to those who behold it. We sometimes think to please others by our intimacy, and forthwith displease them the more by the faultiness of character which they perceive in us.