Midrash Tehillim 62, a beautiful exploration from the world of midrash (Jewish biblical interpretation), gives us some fascinating – and maybe even comforting – food for thought.

The midrash starts with the phrase, "Like his deeds," suggesting that God repays us in kind. But what does that really mean? The text explains it in a surprising way: when someone sins and deserves death, God…waits. The midrash says He waits until the person marries and has children, and then takes one of the children as atonement. It’s a harsh image, no doubt, but the midrash frames it as God "collecting from his own."

But then, it gets even more interesting. Rabbi Nehemiah offers another perspective on "like his deeds." He says that if someone thinks about sinning but doesn't actually do it, God doesn't hold it against them. But – and this is key – if they intend to do a good deed but are prevented, God credits them as if they had done it! It's a radical idea: that intention, even unrealized, counts for something in the divine ledger.

And where do we see this idea in action? The midrash points to David, the king of Israel, and his burning desire to build the Temple. Remember how David felt? Psalm 132 reminds us of his oath, his longing to create a dwelling place for God. 1 Chronicles elaborates on this, mentioning how he prepared for the house of God.

As we find in 2 Samuel, David, settled in his cedar palace, felt the stark contrast with the Ark dwelling in a simple tent. He tells Nathan the prophet his thoughts, but God then tells Nathan to tell David that he is not meant to build the Temple.

So why couldn't David build the Temple? The answer is layered and a bit complex. As 2 Samuel and 1 Chronicles both tell us through Nathan's prophecy, God tells David it won’t be him. The midrash resolves the apparent contradiction between these verses, explaining that while David wouldn't physically build the Temple, it would be called by his name, as we see in Psalm 30: "A Psalm and Song at the dedication of the house of David."

Rabbi Yehuda bar Elai adds another layer. He recounts God telling David not to fear, that his bloodshed in battle was "like that of a deer or a gazelle," meaning it was necessary and permitted. But God explains that the Israelites were destined to sin, and God would vent His anger on the Temple, saving Israel. If David built it, it would last forever, and that wouldn't be possible. In Lamentations we see this anger described.

Even though David couldn't build it, his intention, his desire to honor God, was so powerful that the Temple was still associated with him.

The midrash concludes by emphasizing that whoever intends to perform a mitzvah (a commandment or good deed) but is prevented from doing so, is credited as if they had performed it.

What does all this mean for us? It suggests a God who values intention, who understands the complexities of human life. It reminds us that even when our plans are thwarted, when we can't achieve what we set out to do, the desire, the aspiration, the pure intention itself is recognized and rewarded. It’s a comforting thought, isn't it? That our efforts, even incomplete ones, are seen and valued.