You can't prevent it completely, but the best defense is a well armed civilian population. Criminals fear an armed, trained and prepared civilian population way more than the police. Infact the criminals count on the public relying on the police to protect them, those people make good victims....