We notice a distinct change of focus in the verses today. After the previous part, which is full of weariness and frustration in waiting for God to answer, David decided to think positively about what God can do, had already done, and His faithfulness in the past.
David was looking for, and praying for help in whatever situation he was suffering from or struggling with at the time, and as it is with all of us. He was getting impatient, beginning to panic and yet trying to trust the Lord for the solution of divine intervention.
All of us have had periods in our life when we experienced irritation, anger, and frustration because of something somebody else did or said. David did too, and it seems as though he is cursing those who have hurt him, calling them arrogant, and praying for God to shame them.
We do not know what the affliction is that David was suffering from, but we can imagine that he recovered from that affliction, because he had a long adventurous life. It is interesting that he treated the affliction, whatever it was, as a gift from his Heavenly Father.
David recognised early that God had a plan for his life. He must have spent hours watching sheep and talking to his Heavenly Father. He learned a lot by supervising the flocks, seeing them give birth to the next generation, caring for the lambs and keeping them safe from predators.
There is a time in the life of most individuals when they reach a point where they recognise that God is good. Some people then go the way of David and want to learn directly from Him. But others run further away because of their guilt and shame.
Our sins still displease The Lord today, but we can always confess to Him anything we have done wrong and we can receive the forgiveness that He gained for us on the cross, where, once and for all, Jesus took ALL our guilt and shame.
As David watched the sheep at night, he had plenty of time to think pray, reflect and write psalms. What a blessing that time must have been for him. Developing his relationship with God in those days was great preparation for the adult life God had prepared for him!
If we seek His face, then we are really looking for a closer relationship with our Maker. We want to be close, and hear what His thoughts are, to find His solutions to whatever problems we are facing personally as well as the world situation.
We can imagine David understanding the laws of God well, having spent so much time developing his relationship with the Creator, who is always more ready to talk to us than we are to Him. David would see the practical applications of the Ten Commandments all around him.