"To David, blessed be the Lord my rock, etc. Solomon said (Proverbs 3:6) 'In all your ways acknowledge him'. What is 'In all your ways acknowledge him'? It means that He should be in your heart in every way that you go, just as David used to do. He was a king and said, 'I am not a king, He is the king and He made me a king.'
And so it says (2 Samuel 5:12) 'And David knew that the Lord had established him as king over Israel.' He was strong and said, 'I am not strong.' He was rich and said, 'I am not rich.' And so he proclaimed (1 Chronicles 29:11) 'Yours, O Lord, is the greatness and the power, etc.' And so it says (2 Samuel 8:15) 'David administered justice and righteousness to all his people.'
He went down to war and triumphed and said, 'It was not by my strength that I triumphed, but He helped me and gave me victory and made me a warrior.' And so it says (Psalm 18:33) 'The God who arms me with strength'. Therefore he said, 'Blessed be the Lord my rock, etc.'" "When I learned to fight with my fingers was when I killed Goliath. As it says in 1 Samuel 17:49, 'And David put his hand in his bag and took out a stone and slung it.'
This is the way someone who strikes another from the front does not need to make them fall backwards, but rather, forwards, and why did he fall in front of him? An angel went with the stone and intentionally threw it at his face, and not only that, but he had a copper helmet on his head, and how did the stone sink into the copper? But God was with him, therefore it is said, 'Blessed be the Lord my Rock.'
I did not know how to fight except that the Holy One, blessed be He, taught me, and so Saul says to him in 1 Samuel 17:37, 'Go, and may the Lord be with you.' And as it says in Judges 6:12, 'The Lord is with you, mighty warrior.' And it says in Psalm 119:12, 'Blessed are You, O Lord; teach me Your statutes.' I know nothing except that which I have been taught.
As it says in Psalm 71:17-18, 'O God, You have taught me from my youth...Even when I am old and gray, O God, do not abandon me.' Therefore, it is said, 'Blessed be the Lord my Rock.'"