DoAssignment study guide

D2.2 · Explain why programmers need a code of ethics

Learn to explain why programmers need a code of ethics through clear examples and targeted practice.

Ontario Grade 12 Computer Science

Topics in Computer Science

ICS4U D2.2 — making responsible choices when creating software

ICS3U programming asks you to make decisions while designing, building, and checking software. Some decisions are technical: which instruction or data structure will work? Others affect people: what information should a program collect, and how should a programmer respond if it may cause harm? Technical correctness alone cannot answer every question about what programmers ought to do. This lesson focuses only on expectation D2.2: explaining why programmers need a code of ethics. A code of ethics is a set of principles that helps guide professional choices. It does not replace careful judgment, and it cannot guarantee that everyone will act responsibly.

What you will learn

  • Explain what a code of ethics is in programming.
  • Explain why programmers need shared ethical guidance.
  • Apply the reasons for ethical guidance to simple programming decisions.

1. From programming choices to ethical questions

A computer program carries out instructions, but people choose what it should do, what information it should use, and how it should behave when something goes wrong. Those choices can affect users and others who did not create the software. A programmer may therefore face a question that cannot be settled just by asking whether the program runs as intended.
For example, a feature might work correctly yet collect more personal information than its purpose requires. The technical question is whether the feature works. The ethical question is whether the choice is responsible toward the people affected. These questions are related, but they are not the same.
A code of ethics is a shared guide to responsible conduct. It gives programmers principles to consider when making decisions, especially when several actions seem possible and the effects on people are not immediately obvious. It can also help people discuss a difficult choice using common expectations rather than relying only on personal opinion.
  • A working program is not automatically a responsible program.
  • Ethical questions concern choices and their effects on people.
  • A code of ethics offers shared guidance for those choices.

2. Why shared guidance matters

Programmers need a code of ethics because software decisions can affect people beyond the programmer or the team that built it. A user may rely on a program without knowing how it was designed. A shared code reminds programmers to consider those affected and to take responsibility for the choices they make.
Shared guidance is especially useful when a decision is uncertain. A programmer might be under pressure to finish quickly, or team members might disagree about what is acceptable. A code of ethics gives them principles to consult and a starting point for explaining their reasoning. It does not mechanically select the right answer for every situation; programmers still need to understand the context and think carefully.
A code can also help establish expectations across a profession. When people use shared principles, they have a common basis for discussing responsible conduct and questioning choices that could harm or mislead others. This matters because one programmer's decision may be experienced by many people who had no part in making it.
Ethical guidance is not identical to a list of laws or technical requirements. Rules can set requirements, but a programmer may still need to think through a situation that a rule does not settle clearly. A code of ethics supports that reasoning. It is guidance, not a promise that every member will behave well or that following a checklist will prevent every problem.
Professional organizations publish such guidance. For example, the Association for Computing Machinery (ACM) has a Code of Ethics and Professional Conduct. Its existence illustrates that computing professionals have articulated shared expectations for conduct. The reason to have a code is not simply to memorize a document: it is to guide responsible choices and support accountability when software decisions affect others.
  • Shared principles help programmers consider people affected by software.
  • A code gives teams common language for discussing difficult choices.
  • Ethical guidance supports judgment; it does not replace judgment or guarantee good conduct.

3. Using a code as a guide, not a shortcut

To use ethical guidance thoughtfully, first identify the decision rather than assuming that the technical task is the whole problem. Next, consider who may be affected and what the possible effects could be. Then use the relevant ethical principles to compare the available choices and explain why one choice is more responsible. If important information is missing, seeking clarification is better than pretending the decision is obvious.
This process is a way to reason, not a new programming algorithm. It does not assign a numerical score to people or guarantee a perfect outcome. Its purpose is to make the programmer's attention to responsibility visible: what decision is being made, who may be affected, and how shared guidance informs the choice.
The same code may not give a one-sentence answer to every case. People can interpret a situation differently, and effects may be uncertain. Programmers still need to examine the facts, discuss concerns, and accept responsibility for the choices they make. A code is valuable precisely because it gives that discussion a shared starting point.
  • Identify the choice and consider who may be affected.
  • Use shared principles to explain and compare options.
  • A code guides discussion; it is not an automatic decision-maker.

