In Parshat Vayeshev, we read about the story of Yosef which bears some resemblance the story of David.
Rav Amnon Bazak points out many similarities and differences in the stories of Yosef and David including:
Both Yosef and David are shepherds, both are sent by their fathers to see how their older brothers are doing, both become leaders and marry into kingship.
Both are called “navon”, wise:
Breisheet 41:39: “And Pharaoh said to Yosef: ‘since God has shown you all of this, there is none as discreet and wise as you.’”
Shmuel I 16:18: “Then answered one of the servants, and said, ‘Behold, I have seen (David) a son of Yishai the Beit Halachmit, that knows how to play, and a fine warrior, and a man of war, and wise in speech, and a comely person and God is with him.’”
Yosef and David are the only men who are called “yafeh mareh”, good looking:
Breisheet 39:6: “And Yosef was well-built and good looking.”
Shmuel I 17:42: “And when the Plishti (Goliath) looked about, and saw David, he disdained him: for he was but a youth though ruddy and good looking.”
We also see some differences:
Yosef brought bad reports about his brothers, told them his dreams and caused them to be jealous of him by wearing the Ktonet Pasim (special striped coat). In contrast, David did not fight with his brothers.
At first (Breisheet, Chaper 37), Yosef is arrogant and doesn’t use God’s name, while later (39:9), we see him do Tshuva (repent) as he says to Potiphar’s wife: “How can I do such a great evil and sin against God?”
David on the other hand gives God credit in his fight against Goliath and shows strong emuna (faith) throughout. As we see in Shmuel I 17:45-46:
Then David said to the Plishti (Goliath): “You come to me with a sword, and with a spear, and with a javelin: but I come to you in the name of the Lord of Hosts, the God of the armies of Yisrael, whom you have taunted. This day will God deliver you into my hand; and I will smite you, and take your head from you…”
David’s modesty and outward recognition of God can be looked at as a tikun (correction) for Yosef’s original self centered behavior.
We learn from both Yosef and David the importance of humble and modest leaders. Right now in Israel, we are going into another round of elections due to the fact that nobody wants to give an inch. We need strong leaders who can learn from both King David who was born humble and kept his humility throughout his kingship and Yosef who started out as haughty but quickly learned that humility and acknowledgement of God will take him a lot further. If we are ever going to get out of this mess, our leaders must learn from their mistakes in the past and gain inspiration from the good leaders who have led the Jewish people throughout history.