⚖️ Lecture 15 · Professional ethics for SE

SE Ethics & Professional Practice

8 fundamental principles من ACM/IEEE. الـ Q1.19 / Q1.20 في كل امتحان بتجي فيها ethics case study. لازم تعرف تحدد الـ violations بسرعة — عشان متتسوحش في الامتحان.

6
Chapters
8
Principles
2
Case Studies
8
Exam Qs
01

What Are Ethics?

Definitions from philosophy → computer ethics → SE ethics — خلينا نفهم الموضوع من أوله.

📖 Definitions
  • Ethics = "moral principles that govern a person's behavior or the conducting of an activity".
  • Or "the branch of knowledge that deals with moral principles".
  • Origin: Greek ethos = habitual character, custom.

Computer Ethics

"The field of analyzing and solving dilemmas and ethical issues arising during using and developing computing systems in the light of ethical theories and professional practice."

👔 What is a Professional?

الـ professional = حد اللي بيشتغل في مهنة محددة بـ:

  • Knowledge and skills بيتعلمها من تعليم وتدريب.
  • License بتسمحله يمارس المهنة.

Professionalism يعني...

  • Competence · Honesty · Integrity — كفاءة وأمانة ونزاهة.
  • Reliability and responsibility — موثوقية ومسؤولية.
  • Communication and collaboration — تواصل وتعاون.
  • Self-development — تطوير نفسك.
  • Good judgment — حكم كويس.
02

Theories of Ethics

4 مدارس فكرية في الأخلاق — لازم تعرف كل واحدة فيها إيه.

🎯 Consequences Theory

Egoism: action good/bad based on benefit/harm to individual.

Utilitarianism: morally acceptable if it brings the greatest good for the greatest number.

⚖️ Deontology (Duty-based)

Actions are what matters — NOT consequences. Humans have duty to do what is good. Actions are good/bad in themselves.

🌍 Relativism

No universal ethical norms. Right and wrong differ between cultures, societies, generations.

🕊️ Divine Command

Humans are on Earth to serve God. Divine guidance is the source of ethics — defines what is right and wrong.

03

Why Do We Need SE Ethics?

الممارسات غير الأخلاقية بتسبّب فشل المشاريع، فشل الأنظمة، وحتى وفاة!

⚠️ Real Examples
  • London Ambulance System — Company took work it had no experience in. System released with known bugs.
  • The Vasa (classical engineering ethics).
  • Therac-25 — Company denied the system had problems.
  • Royal Mail / Fujitsu (UK, 1999-2021) — Faulty accounting software accused 700+ post office workers of theft.
أسئلة أخلاقية لازم تفكر فيها
  1. هتشتغل على منتج بيتتبع بيه في خصومهم السياسيين؟
  2. هتطلع منتج حساس خالص من تستينغ ُكامل عشان المدير ضغط عليك؟
  3. هتقبل عقود مش كفء تعملها؟
  4. هتضحّي بممارسات الـ SE الصح عشان تخلص في الوقت؟
  5. طب لو المشروع متأخر والشركة كدبت على العميل؟
  6. طب لو العميل جه عليك مباشرة برا عن الشركة؟
04

SE Code of Ethics — Preamble

ACM/IEEE joint code. Authoritative reference for the profession.

📜 Who is a SE?

"Software Engineers are those who contribute by direct participation or by teaching, to the analysis, specification, design, development, certification, maintenance, and testing of software systems."

"Because of their roles, software engineers have significant opportunities to do good or cause harm."

🎯 Code Scope

The Code applies to:

  • Practitioners
  • Educators
  • Managers
  • Supervisors
  • Policy makers
  • Trainees and students of the profession
05

The 8 Fundamental Principles ⭐

احفظهم بالترتيب! كل principle ليه clauses (3.01, 3.02, ...). الـ exam بيديك scenario ويسأل أي principle — لازم تبقى عارف كل clause بيعمل إيه.

