( Related Posting: Was the use of a measuring line literal or symbolic in 2 Samuel 8:2?
David can be seen as a warrior-King chosen by God to lead Israel.
In 2 Samuel 8, we see David bringing judgement upon the enemies of Israel in a playful arbitrary manner like a vigilante does in comic books.
2 Samuel 8:1-3
Now after this it came about that David [a]defeated the Philistines and subdued them; and David took control of the chief city from the hand of the Philistines.
2 He defeated Moab, and measured them with the line, making them lie down on the ground; and he measured two lines to put to death and one full line to keep alive. And the Moabites became servants to David, bringing tribute.
3 Then David [d]defeated Hadadezer, the son of Rehob king of Zobah, as he went to restore his rule at the [f]River.......
Psalm 109 which is well-known for it's imprecatory nature was either directly/indirectly authored by David himself. Psalm 109's verses are very aggressively judgemental and cursing in nature:
Let his children be fatherless And his wife a widow.
Let the creditor seize all that he has, And let strangers plunder the product of his labor.
David declares judgment upon the Amalekite who (despite falsely) claiming that he himself killed Saul
13 David said to the young man who told him, “Where are you from?” And he [d]answered, “I am the son of an alien, an Amalekite.” 14 Then David said to him, “How is it you were not afraid to stretch out your hand to destroy the Lord’s anointed?” 15 And David called one of the young men and said, “Go, [e]cut him down.” So he struck him and he died. 16 David said to him, “Your blood is on your head, for your mouth has testified against you, saying, ‘I have killed the Lord’s anointed.’”
Here is the irony, David even at first unknowingly declares judgment upon himself after Nathan talks about the Traveller's parable to David:
(2 Samuel 12:5-6)
5 Then David’s anger burned greatly against the man, and he said to Nathan, “As the Lord lives, surely the man who has done this [a]deserves to die. 6 He must make restitution for the lamb fourfold, because he did this thing and had no compassion.”
What are the Dangers of the Judgemental side of David's life in the Bible?