My first thought upon reading this Psalm was: here is the pride that comes before the fall. The person who is writing certainly knows what they think is right and wrong and noticeably lets us know what is acceptable and what is not. I always do find it very interesting that those who are the most outspoken on certain moral topics have some very real and visible shortcomings in the realm of morality. It is ironic that those who would speak the most forcefully have the least amount of room to speak because of their own lifestyle and their own judgment.
It is interesting that the first thing that this author points out is his loyalty to the Lord. He then goes into the areas of life that he will be sure to hunt down and eliminate. No evil shall pass in the presence of this person. I’m guessing that this psalm was written by David before his encounter with Bathsheba. Isn’t it interesting how failure humbles all of us. This is before that humbling, in my thinking.