Since this is a building code area, I thought I would post the earliest building code that I am aware of, which is the code of Hamurabi, circa 1780 BC
229 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.
230. If it kill the son of the owner the son of that builder shall be put to death.
231. If it kill a slave of the owner, then he shall pay slave for slave to the owner of the house.
232. 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.
233. If a builder build a house for some one, even though he has not yet completed it; if then the walls seem toppling, the builder must make the walls solid from his own means.
Just read them all... facinating! http://democraciaparticipativa.net/documentos/Hamurabi'sCode.html A lot of amputating and death going on there! Some of the early medical malpractice stuff was heavy duty.
Mark Heller "Well - I oughta....." -Jackie Gleason
When I reflect on the amount of jury-rigging that occurs as people try to avoid necessary upgrades, sometimes I think we should make our homes from gingerbread- then we'd have to replace them every few years!