According to Rashi, some people agonise when faced with the decision whether or not to give to the needy; therefore he says that we are specifically told “you shall not harden your heart”, in order to direct us towards giving.
Explaining the second part of the sentence, he says that some people stretch out their hand to give, but then close it; therefore the text says: “nor close your hand”.
How many of us go through that split-second indecision while walking down the street: to give or not to give? As we pass the guy on the street selling the Big Issue and deliberate “should I, shouldn’t I”? Or have questioned the honesty of the girl in the street when she tells us she needs some money for her bus fare home, or to feed her hungry children.
Interestingly the Shulchan Aruch states that if someone says “feed me”, we do not investigate the truth of their claim to be in need, we feed the person immediately.
The Torah is very clear about the importance of tzedakah, obligatory charitable giving, and the concept is developed in later literature where commentators tell us how much we are obligated to give: a tenth of one’s income is average according to the Shulchan Aruch, anything less is stinginess. Failure to perform this mitzvah is likened to committing adultery (Talmud: Ketubot 68a).
The Talmud also teaches that tzedakah is equal in importance to all other commandments (Baba Batra 9a).
Unusually, tradition not only teaches us what the mitzvah of tzedakah is, but also teaches us the attitude with which we should perform the mitzvah: with openness and generosity, an open heart and an outstretched arm.