This is from the blog Dover Beach:
"A man went into the forest to choose a tree from which to make roof-beams. And he saw two trees, one beside the other. One was smooth and tall, but had rotted away inside, and the other was rough on the outside and ugly, but its core was healthy. The man sighed, and said to himself: 'What use is this tree to me if it is rotten inside and useless for beams? The other it is rough and ugly, is at least healthy on the inside and so, if I put a bit more effort into it, I can use it for roof-beams for my house.' And, without thinking any more about it, he chose that tree.
"So will God choose between two men for His house, and will choose not the one who appears outwardly righteous, but the one whose heart is filled with God’s healthy righteousness."