To exacting a full measure punishment for doing something truly repugnant sets an example to others to not repeat.
They say the death penalty does not deter crime. I believe the quick use of the death penalty as opposed to languishing on death row for decades does deter some, I admit some not all, from doing premeditated murders not part of a killer for hire conspiracy. Perhaps doing them in public would make them more of a deterrence too.
Prison should be a deterrent. Solitary confinement: darkness in a sound-proof concrete cell should be the housing arrangements for all felons. Those who don't go insane will rue the days for the rest of their lives that they committed a crime.
The word will spread through the criminal underground and crime will drop like a rock.