In Psalm 119:67 and 71 it says,
Before I was afflicted I went astray,
But now I keep Your word…
71 It is good for me that I have been afflicted,
That I may learn Your statutes.
I’m not sure exactly what the Psalmist was referring to, but for me it has plenty of application to my old age. Every morning I get up reeking with arthritis pain, and it takes me a while to get going. And I also find that every little thing I do is more worrisome. These pains and problems tend to drive me more to God in prayer and in the word. I seek Him more now than ever before. So, I conclude with the Palmist that affliction is good for me; it keeps me in line with Him, seeking His will.