It seems like bovine stupidity to see a reason for joy in hardships! But we do well to avoid the conclusion that James would encourage to seek out trouble in order to have joy. His statement is made against the background of the unique perspective of the gospel--that God is able to forge good from adversity. It is a view made fact by Jesus Christ, who conquered the powers of evil by the cross and his resurrection.
I'm busy working on my blog posts. Watch this space!