We have here an account of David’s learning, not that of the Egyptians, but of the Israelites indeed.
I. The good method by which he got it. In his youth he minded business in the country as a shepherd; from his youth he minded business in the court and camp. Which way then could he get any great stock of learning? He tells us here how he came by it; he had it from God as the author: Thou hast made me wise. All true wisdom is from God. He had it by the word of God as the means, by his commandments and his testimonies. These are able to make us wise to salvation and to furnish the man of God for every good work. 1. These David took for his constant companions: “They are ever with me, ever in my mind, ever in my eye.” A good man, wherever he goes, carries his Bible along with him, if not in his hands, yet in his head and in his heart. 2. These he took for the delightful subject of his thoughts; they were his meditation, not only as matters of speculation for his entertainment, as scholars meditate on their notions, but as matters of concern, for his right management, as men of business think of their business, that they may do it in the best manner. 3. These he took for the commanding rules of all his actions: I keep thy precepts, that is, I make conscience of doing my duty in every thing. The best way to improve in knowledge is to abide and abound in all the instances of serious godliness; for, if any man do his will, he shall know of the doctrine of Christ, shall know more and more of it, John 7:17. The love of the truth prepares for the light of it; the pure in heart shall see God here.
II. The great eminency he attained to in it. By studying and practising God’s commandments, and making them his rule, he learnt to behave himself wisely in all his ways, 1 Sam. 18:14. 2. He outwitted his enemies; God, by these means, made him wiser to baffle and defeat their designs against him than they were to lay them. Heavenly wisdom will carry the point, at last, against carnal policy. By keeping the commandments we secure God on our side and make him our friend, and therein are certainly wiser than those that make him their enemy. By keeping the commandments we preserve in ourselves that peace and quiet of mind which our enemies would rob us of, and so are wise for ourselves, wiser than they are for themselves, for this world as well as for the other. 2. He outstripped his teachers, and had more understanding than all of them. He means either those who would have been his teachers, who blamed his conduct and undertook to prescribe to him (by keeping God’s commandments he managed his matters so that it appeared, in the event, he had taken the right measures and they had taken the wrong), or those who should have been his teachers, the priests and Levites, who sat in Moses’s chair, and whose lips ought to have kept knowledge, but who neglected the study of the law, and minded their honours and revenues, and the formalities only of their religion; and so David, who conversed much with the scriptures, by that means became more intelligent than they. Or he may mean those who had been his teachers when he was young; he built so well upon the foundation which they had laid that, with the help of his Bible, he became able to teach them, to teach them all. He was not now a babe that needed milk, but had spiritual senses exercised, Heb. 5:14. It is no reflection upon our teachers, but rather an honour to them, to improve so as really to excel them, and not to need them. By meditation we preach to ourselves, and so we come to understand more than our teachers, for we come to understand our own hearts, which they cannot. 3. He outdid the ancients, either those of his day (he was young, like Elihu, and they were very old, but his keeping God’s precepts taught more wisdom than the multitude of their years, Job 32:7, 8) or those of former days; he himself quotes the proverb of the ancients (1 Sam. 24:13), but the word of God gave him to understand things better than he could do by tradition and all the learning that was handed down from preceding ages. In short, the written word is a surer guide to heaven than all the doctors and fathers, the teachers and ancients, of the church; and the sacred writings kept, and kept to, will teach us more wisdom than all their writings.