Moshe tells Bnei Yisrael to appoint judges and officers in their cities. A bribe of even an insignificant sum is forbidden. Trees are not to be planted near Hashem's altar, as was the way of idolaters. Blemishes in animals designated for offerings and other points of disqualification are listed. The Great Sanhedrin is to make binding decisions on new situations according to Torah criteria to prevent the fragmentation of the Torah. A very learned scholar who refuses to accept the halachic decisions of the Sanhedrin incurs the death penalty. A Jewish king may only have possessions and symbols of power commensurate with the honor of his office, but not for self-aggrandizement. He is to write for himself two sifrei Torah, one to be kept with him wherever he goes, so that he doesn't become haughty. Neither the kohanim nor the levi'im are to inherit land in the Land of Israel; rather they are to be supported by the community by a system of tithes. All divination is prohibited. Hashem promises the Jewish People that He will send them prophets to guide them, and Moshe explains how a genuine prophet may be distinguished from a false one. Cities of refuge are to be provided foran accidental killer to escape the blood-avenger from the deceased's family. However, someone who kills with malice is to be handed over to the blood-avenger. Moshe cautions Bnei Yisrael not to move boundary markers to increase their property. Two witnesses who conspire to "frame" a third party are to be punished with the very same punishment that they conspired to bring upon the innocent party. A kohen is to be anointed specifically for when Israel goes to war, to instill trust in Hashem. Among those disqualified from going to war is anyone who has built a new house but not lived in it yet, or anyone who is fearful or fainthearted. An enemy must be given the chance to make peace, but if they refuse, all the males are to be killed. Fruit trees are to be preserved and not cut down during the siege. If a corpse is found between cities, the elders of the nearest city must take a heifer, slaughter it, and wash their hands over it, saying that they are not guilty of the death.
Pain and Gain
"Who is the man who has built a new house and has not yet inaugurated it? Let him go and return to his house, lest he die in the war and another man will inaugurate it." (20:5)
Rashi: "and this thing will pain him"
Rashis comment on the above verse cannot mean that the thought of someone else inaugurating his new home will be extremely painful to him. For in the painful thoughts department nothing is more painful than the thought of death itself.
The Midrash teaches that when the Romans executed Rabbi Chananya for teaching Torah in public they wrapped him in his Sefer Torah and set it alight. To prolong his agony, they packed water-soaked wool around his chest. Rabbi Chananya said, "The parchment is consumed, but the letters fly up in the air." The Roman executioner was deeply moved by Rabbi Chananyas holiness and asked, "If I remove the wool from around your heart, will I have a share in the World to Come?" Rabbi Chananya promised him that he would. The Roman then removed the wool, added wood to the fire to curtail Rabbi Chananyas agony and jumped into the flames and died. A Heavenly voice proclaimed, "Rabbi Chananya and the executioner are about to enter the World to Come." One thought of teshuva repentance can undo a life of sin.
And one thought of sin can undo a lifetime of teshuva.
The most important moment in a persons life is his last moment. At that moment he has the potential to fix a lifetimes wrongdoing. What a waste to spend that last moment immersed in the cares of this world rather than ones gaze on eternity.
Thats what Rashi means when he says "and this thing will pain him." How great will be this mans pain should he spend his last moments thinking about his real estate rather than preparing himself to enter the world of truth.