When the Bible tells us to "submit to God," and to "resist the devil" (James 4:7), it doesn't mean we are to go out and attack the devil. The devil will do the attacking. The word "resist" is essentially a defensive word meaning "to withstand an attack."
Nor does the Bible say to "converse with the devil and he will flee from us" or to "consider all of the temptations the devil offers, then resist him, and he will flee from us." Once you start messing with sin and with the devil, it is only a matter of time before you get hooked. It is like the free samples you're offered when you walk though the store or the mall. You are given just enough to whet your appetite, but not enough to satisfy it.
The devil has been at this for a long time. He is no idiot; he will not necessarily present his full agenda. Instead, he will say, "Take just a little nibble. Just have a taste for the fun of it. It won't hurt you. Just this one little time." And you know the rest of that story. This is why the Bible tells us to resist the devil. Keep as much distance from him as possible. Flee from temptation and don't leave a forwarding address.
So where do we find the resolve and strength to resist? We need to submit to God as we resist the devil. "Submit" is a word used to describe a soldier under the authority of a commander and speaks of a willing, conscious submission to God's authority. It means to completely surrender yourself to the Word and will of God. That is your best defense.