As we submit our life to God, He has the opportunity to build solid character in us. But this takes time. Don’t be disheartened by your sin as it inevitably comes. Let your failures drive you to God, and He will use them to strengthen your resolve to live for Him. Each time you say no to sin, it makes it a little easier to say no the next time.
It’s like a cup of coffee. If you refill your cup with a shot of espresso each time you drink a little, it keeps getting stronger. But if instead you add some water each time the coffee will become completely diluted. So it is with sin. As we resist sin, we set the stage for future victory. Still, even that in itself is not enough. Sin is primarily a heart issue. Real freedom comes only by pursuing intimacy with Jesus.
From Free from the Power of Sin: the Keys to Growing in God in Spite of Yourself