The Code of Hammurabi was developed by the Babylonian ruler, Hammburabi. He ruled Babylon, which he expanded to cover most of Mesopotamia, from 1792-1750 BCE. Laws, judgements, and decrees were incorporated into the 282 laws that make up the code. The code was given to Hammurabi by the sun God, Shamash.