Deuteronomy

Deuteronomy is the fifth book of the Bible, preceded by Numbers and followed by Joshua. It begins the history of the Hebrews' residence in Israel, a story continued in the books of Joshua, Judges, 1 and 2 Samuel, and 1 and 2 Kings.

Summary
Deuteronomy begins by telling of the Hebrews' conquest of various cities and towns in the area of the promised land. The final chapters concern the covenant with God, wherein God promises the Hebrews the land of Israel in return for their loyalty and obedience to him. The book ends with the death of Moses.

The bulk of the book is a compendium of laws, similar to those in Leviticus. These include the Ten Commandments and dietary laws. Many of the laws listed are unjustifiably cruel. For example, rape victims are required to marry the rapist. 

Some of these laws include punishment for specific crimes, as well as rules for food consumption. For instance, shrimp, clam, and oyster are unclean, and should not be consumed. Deuteronomy 14:9-10 says: "9 These ye shall eat of all that are in the waters: all that have fins and scales shall ye eat: 10 And whatsoever hath not fins and scales ye may not eat; it is unclean unto you." Also referred to in Leviticus 11:9-12.

is notable for containing an extremely long and violent curse, in which God threatens to do all manner of cruel and unusual things to the disobedient, including starving women until they begin to hoard their own children in order to eat them.

Origin
Deuteronomy is believed to have been written during the reign of king Josiah of Judea (640-609 BCE) by an author referred to as Dtr1. It is written in a later stage of Hebrew than other books of the Torah, and contains many references to Josiah.

A second author, Dtr2, made several additions and produced the second edition of Deuteronomy...after the fall of Israel.

The code of laws comes from a much earlier source by an author known as Dtr, and was inserted into the body of the book by Dtr1.

Immoral Warfare
Deuteronomy 20 covers a description of the method of warfare that modern day man would call genocide. It begins with a perceived moral practice of offering terms of peace (one may infer however that the terms of peace would result in the slavery of all the people surrendering, or forced conversion), however if they refuse the agreement, the Israelites are commanded by God to subdue the military forces and round up all the people, executing every male, and enslaving every woman or child (assuming they allow them to live; Deut. 20:14 seems to say that it is up to the Israelites to decide whether to cleanse the population or enslave them). The enslavement of the women also may have acted as a stumbling block to the Israelites (something Jesus directly condemns later in Matthew 18) to commit rape. Later in Deut. 20:17-18, God directly commits various nations to genocide based on their beliefs, making the Jews no better than the Nazi extermination squads that killed them thousands of years later, and God no better than Hitler who ordered the killings.