The first words of the psalm seem at first sight incongruous with its contents, which are singularly devoid of praise. But they are not meant to refer to the psalm, but declare the singer's purpose for his whole life. If the speaker is a real character, he is a poet-king. Of whom is that singular combination of royalty and minstrelsy so true as of David? If the speaker is an ideal, is it not peculiar that the first qualification of the ideal king should be that he is a poet? The suggestion that "loving-kindness and judgment" are here the monarch's virtues, not Divine attributes, is negatived by usage and by the following clause, "To Thee, _Jehovah_, will I sing." But it is as a king that the psalmist vows to praise these twin characteristics of the Divine rule; and his song is to be accompanied by melodious deeds, which shape themselves after that pattern for rulers and all men. Earthly power is then strongest when, like God's, it is informed by loving-kindness and based on righteousness. In this connection, it is significant that this psalm, describing what a king should be, has been placed immediately after the series which tells who the true King of Israel and the world is, in whom these same attributes are ever linked together.
Vv. 2-4 outline the king's resolves for himself. With noble self-control, this ruler of men sets before himself the narrow, thorny way of perfectness, not the broad, flowery road of indulgence. He owns a law above himself and a far-off goal of moral completeness, which, he humbly feels, is yet unattained, but which he vows will never be hidden from his undazzled eyes, by the glitter of lower earthly good, or the rank mists of sensual pleasures. He had abundant facilities for reaching lower aims, but he turns from these to "give heed" to the way of perfectness. That resolve must be clearly and strongly made by every man, prince or peasant, who would attain to the dominion over self and externals, which is man's true royalty.
The suddenly interjected question of longing, "When wilt Thou come to me?" is best explained by connecting it with David's desire that the Ark should be permanently domiciled in Jerusalem--a desire which was checked by his reflections on his own unworthiness (2 Sam. vi. 9). Now he feels that, on the one hand, his whole-hearted desire after righteousness makes him capable of receiving such a guest; and that, on the other, his firmest resolves will be evanescent, without God's presence to confirm his wavering and to help him to make his resolves into acts. He longed for that "coming" of the symbol of God's dwelling with men, not with heathenish desire to have it as a magic-working charm against outward foes, but as helping his faith to grasp the fact that God was with him, as his ally in the nobler fight against his own baseness and his position's temptations. We dare not ask God to come to us, unless we are conscious of desire to be pure; we cannot hope to realise that desire, unless He is with us. So, the natural sequel of determination to give heed to the way of perfectness is petition to Him, to come very near and take up His abode with us.
After this most significant interruption, the stream of resolutions runs on again. In the comparative privacy of his house, he will "walk with a perfect heart," ever seeking to translate his convictions of right into practice, and regulating his activities by conscience. The recesses of an Eastern palace were often foul with lust, and hid extravagances of caprice and self-indulgence; but this ruler will behave there as one who has Jehovah for a guest. The language of ver. 3 is very energetic. "Any villainous thing" is literally "a thing of Belial"; "the doing of transgressions" is literally "doing deeds that turn aside", _i.e._ from the course prescribed. He will not take the former as models for imitation or objects of desire. The latter kindle wholesome hatred; and if ever he is tempted to dally with sin, he will shake it off, as a venomous reptile that has fastened on him. "A perfect heart" will expel "a perverse heart," but neither will the one be gained nor the other banished without vehement and persistent effort. This man does not trust the improvement of his character to chance or expect it to come of itself. He means to bend his strength to effect it. He cannot but "know evil," in the sense of being aware of it and conscious of its seductions; but he will _not_ "know" it, in the sense of letting it into his inner nature, or with the knowledge which is experience and love.