If David has lived in the court of King Saul he has seen life in the big city for the first time.  But before this service he was prepared by the anointing of God as performed by Samuel.  It may have looked like a world of evil, but David was not of the world.  He was prepared to live in the world of enemies.  The headlines may have proclaimed the victory of darkness, but David could see the Army of the Lord.

How long wilt thou forget me, O LORD? for ever? how long wilt thou hide thy face from me?  How long shall I take counsel in my soul, having sorrow in my heart daily? how long shall mine enemy be exalted over me?  Consider and hear me, O LORD my God: lighten mine eyes, lest I sleep the sleep of death; Lest mine enemy say, I have prevailed against him; and those that trouble me rejoice when I am moved.  But I have trusted in thy mercy; my heart shall rejoice in thy salvation.  I will sing unto the LORD, because he hath dealt bountifully with me.  Psalm 13:1-6

David could ask for help in a troubled world and remember his trust in God.  He could sing because he had history with God for assurance.  He sang because it brought spiritual warfare to shine light against the darkness.  It illuminated the works of darkness to reveal their weakness.  Anointed music is the weapon of the spiritual realm, and Israel needed this weapon as much as Saul did.

The fool hath said in his heart, There is no God. They are corrupt, they have done abominable works, there is none that doeth good.  The LORD looked down from heaven upon the children of men, to see if there were any that did understand, and seek God.  They are all gone aside, they are all together become filthy: there is none that doeth good, no, not one.  Have all the workers of iniquity no knowledge? who eat up my people as they eat bread, and call not upon the LORD.  There were they in great fear: for God is in the generation of the righteous.  Ye have shamed the counsel of the poor, because the LORD is his refuge.  Oh that the salvation of Israel were come out of Zion! when the LORD bringeth back the captivity of his people, Jacob shall rejoice, and Israel shall be glad.  Psalm 14: 1-7

David must have seen some unbelief in the court of the king.  Samuel had mourned for the backsliding King Saul.  David was anointed and probably had the same awareness of the weakness of Israel.  He even envisions Israel in captivity, needing deliverance from God.  The captivity and return of Israel would fulfill this prophesy long after David’s time.  David wonders who will have real faith for salvation.

Lord, who shall abide in thy tabernacle? who shall dwell in thy holy hill?  He that walketh uprightly, and worketh righteousness, and speaketh the truth in his heart.  He that backbiteth not with his tongue, nor doeth evil to his neighbour, nor taketh up a reproach against his neighbour.  In whose eyes a vile person is contemned; but he honoureth them that fear the LORD. He that sweareth to his own hurt, and changeth not.   He that putteth not out his money to usury, nor taketh reward against the innocent. He that doeth these things shall never be moved.  Psalm 15:1-5

At this camp the King lives, and the Tabernacle is the house of worship.  Yet David wonders who will actually walk with God.  Those who are righteous and who avoid gossip and hate evil will be unmovable.  Those who do not cheat those who borrow from them will live.  There must have been some who did not have the courage to walk uprightly in the city.

Preserve me, O God: for in thee do I put my trust.  O my soul, thou hast said unto the LORD, Thou art my Lord: my goodness extendeth not to thee;  But to the saints that are in the earth, and to the excellent, in whom is all my delight.  Their sorrows shall be multiplied that hasten after another god: their drink offerings of blood will I not offer, nor take up their names into my lips.  The LORD is the portion of mine inheritance and of my cup: thou maintainest my lot.  The lines are fallen unto me in pleasant places; yea, I have a goodly heritage.  I will bless the LORD, who hath given me counsel: my reins also instruct me in the night seasons.  I have set the LORD always before me: because he is at my right hand, I shall not be moved.  Therefore my heart is glad, and my glory rejoiceth: my flesh also shall rest in hope.  For thou wilt not leave my soul in hell; neither wilt thou suffer thine Holy One to see corruption.  Thou wilt shew me the path of life: in thy presence is fulness of joy; at thy right hand there are pleasures for evermore. Psalm 16:1-11

Preserve me God; David sang about his need and his hope.  If there was trouble in the land King Saul heard peace against the threats of men in David’s Psalms.  The good men provoke joy while the evil are dragged down by their false gods.  Today we still have men meeting in secret fraternities hoping to build a world empire even as armies were gathering against Saul’s Israel.  But David did not waste his time on the vanity of rituals when the living God was available to him.  The Lord inspired his songs with glimpses of the prophetic future of Israel’s Messiah.  By putting God first, David allowed no distractions or fears to dilute his hope.

Hear the right, O LORD, attend unto my cry, give ear unto my prayer, that goeth not out of feigned lips.  Let my sentence come forth from thy presence; let thine eyes behold the things that are equal.  Thou hast proved mine heart; thou hast visited me in the night; thou hast tried me, and shalt find nothing; I am purposed that my mouth shall not transgress.  Concerning the works of men, by the word of thy lips I have kept me from the paths of the destroyer.  Hold up my goings in thy paths, that my footsteps slip not.  I have called upon thee, for thou wilt hear me, O God: incline thine ear unto me, and hear my speech.  Shew thy marvellous lovingkindness, O thou that savest by thy right hand them which put their trust in thee from those that rise up against them.  Keep me as the apple of the eye, hide me under the shadow of thy wings,  From the wicked that oppress me, from my deadly enemies, who compass me about.  Psalm 17: 1-9

David cries out for God to hear the prayer of the righteous.  Saul needs this hope against real enemies and against his own paranoia.  David spells out the spiritual warfare that Israel will need in the near future.  Their enemies are real and ready.

They are inclosed in their own fat: with their mouth they speak proudly.  They have now compassed us in our steps: they have set their eyes bowing down to the earth;  Like as a lion that is greedy of his prey, and as it were a young lion lurking in secret places.  Arise, O LORD, disappoint him, cast him down: deliver my soul from the wicked, which is thy sword:  From men which are thy hand, O LORD, from men of the world, which have their portion in this life, and whose belly thou fillest with thy hid treasure: they are full of children, and leave the rest of their substance to their babes.  As for me, I will behold thy face in righteousness: I shall be satisfied, when I awake, with thy likeness. Psalm 17: 10-15

Enemies were real and gathering around the camp of Israel.  They had the pride and roaring of words as young lions.  David asks God to arise and throw down their enemies who prosper in this world.  David will be satisfied with the rewards of eternal life, to become as one with God.  David has the opportunity to prepare his king with the spiritual warfare he will need to lead Israel.  He is an exemplary trainer in this weaponry.