I know from my own experience that praise is not naturally the first thing out of my mouth when I walk through difficulties (this is done through the strength of the Holy Spirit). But here, David is praising God before he even speaks of his difficulty. How can this be? Well, to me it seems like David knew who is Savior was. And not just knew like in the far off sense of so many today, but he KNEW his God intimately. And, then I asked myself...how did David know God intimately? One of the major ways was through his trials. Ironic, right? He had experienced God's strong hand of provision and salvation before, so he had no reason to doubt it now. David knew his savior was strong because God had proved himself through the trails he had allowed David to go through. I am sure that David would not have known many of the characteristics of God had he not gone through those times of difficulty. Is it not the same in our lives? How often have I been angry when I have gone though times of hardships, asking how God can allow this to happen? But, is it not the loving design of a wise Heavenly Father? He knows that he is the answer to all my soul's longings, and he knows the best means to teach me so. I would never know that God is powerful, sustaining, loving, forgiving, if He had not proved it to me. And for us who are bent towards sin, often it takes affliction to teach us these things. So, may I in my next state of affliction turn a heart of trusting hope in my God. Knowing that He is wise and knows what is for my good. And he will see me through to the end. Below is an excerpt from C. H. Spurgeon's Cheque Book of the Bank of Faith (p. 241). He sums up the sweetness of affliction so well.
'I have chosen thee in the furnace of affliction' (Isaiah 48:10)
This has long been the motto fixed before our eyes upon the wall of our bed-chamber, and in many ways it has also been written on our heart. It is no mean thing to be chosen of God. God's choice makes chosen men choice men. Better to be the elect of God than the elect of a whole nation. So eminent is this privilege, that whatever drawback may be joined to it we joyfully accept it, even as the Jew ate the bitter herbs for the sake of the Paschal Lamb. We choose the furnace, since God chooses us in it.
We are chosen as an afflicted people, and not as a prosperous people, chosen not in the palace, but in the furnace. In the furnace beauty is marred, fashion is destroyed, strength is melted, glory is consumed, and yet here eternal love reveals its secrets, and declares its choice. So has it been in our case. In times of severest trial God has made to us our calling and election plain, and we have made it sure: then we have chosen the Lord to be our God, and he has shown that we are assuredly his chosen. Therefore, if today the furnace be heated seven times hotter, we will not dread it, for the glorious Son of God will walk with us amid the glowing coals.