There is a problem in most jail systems throughout the world, over-crowding, re-offending, drug addiction and violence. What can be done about it? Here's a thought how about instead of sentencing people to jail time why not sentence them to education. What if the judge sentence offenders to study and pass a suitable course, they could be released as soon as they have successfully passed the course and not before. In many instances there need not be time spent in jail but just reporting to an education centre 5 days a week. The course should be designed/chosen to most fit the individual, in some instances where the person is illiterate then a simple literacy and numeracy course would be enough because if society leaves people without a basic education then society should take some of the blame.
In many cases of revolt against society/community it is because people do not feel they have anything to offer society so the feel outside of or cast out of society, giving people an education will enhance their self esteem and change there world view. Of course there are educated villains but I would argue that their eduction is not so rounded as it should be. I am not saying that this would work for everyone. There are those who have a dysfunctional coping mechanism but I think this too can be address by teaching new and enhancing coping mechanisms, again if someone has been raised with a dysfunctional coping mechanism, be it escape in to drugs and or alcohol or turning to violence then maybe society should be shouldering some of the blame for this also.