Psalm 119 is the longest of the psalms and the longest chapter in the Bible. The author is unnamed; older commentators almost universally said it is a psalm of David, composed throughout his entire life. More modern commentators sometimes conclude that it was written following the exile, coming from the days of Ezra or Nehemiah. It may be that David was the author, but we can’t say this with certainty, and it is not necessary to know; if it were important, God would have preserved the name of David to this psalm. No matter who the author was, it was inspired by God (2 Timothy 3:16) and was likely written over a period of time and later compiled, because there is not a definite flow of thought from the beginning of the psalm to the end. The sections and verses are not like a chain, where one link is connected to the other, but like a string of pearls where each pearl has equal, but independent value.
Psalm 119 is arranged in an acrostic pattern. There are 22 letters in the Hebrew alphabet, and this psalm contains 22 units of 8 verses each. Each of the 22 sections is given a letter of the Hebrew alphabet, and each line in that section begins with that letter. The closest parallel to this pattern in Scripture is found in Lamentations 3, which is also divided into 22 sections, and a few other passages in the Hebrew Scriptures use an acrostic pattern. Since this is a psalm glorifying God and His word, it refers to Scripture over and over again. Psalm 119 is remarkable for how often it refers to God’s written revelation, His word. It is referred to in almost every verse. Scripture is mentioned in at least 171 of the 176 verses.