The worst thing you could do is put a first-time offender in a prison. Congratulations, you've taken a possibly reformable person, and thrown them into an environment where they need to affiliate with one of the gangs to avoid being shanked or extorted. In the meantime, they go through a networking and educational program to give them the skills and connections to be a criminal. Then, when they do get released and go back out into the world, they are effectively blocked from most avenues of legitimate work, left with severely restricted rights, and are put on restrictive probationary regimes that seem designed to put them back behind bars.
Some days, I wonder if we wouldn't be better off just giving people ten lashes or some other minor, non-permanent corporeal punishment for minor offenses.