Near where my mother grew up there is a small river. The river never seemed to be in a hurry as the water just flowed slowly and quietly towards a loch at the end of a valley. As children we were always warned to keep away from the river not just because it was deep but because along the banks of the river were wide stretches of reeds — the ground looked solid but it was actually very unstable and unsafe — like a miry, miry bog that David who wrote the psalm speaks of.
The first five verses of this psalm (40) are beautiful — they are a personal testimony to what the Lord had don for David and it is a testimony that can be shared by everyone who is a Christian. The feeling of lostness and insecurity that we can experience in our spiritual wilderness is turned to joy and thankfulness — like standing on solid rock after being in the bog — when we come to know the saving goodness of Jesus Christ.
And notice how David goes on to tell what a great difference the Lord has made to his life — he is singing, singing praise to God, and the change that God has made in his life is obvious — people can see it. As a result, others too are brought to put their trust in the Lord. David just can't get over the wonderful difference God has made in his life — it's a life of miracles and he tells us just what a blessing it is to trust in the Lord.
Do you have that faith in Jesus that thrills your life and makes you sing? Ask God to take your life and set it on the solid rock of his salvation.