Punishment that is overly severe is unjust, and punishment that is not severe enough will not deter criminals from engaging in criminal acts. The punishment should also be swift (celerity). Punishment should occur immediately after the criminal action occurs. According to Beccaria if punishment is certain, severe, and swift, a reasonable person will measure the gains and losses before engaging in crime. They will be deterred from violating the law if the loss outweigh the gain. Beccaria identifies certainty as the most effective deterrent than the severity of punishment. There are two basic types of deterrence, specific and general. Specific deterrence prevent only the individual offender from committing that crime in the future. If the offender is punished severe enough they wont want to commit that offense again in the future. General deterrence on the other hand helps to prevent crime in the general population. The punishment of one offender serves as an example for the rest of the people in the general population who have not yet taken part in criminal acts. It makes the general population scared of committing crime because of the punishments that