As a deterrant - prison population is increasing. Rate of re-offending is high - so obviously not a success.
This doesn't follow, since you don't know how many crimes would have been committed but for the threat of prison.

You are clearly right on rehab though. This needs some serious thought. In my completely uninformed opinion, rehab that focuses on skillls isn't really goign to work. I don't believe anyone commits crimes because they didn't pass their maths GSCE or haven't got a level 3 NVQ in motorcycle maintenance. After all, opportunities to take those exams exist outside prison. IMHO people commit crimes because they have poor organisational skills, so can't hold a job or a training course down, or poor impulse control, so they can't resist a punch up. and because they have the opportunity and the downside isn't that bad (in the UK anyway, where repeated anal rape is not a major part of the prison experience).

I wonder whether, with no disrespect to JASG, a lot of the talk about rehab is cobblers, and what is really needed is to up the detection rate and speed of processing therough the courts. I suspect a lot of criminals are perfectly capable of making fairly rational choices, and if it was more or less guaranteed that every mugging would be followed by an arrest within 48 hours, sentence within a week, and a mere two weeks behind bars, then release and repeat as necessary, pretty soon they would get the message.

Whereas allowing people a run of months or years at muggings, eventually catching them, taking six months to bring it to trial (during which they do mor muggings, after all those are effectively free since you can have them dealt with at the trial as TICs), then sending them down for a year, sends no sort of message.