From Protest to Praise

Something changed with Habakkuk between chapters 1-2. He goes from questioning God to singing about Him. He moves from a desire to respond to God's answer to waiting and trusting God in the shadow of great calamity. What changed? What can we learn from this?