4. A concise explanation of the need

A strong explanation of why programmers need a code of ethics connects three ideas: programmers make choices, software choices can affect people, and shared principles help guide and explain responsible conduct. It should avoid claiming that a code guarantees safety or supplies an instant answer to every question.
This reasoning keeps the focus on the expectation. You are not being asked here to recite a particular code or solve every ethical issue in computing. You are being asked to explain why programmers need ethical guidance: their decisions can matter to others, and common principles help them make and discuss those decisions responsibly.
  • Connect programmer choices to effects on people.
  • Explain how shared principles help guide responsible conduct.
  • Do not overstate what a code can guarantee.

Worked example

A feature requests extra personal information

A team is building a simple sign-up feature. One proposed version asks users for personal information that is not needed for the feature to work. Explain why a programmer should use ethical guidance when considering this proposal.
  1. Identify the decision
    The decision is whether to include a request for information that the feature does not need. The question is not only whether the sign-up can be programmed.
  2. Consider who is affected
    Users are affected because they are being asked to provide the information. They may not know why it is requested or how the choice affects them.
  3. Explain the value of guidance
    A code of ethics gives the programmer shared principles to consult when judging whether the request is responsible. It supports a reasoned discussion with the team instead of treating technical feasibility as the only test.
Answer: The programmer should use ethical guidance because the choice affects users, not just the software's operation. Shared principles help the programmer and team consider whether asking for unnecessary information is responsible and explain their decision.
Check: The explanation connects a programming choice to people affected by it and describes how shared principles guide the discussion.

Worked example

The team disagrees about a release

A team member is concerned that a proposed software feature could mislead users. Another team member says the feature should be released because it works as coded. Explain how a code of ethics helps and what it cannot do.
  1. Separate the technical and ethical questions
    Whether the feature works as coded is a technical question. Whether its behaviour could mislead users is a separate concern about the effect of the team's choice.
  2. Use shared principles
    The team can consult ethical guidance as a common basis for discussing the concern and explaining what responsible conduct requires in this situation.
  3. Keep judgment with the team
    The code does not automatically settle the disagreement or prove what will happen. The team must consider the situation and make a responsible decision rather than treating the code as a guarantee.
Answer: A code of ethics helps the team discuss the possible effect on users using shared expectations, rather than relying only on whether the feature runs. It cannot guarantee that the team will agree or make the decision for them.
Check: The answer recognizes both the usefulness and the limits of a code of ethics.

Worked example

A choice is not clearly covered by a rule

A programmer faces a decision that is not clearly answered by a specific rule the team knows. Explain why a code of ethics may still be useful.
  1. Recognize the uncertainty
    Not having a clear rule does not make the choice purely technical or remove the need to think about responsibility.
  2. Consider affected people
    The programmer can identify who may be affected and consider the possible effects of the available choices.
  3. Use principles to support reasoning
    Shared ethical principles provide a starting point for discussion and for explaining why a choice is more responsible. The programmer must still use judgment because the code may not state an exact answer.
Answer: A code of ethics remains useful because it offers shared principles for reasoning when a specific rule does not settle a decision. It helps the programmer discuss responsibility and justify a choice, while leaving room for careful judgment.
Check: The answer explains that ethical guidance can help even when it does not provide a precise rule for the case.

Common mistakes and how to avoid them