1
Public
2
Client & Employer
3
Product
4
Judgment
5
Management
6
Profession
7
Colleagues
8
Self
🌍 Principle 1 — Public

لازم مهندسين السوفتوير يتصرفوا دايماً بما يخدم المصلحة العامة.

  • شيل المسئولية الكاملة عن شغلك.
  • وازن بين مصلحة الـ SE، الشركة، العميل، والمستخدمين بما لا يضر الصالح العام.
  • متوافقش على سوفتوير إلا لو كان آمن، ومتجرب كويس، ومفهوش مشاكل.
  • أعلن عن أي ضرر ممكن السوفتوير يسببه، متخبيش حاجة.
  • خليك فير ومتغشش حد.
  • اعمل حساب ذوي الاحتياجات الخاصة (Physical disabilities) في السوفتوير بتاعك.
💼 Principle 2 & Employer

اتصرف بما يحقق مصلحة العميل والشركة، بس من غير ما تضر المصلحة العامة.

  • 2.01 — قدّم خدمات بس في مجال خبرتك — متقبلش شغل مش كفيله.
  • 2.02 — متستخدمش سوفتوير مسروق أو متكرك.
  • 2.03 — استخدم الملكية بالطريقة المرخصة من صاحبها.
  • 2.04 — تأكد إن المستندات اللي بتعتمد عليها معتمدة.
  • 2.05 — احترم سرية المعلومات — الـ NDA مش هزار.
  • خليك صريح في حدودك · بلّغ عن أي مخالفات تشوفها · متقبلش تشتغل في حاجة بتضر الناس.
📦 Principle 3 — Product

اتأكد إن الـ products والتعديلات بتاعتك مطابقة لأعلى المعايير الاحترافية.

  • 3.02 — تأكد إن الأهداف مناسبة وممكن تتحقق.
  • 3.04 — تأكد إنك مؤهّل لأي مشروع بتقبله.
  • 3.07 — افهم الـ specifications كويس من الأول.
  • 3.09 — اعمل تقديرات واقعية للتكلفة والوقت.
  • 3.10 — اتأكد من وجود تستينغ ومراجعة كافيين ⭐
  • اتعامل مع الداتا بأمانة، وثّق الشغل بتاعك كويس، واحمي خصوصية اليوزرز.
⚖️ Principle 4 — Judgment

حافظ على نزاهتك واستقلاليتك لما تيجي تقيّم أو تاخد قرار احترافي.

  • 4.03 — احتفظ بموضوعيتك في التقييم — متتأثرش بعلاقاتك.
  • 4.04 — متقبلش رشاوي أو double billing أو أي ممارسة مالية غير سليمة.
  • 4.05 — أعلن عن أي conflict of interest عندك — متخبيش الموضوع ده.
  • 4.06 — متشتغلش في لجان فيها تضارب مصالح مخفي.
👔 Principle 5 — Management

المديرين والـ leaders لازم يشجعوا ويطبقوا الأخلاقيات في الإدارة بتاعتهم.

  • 5.01 — اضمن إدارة كويسة وإجراءات فعالة للجودة وتقليل المخاطر.
  • 5.02 — علّم الـ engineers بالمعايير قبل ما تحاسبهم.
  • 5.04 — وزّع الشغل حسب خبرة وتعليم كل واحد.
  • 5.05 — اضمن تقديرات واقعية للتكلفة والوقت والجودة.
  • 5.11 — متطلبش من الـ engineer يعمل حاجة تتعارض مع الـ Code ⭐
  • إدي رواتب عادلة · متتحيزش ضد حد · بلّغ عن المخالفات بطريقة صح.
🎓 6 — Profession

ارفع من نزاهة وسمعة المهنة بما يتماشى مع المصلحة العامة.

🤝 7 — Colleagues

