The Chinese Legal Code is a recurring idea. China at this time is a society ruled by law. Scholars pass a series of examinations in order to become Imperial officials. To pass these tests, men must have studied Chinese classics by Confucius, Mencius and other writers, for many years. Chinese legal code in general, tries to be humane and just, but can often become too complicated. Instead of stating general principles, it often spells out intricate details and punishments. Different crimes, such as adultery, are assigned a number of beatings, which may or not be fatal. The magistrate who administers the beatings may purposely have them given with the intention of killing a person, or given in order to be light and not cause too much damage.