The treatment of criminals and potential criminals should be ultimately on the basis of preventing criminal activities in the future. Revenge for past offenses, without the future being the ultimate concern indicates to me a rather low level of consciousness. We can't change the past, and we can never get real justice for past wrongs. Punishment as an example to others is a particular injustice.
If a thief is made to pay back the cost of a stereo he took, and broke while trying to get it working, the human community is still poorer by the value of one stereo, which equals the value of the time he could have spent working on something more useful. If, on the other hand, you have so much food that some is going to spoil, and I steal some rather than go hungry, I've put it to use instead of letting it spoil, so humanity is richer. Of course it can't be left up to me, a biased person in this case, to decide the morality of such things. But "real" crimes are ultimately those against the whole human community.
Still, we need to do what's necessary to reduce the frequency of future wrongs. To the degree that, and in cases that, punishment can be shown to have a net good result, I'm for it, but I think there are usually long-term bad effects we seldom recognize. Caning, or any punishment which leaves permanent disabilities or scars, is not valid punishment. The idea is to improve the person.
I see five categories of ways we should handle crime prevention:
Education and socialization of the individual before the criminal mind develops is of course the first way, learning cooperation, the value of community etc.
When this doesn't work, we're left with four ways to treat "criminals" (keeping in mind that society must bear some of the responsibility for all crime). Depending on the level of the crime, until it's proven they have incorrigible, clearly anti-social patterns, most criminals should get one chance at each.
First, attempt to rehabilitate in normal surroundings. Non-removable personal location transmitters might be one version of this.
Second, rehabilitation while in prison, using whatever means that can be proven to work. Any person who signs for a prisoner's release must take some responsibility for his future crimes, losing his job if perhaps 10% of releases are mistakes.
Third, warehousing, in prisons which pay for their own upkeep. Since punishment is not the intention, they can be as comfortable as possible, while maintaining security. With greater regimentation than outside businesses, I think they could easily make a profit, if we can handle the idea of them competing with the rest of us.
A person who is so out of control of himself that he will commit murder if not kept in solitary confinement can perhaps still earn his keep as a writer or live on donations from those who think he should be kept alive.
"Capital therapy" (not psychotherapy) for those who can't make a positive adjustment even to prison life. Any person who's unchangeable life patterns are clearly a net burden to humanity is a candidate for elimination from same. Other residents of the prison community who must live with him should have at least some say on whether he goes or stays. It's not clear to me why he should even be notified of a death verdict. Execution should be by the most humane means available, probably giving the prisoner his choice, within reason. I'd choose laughing gas. No publicity is needed either.
It's argued that execution is an action that we can't take back if it's found later that we made a mistake. If I serve 20 years on a wrong sentence, there's no way you can give me back that time either. Appeals imply we may have made a mistake the first time. So instead, let's be more careful the first time.
Racial, class and other injustices exist in the way we use the death penalty, but they exist throughout society. They need to be dealt with throughout society, not on each separate issue.
Society seems rather schizophrenic in that we discourage suicide and go to great lengths to prevent it, even just before an execution. To me this indicates we are more concerned with revenge and don't want it stolen away from us. I think suicide should be an acceptable option for anyone and should be encouraged in proportion to a person's liability to society.
Who was it that said something like, "One thousand guilty people should go free before an innocent person is imprisoned"? In terms of preventing future suffering, that's insane.
Forget about jury trials and glorifying the crime with completely public trials. I'm certainly no expert on courtroom procedure, but how about electing say five people from the community, for a year or more, to serve as judge/jury? Then, I think a few witnesses, each given a sealed copy of a video recording of the trial, should be sufficient. If you really turn me loose you probably wouldn't recognize my version of a court.
The most viable, as well as ultimately the most caring, society is one which looks ultimately to it's own self-interest. (This also applies to people, but to many people, "self-interest" often doesn't mean much more than their desire for immediate pleasure.)