Of course it can be said of jails, too, that they try - by punishing the troublesome - to deter others. No doubt, in certain instances this deterrence actually works. But generally speaking it fails conspicuously.
I'm named after a horse. My mom's best friend had a horse named Brooke, so my dad suggested 'Brooklyn' as a more formal version, and it just stuck - and now I live in Brooklyn part-time, so go figure.
Life is a corrupting process from the time a child learns to play his mother off against his father in the politics of when to go to bed; he who fears corruption fears life.

