Take SF for example where crime has seemingly spiked and there's no willingness to enforce the law /prosecute offenders.
On one hand, a version of Hammurabi's Code (to cut off the hand of thieves) is probably inappropriate. On the other, we've created an environment where there's no repercussion for breaking the law.
Personally, I find myself favoring Hammurabi's approach.
I don't believe his code specifically addressed petty theft; allow me to paint with broad strokes.