خليك فير وادعم زمايلك في الشغل.

  • 7.02 — ساعد زمايلك إنهم يطوروا من نفسهم.
  • شجعهم يلتزموا بالـ Code of Ethics.
  • إدي credit للناس على شغلهم وماتسرقش مجهود حد.
  • اعمل review بموضوعية من غير شخصنة.
📚 8 — Self

خليك دايماً بتتعلم وطور من نفسك (Lifelong learning).

  • 8.01 — زوّد معرفتك في الـ dev والـ maintenance والـ testing.
  • 8.02 — حسّن قدرتك على عمل سوفتوير آمن ومفيد.
  • 8.03 — طوّر مهاراتك في الـ documentation.
  • 8.04 — افهم بيئات العمل كويس.
  • 8.05 — خليك على دراية بالـ standards والقوانين.
  • 8.06 — افهم الـ Code of Ethics ده نفسه كويس.
06

Case Studies

LAS · CONFIRM · Royal Mail/Fujitsu — بنطبّق عليها الـ principles ونشوف فين الغلطة.

🚑 London Ambulance System

نظام الإسعاف الآلي في لندن نزل وفشل فشل ذريع. التحقيقات كشفت بلاوي ومخالفات أخلاقية كتير:

  • الجدول الزمني اتحط لأسباب سياسية، مش تقنية — وكان غير واقعي تماماً.
  • تيم التقييم بتاع المناقصة كان معندوش خبرة ومكسل.
  • شركة System Options مكنش عندها أي خبرة سابقة — ورغم كده قدموا أرخص عرض وكسبوا (دي مخالفة لـ 2.01).
  • مبلغوش إدارة الـ NHS بالحالة الحقيقية للمشروع بأمانة (مخالفة لـ 4.05).
  • النظام متعملوش testing صح، وكان مليان errors خطيرة (مخالفة لـ 3.10).
  • قرار الـ "Go live" كان سياسي، مش مبني على تقييم الـ QA.
  • الموظفين متدربوش كفاية، ومكانش فيه خطة طوارئ (backup plan).

📥📦 CONFIRM Project (ARMIS + Marriott + Hilton)

ARMIS بنت نظام حجز فنادق وسيارات — فضيحة مكملتش، بدأت 1988 واتلغت 1992. مسلموش أي حاجة شغّالة ليوم من الأيام.

  • ARMIS كانت بتكدب على حالة النظام طول الوقت (violates Principle 4).
  • الاستثمار من $55M طلع لـ $125M — والتسوية بـ $160M.

📮 Royal Mail / Fujitsu (1999-2021)

البريد الملكي البريطاني نزّل سوفتوير حسابات من شركة Fujitsu سنة 1999. بين 2000 و 2014 حصلت الكارثة:

  • أكتر من 700 موظف بريد اتهموهم بالغلط إنهم حرامية.
  • ناس كتير اتسجنت، واتدمرت مالياً، وفي منهم انتحر.
  • في 2021: المحكمة حكمت إن السوفتوير كان بايظ ومضروب. ودفعوا تعويضات 58 مليون إسترليني لـ 555 موظف.
  • الـ developers قالوا إن الكود كان مبيتراجعش، ومفيش coding style، ومليان bugs.
  • المديرين هددوا الـ developers ("كملوا شغل أو هتتطردوا") — وده مخالف لـ 5.11.
  • الـ developers خالفوا مبدأ 3.10 (اللي هو اتأكد من الـ testing).
  • والمديرين خالفوا المبادئ 5.01 و 5.05 و 5.11.
🎯

Exam Bank — Lecture 15

الـ ethics scenarios بتتكرر دايماً. اقرا الـ scenario كويس، بعدين identify الـ violations — متديش وقت تفكير.

Question 1 Fall 2021–22 · Q1.19
Case: Mina works for public schools IT. He's friends with Aziz, uncle of Rami who owns FCAI Soft. Testing showed FCAI Soft's product is below standard. As a favor for Aziz, Mina accepts the bad software. Rami will hire Mina's brother in return.

