Vindicate me, O Lord,
    for I have walked in my integrity,
    and I have trusted in the Lord without wavering.
Prove me, O Lord, and try me;
    test my heart and my mind.
For your steadfast love is before my eyes,
    and I walk in your faithfulness.

I do not sit with men of falsehood,
    nor do I consort with hypocrites.
I hate the assembly of evildoers,
    and I will not sit with the wicked.

I wash my hands in innocence
    and go around your altar, O Lord,
proclaiming thanksgiving aloud,
    and telling all your wondrous deeds.

O Lord, I love the habitation of your house
    and the place where your glory dwells.
Do not sweep my soul away with sinners,
    nor my life with bloodthirsty men,
in whose hands are evil devices,
    and whose right hands are full of bribes.

But as for me, I shall walk in my integrity;
    redeem me, and be gracious to me.
My foot stands on level ground;
    in the great assembly I will bless the Lord.

These words of King David are spoken with thanksgiving and humility, not boastful hubris. What David is speaking of is the expectation of the godly. The expectation is that the life of holiness, the life of one separated unto the Lord, is in itself rewarding. The holy life is better than the life of sin. Those who live lives of sin, immorality, and evil will suffer the consequences of their evil both in this life as well as eternity. They are dead in their trespasses and sins and don’t even know it. How sad, for their punishment is just being who they are.

David is not gloating about their doom, but admitting that he is weak and easy prey for temptation. That is why he stays away from the company of evil people. He does not want to be corrupted by adopting their ways nor does he want to suffer their punishment. 

The lesson for us is that no matter how strong we think we are, evil company will corrupt us and lead us astray. This would include in indulging in the ways and values of our culture and society, especially as proclaimed by the various media. When we delight in what the world values and exalts, we dishonor the Lord.

So, instead of immersing ourselves in worldliness, we should cultivate the fellowship of the saints in the church for our mutual edification. Then we will not be drawn in by their licentious behavior and idolatry. Then we will be better equipped to live among the worldly and testify to them of the gospel of salvation in Jesus alone.