Some codes of ethics are often social issues. Some set out general principles about an organization's beliefs on matters such as quality, employees or the environment. Others set out the procedures to be used in specific ethical situations - such as conflicts of interest or the acceptance of gifts, and delineate the procedures to determine whether a violation of the code of ethics occurred and, if so, what remedies should be imposed.
The effectiveness of such codes of ethics depends on the extent to which to management supports them with sanctions and rewards. Violations of a private organization's code of ethics usually can subject the violator to the organization's remedies (in an employment context, this can mean termination of employment; in a membership context, this can mean expulsion). Of course, certain acts that constitute a violation of a code of ethics may also violate a law or regulation and can be punished by the appropriate governmental organ.
Ethical Codes are often not part of any more general theory of ethics but accepted as pragmatic necessities.
They are distinct from moral codes that may apply to the culture, education, and religion of a whole society.
Even organizations and communities that may be considered criminal may have their own ethical code of conduct, be it official or unofficial. Examples could be hackers, thieves, or even street gangs.
The best antidote to ethical lapses is to commit in advance to a set of ethical principles -- your personal ethical code. Your code defines your standards of right and wrong. It helps you resist temptation and becomes your basis for making ethically sensitive decisions.
A personal ethical code can be as simple as a few sentences or as long as many pages.
Flores, Albert. "The Philosophical Basis of Engineering Codes of Ethics." In Vesilind P.A. and A. Gunn (eds), Engineering Ethics and the Environment. Cambridge: Cambridge University Press, 1998: 201-209.
James B. Sumner "Ethical related to Engineering" In eds G (Cambride Youth Club)