Which clauses of Principle 4 (Judgment) are violated?
4.03 — Maintain professional objectivity
4.04 — No bribery/improper financial practices
4.05 — Disclose conflicts of interest
4.06 — Refuse private/governmental bodies with conflicts
A Only 4.03, 4.06
B Only 4.03, 4.04, 4.05
C Only 4.04, 4.05, 4.06
D All of them
✅ الإجابة الصح: B — 4.03, 4.04, 4.05
  • 4.03 ❌ — قبل السوفتوير الوحش — فيه لا موضوعية.
  • 4.04 ❌ — إنك توظف حد قصاد خدمة دي تعتبر رشوة.
  • 4.05 ❌ — معلنشش عن تضارب المصالح.
  • 4.06 — مش منطبقة هنا.
Question 2 Fall 2021–22 · Q1.20
Case: Samir is great in Java but no C#/.NET experience. Client wants C#/.NET project — business secret, signed NDA. Samir accepts. Tells friend everything about project (NDA violation). Friend gives him cracked Visual Studio. Which Principle 2 clauses did Samir violate?
2.01 — Provide services only where competent
2.02 — Do not use illegally obtained software
2.03 — Only use property as authorized
2.04 — Documents relied on are approved
2.05 — Honor confidentiality of information
A 2.01, 2.02, 2.03
B 2.01, 2.04, 2.05
C 2.01, 2.02, 2.05
D 2.02, 2.03, 2.04
E All of them
✅ الإجابة الصح: C — 2.01, 2.02, 2.05
  • 2.01 ❌ — مش كفيء في الـ C#/.NET وقبل الشغل — مخالفة واضحة.
  • 2.02 ❌ — استخدم Visual Studio متكرك — وده سوفتوير غير قانوني.
  • 2.05 ❌ — كشف تفاصيل المشروع المحمي بالـ NDA — مخالفة.
Question 3 Winter 2021 · Q1.19
In the Royal Mail / Fujitsu case (faulty accounting software, 700+ employees accused, suicides), which rules were violated by the Fujitsu developers?
A 3.04 — Ensure they are qualified
B 3.09 — Realistic cost/schedule estimates
C 3.02 — Proper and achievable goals
D 3.07 — Fully understand specifications
E 3.10 — Ensure adequate testing, debugging, and review
✅ الإجابة الصح: E — 3.10 (الـ Testing الكافي) الـ developers قالوا: الكود متراجعش، مفيش كودينغ ستايل، والـ testing طلع bugs كتير بس المانجمنت ضغطت على التسليم. دي مخالفة صريحة لـ 3.10.
Question 4 Winter 2021 · Q1.20
In the same case, which rule was violated by Fujitsu project managers?
A 5.02 — Ensure SEs are informed of standards
B 5.04 — Assign work based on experience
C 5.06 — Accurate description of employment
D 5.07 — Fair remuneration
E 5.11 — Not ask SE to do anything inconsistent with this Code
✅ الإجابة الصح: E — 5.11 المانجمنت هددت الـ developers — "كملوا ولا هنطردكم" — عشان يسلّموا كود فيه bugs. ده تماماً مخالف لـ 5.11.
Question 5 Winter 2025 · Q1.14
Sami discovered a vulnerability in healthcare software that could expose patient data. Fixing it would delay delivery. Manager threatens to fire him if not released on time. Which Principle 5 rules did the manager violate?
A 5.03, 5.08, 5.10
B 5.01, 5.02, 5.03
C 5.03, 5.05, 5.10
D 5.01, 5.05, 5.11
✅ الإجابة الصح: D — 5.01, 5.05, 5.11
  • 5.01 ❌ — مفيش إدارة كويسة لتقليل المخاطر (هينزل البرنامج وفيه ثغرة).
  • 5.05 ❌ — تقديرات مش واقعية (مفيش وقت كافي يتصلح الـ bug).
  • 5.11 ❌ — المانجر بيطلب من الـ SE يعمل حاجة ضد قواعد الـ Code (إنهم ينزلوا برنامج مش متأمن).
