David
Psalm 119:71ESV·traditional attribution

It is good for me that I was afflicted, that I might learn your statutes.

John Calvin Reformed @genevareformer

PSALM 119 As this psalm treats of various matters, it is difficult to give an epitome of its contents. There are, however, two things which the prophet mainly aims at; the exhorting of the children of God to follow godliness and a holy life; and the prescribing of the rule, and pointing out the form of the true worship of God, so that the faithful...

Commenting on Psalm 119:1-176

Matthew Henry Presbyterian @wholebiblehenry

See here, 1. That it has been the lot of the best saints to be afflicted. The proud and the wicked lived in pomp and pleasure, while David, though he kept close to God and his duty, was still in affliction. Waters of a full cup are wrung out to God's people, Psa 73:10. 2. That it has been the advantage of God's people to be afflicted.

John Gill Reformed Baptist @doctorgill

I know, O Lord, that thy judgments are right,.... His word, the doctrines and precepts of it, they are all consistent with the holiness and righteousness of God; and so are his judgments on wicked men, they are righteous, just, and true: God is righteous in all his ways, there is no unrighteousness in any dispensation of his; and such are his corrections of his...