Not long before, David had been under so much stress that he had what could be described as a nervous breakdown. To those around him, he appeared to have gone mad. Although he composed Psalm 34 while he was no longer in danger, he was still forced to hide from the harassment of King Saul. Despite his circumstances, he affirms that he would praise God continually, and not just in times of prosperity.
1 I will bless the LORD at all times; his praise shall continually be in my mouth.