Question 6 Winter 2025 · Q1.19
A SE realizes he needs to learn a new security framework to keep up with industry. He enrolls in an online course. Which Principle 8 (Self) rules does he apply?
8.01 — Further knowledge of analysis/dev/maintenance/testing
8.02 — Improve ability to create safe, reliable, useful SW at reasonable cost & time
8.03 — Improve documentation
8.04 — Understand SW environments
8.05 — Knowledge of relevant standards and law
8.06 — Knowledge of this Code itself
A 8.01 and 8.02
B 8.03 and 8.04
C 8.01 and 8.05
D Only 8.06
✅ الإجابة الصح: A — 8.01 and 8.02 دراسة security framework جديد بتنطبق على:
  • 8.01 ✅ — بيزود معرفته (في الـ security والـ dev).
  • 8.02 ✅ — بيحسّن قدرته إنه يعمل سوفتوير آمن وموثوق.

الـ framework مش قانون ولا ستاندرد (عشان كده 8.05 مش بتنطبق مباشرة).

Question 7 Winter 2025 · Q1.20
A SE realizes her company doesn't adopt any code of ethics. She studies the SE Code of Ethics on her own and applies it in her work and tells her colleagues. Which Principle 8 (Self) rule does she apply?
A 8.01 and 8.02
B 8.03 and 8.04
C 8.01 and 8.05
D Only 8.06
✅ الإجابة الصح: D — Only 8.06 إنه يدرس ويطبّق الـ Code of Ethics نفسه = ده بيحقق قاعدة 8.06 ("Improve their knowledge of this Code, its interpretation, and its application").
Question 8 Practice — comprehensive
Which principle requires that SEs provide services only in their area of competence?
A Principle 1 — Public
B Principle 2 — Client and Employer (specifically 2.01)
C Principle 4 — Judgment
D Principle 6 — Profession
✅ الإجابة الصح: B — Principle 2 (2.01) "إنك تقدم خدمات في مجالك اللي إنت كفء فيه وبس" دي جزء من واجبك تجاه العميل وجهة العمل. وكمان 3.04 بتغطي نفس الفكرة عشان جودة المنتج.
📋

Cheat Sheet

⚖️ 8 Principles

1. Public
Act in public interest
2. Client/Employer
2.01 competence · 2.02 legal SW · 2.05 confidential
3. Product
3.04 qualified · 3.10 adequate testing
4. Judgment
4.03 objectivity · 4.04 no bribery · 4.05 disclose conflicts
5. Management
5.01 good mgmt · 5.05 realistic estimates · 5.11 nothing inconsistent
6. Profession
Advance integrity of profession
7. Colleagues
Be fair, support, credit, review
8. Self
8.01-8.06 lifelong learning

🎯 Pattern Matching

Accept job you can't do
2.01 (competence)
Use cracked software
2.02 (illegal SW)
Leak NDA info
2.05 (confidentiality)
Release with known bugs
3.10 (adequate testing)
Accept bribe / favor
4.04 (improper financial)
Hide conflict of interest
4.05 (disclose)
Manager threatens SE
5.11 (nothing inconsistent)
Unrealistic deadline
5.05 (realistic estimates)
Self-improvement
8.01-8.06

📚 4 Ethics Theories

Consequences
Egoism + Utilitarianism (outcomes matter)
Deontology
Duty-based (actions matter)
Relativism
No universal norms (cultural)
Divine Command
God defines right/wrong

📋 Famous Cases

LAS
No experience + bad testing + political go-live
CONFIRM
$160M settlement · ARMIS lied about status
Royal Mail/Fujitsu
700+ wrongly accused · 5.11 violation
Therac-25
Company denied problem (Principle 1 violation)