I don't have much to say on this one other than unfortunately this section of the Bible is one of those things that put off unbelievers when it comes to their impression of God and His character, due to the instances of the Isrealites being commanded to take down and destroy cities such as Jericho and Ai that are in their way. If one does not yet have a personal relationship with the Lord, then taking sections like this by themselves would naturally give them the impression that we follow a bloodthirsty God who just has us making war on and trampling anyone we find in our way, even going so far as to slay women and children who do not or cannot fight back. For me, this is a real delicate part that you need to really dig into and ask God on your own, honestly and to your satisfaction, what is His purpose here, because like many parts of Scripture, there is no doubt more going on here than meets the eye. I have heard it that pretty much every part of the OT involving the Israelites eliminating entire nations of people it is for their own good, drastic a measure as it may be, to preserve their purity such that the prophecies of a coming Messiah being descended from Israel would come true. And of course along with that, God did not want the pagan ways of foreign peoples corrupting His own, as what ends up happening many a time. If I remember correctly, there was even a part of the OT (sorry, I do not remember where or what pagan nation was being spoken of in particular) in which God seemed quite aghast to find that the Israelites had taken to worshipping a god named Molech and were actually sacrificing their own children in fire to him. It was insane.