From my latest fortune cookie:
You can make the best of a bad situation – they make diamonds out of coal.
James said it a little different:
Consider it a sheer gift, friends, when tests and challenges come at you from all sides. You know that under pressure, your faith-life is forced into the open and shows its true colors. So don’t try to get out of anything prematurely. Let it do its work so you become mature and well-developed, not deficient in any way. James 1:2-4 from The Messsage