Local Laws and Codes