So I disagree with your analogy with the Hammurabi laws. I looked up the text:
"If a builder build a house for some one, and does not construct it properly, and the house which he built fall in and kill its owner, then that builder shall be put to death."
"[...] If it ruin goods, he shall make compensation for all that has been ruined, and inasmuch as he did not construct properly this house which he built and it fell, he shall re-erect the house from his own means."
http://www.fordham.edu/halsall/ancient/hamcode.html
It actually doesn't contain anything like a building code -- no regulation for how to build houses, what materials and methods can be used, what standards should be met. It is only tort: how you construct a building, government does not care, but it will hold you liable if it fails. This is a solidly "libertarian" type of law: uphold property rights, but do not intervene otherwise, and do not tell people how to do things.