Assuming that a program is ethical because it works correctly.
Correction: Technical correctness describes whether the program works as intended; programmers must also consider how their choices affect people.
Treating a code of ethics as a rulebook that answers every situation automatically.
Correction: A code provides shared guidance. Programmers still need to understand the situation and use judgment.
Claiming that a code guarantees responsible behaviour.
Correction: A code can guide choices and support discussion, but it cannot ensure that every programmer follows it or prevent every problem.

Lesson summary

  • Programmers make choices that can affect people who use or encounter software.
  • A code of ethics offers shared principles for guiding and explaining responsible choices.
  • Shared guidance helps teams discuss uncertain situations and establish common expectations.
  • A code supports judgment; it does not replace judgment or guarantee good outcomes.

Check your understanding

Question 1

Which explanation best states why programmers need a code of ethics?
  1. It guarantees that every program is safe and every programmer behaves responsibly.
  2. It gives programmers shared principles to guide choices that can affect people and to discuss responsible conduct.
  3. It replaces the need to consider who may be affected by a software decision.
  4. It ensures that every difficult decision has one automatic answer.
Show answer and explanation
It gives programmers shared principles to guide choices that can affect people and to discuss responsible conduct.
A code offers shared guidance for choices that can affect people, while leaving programmers responsible for using judgment.

Question 2

A feature works as coded, but a team is concerned that it may mislead users. What does this illustrate?
  1. If software works, ethical concerns no longer apply.
  2. A technical decision can also raise a separate ethical question about its effects on people.
  3. The team should ignore ethical guidance whenever a feature is technically correct.
  4. A code of ethics will automatically prove whether users are misled.
Show answer and explanation
A technical decision can also raise a separate ethical question about its effects on people.
Working as intended does not settle whether the feature's effects on users are responsible.

Question 3

A code of ethics does not clearly settle a programmer's decision. What is the best conclusion?
  1. The code is useless whenever it does not give an exact answer.
  2. The programmer should stop considering the effects of the decision.
  3. The code can still guide discussion, but the programmer must use judgment.
  4. The code guarantees the choice with the lowest risk.
Show answer and explanation
The code can still guide discussion, but the programmer must use judgment.
Ethical guidance provides a shared starting point, not an automatic answer for every situation.

Key terms

Code of ethics
Shared principles that guide responsible conduct and help people reason about choices.
Ethical guidance
Principles used to consider what responsible choices may be when decisions affect people.
Judgment
Careful consideration of a situation when applying guidance to a particular decision.

Continue through ICS4U

View the complete ICS4U Ontario Grade 12 Computer Science curriculum and lessons

Tutor support for D2.2 · Explain why programmers need a code of ethics

Working on D2.2 · Explain why programmers need a code of ethics in ICS4U? Bring the question and your own attempt. In a live session, you can trace a small input step by step, compare expected and actual output, and test an edge case. Ask about the first step that does not make sense, then try a similar question yourself.

Explore coding tutoring · Request an eligible free 30-minute introduction. Your request is matched by subject and language; a tutor must accept before a time is confirmed.

برای مبحث D2.2 · توضیح نیاز برنامه‌نویسان به آیین اخلاقی در درس ICS4U، سؤال و تلاش خود را همراه بیاورید. در جلسه می‌توانید یک ورودی کوچک را گام‌به‌گام دنبال کنید، خروجی مورد انتظار و واقعی را مقایسه کنید و یک حالت مرزی را بیازمایید. راهنمای معلم برنامه‌نویسی را ببینید یا جلسهٔ معارفهٔ رایگان ۳۰ دقیقه‌ای درخواست کنید. زمان جلسه پس از پذیرش معلم قطعی می‌شود.

About this lesson and its review

Published by DoAssignment. This reviewed lesson follows Ontario Grade 12 Computer Science (ICS4U), expectation D2.2. It is a study resource, not an official curriculum publication.

Before publication, content is checked for structure, mathematical or chemical notation, calculations, course boundaries, and readability. Errors can still occur, so corrections are welcomed.

Official curriculum reference

Report a correction or ask a question