A teaching of Jesus' during The Sermon on the Mount

Jesus tells us "Judge not, lest ye be Judged"

I find it easy to see the wisdom in this. Why spend your time picking holes in another's way of life when you're own is obviously deficient.

It's easy to be overwhelmed by all these messages from Christianity that you must improve. You have to take them in the spirit that Jesus meant them: You are loved, and Jesus wants the best for you, He wants you to be happy.

The next teaching is something I find to be contradictory with previous teachings from Jesus: "Do not throw pearls in front of pigs". Essentially going back on "love your enemy" and "do unto others as you would have them do unto you". Why should you give up on others? At what point should you stop treating a "pig" well and start ignoring them?