it's unwritten rules of conduct, ethics and ideologies held by the prisoners themselves. the policies can differ for each prison and gang. but, they do share some of the basic values. like, they don't tolerate pedophiles, rapists, homosexuality, and informants. to do so, would put the person in direct violation. part of the prisoner's regulation would be to punish or kill the violator. prison politics can go very deep depending upon where and who you do your "time" with. these are just some of the basic codes shared among almost all inmates.
someone who's institutionalized, tend to apply the "prison code" out on the streets. it takes them time to adjust to 'free' world.
when a person gets caught do something illegal by the police,
the code is always “Never Rat”, “Never Snitch”, but after they
wind up in jail for like a few hours, this Street Code
becomes the Prison Code (Jail Code), Which is
“EVERY MAN FOR HIMSELF”