Legal & Ethical Concerns in CS
Understanding copyright, licensing, and ethical behavior in coding
Popcorn Questions
- Legal Concern: Copyright infringement, violating licenses
- Ethical Concern: Using code without credit, disrespecting creators
Legal Concerns
Intellectual Property (IP)
- IP includes inventions, art, code, logos, etc.
- Digital content is easy to copy and distribute.
- Copyright protects original works like code, music, books.
- Other protections: Patents, Trademarks, Trade Secrets
Enforcing IP
- Use licenses and DRM to control how code is used.
- Monitor and legally protect your rights.
Licensing Code
By default, all rights are reserved unless a license is added. Open-source licenses define what others can legally do with your code.
Common Open-Source Licenses
| License | Permissions | Restrictions | Common Uses |
|---|---|---|---|
| MIT | Use, modify, share with credit | No liability/warranty | Web apps, libraries |
| Apache 2.0 | Like MIT + patent protection | Must include license notice | APIs, enterprise tools |
| GPL | Stay open-source | Can’t privatize mods | Non-profits, open tools |
| BSD | Use, modify, redistribute | No endorsement | Academic projects |
| Creative Commons | Flexible for non-code | Not for software | Docs, art, media |
Breaking the Law
- Using code without a license = copyright violation
- Modifying GPL code without sharing changes = illegal
- Removing license or credit = violation
- Selling open-source code without permission = illegal
Ethical Concerns
- Using code without attribution = plagiarism
- Open-source relies on trust, credit, and fairness
- Profiting from others' work without credit is unethical
Example: Google vs Oracle
Oracle accused Google of stealing Java APIs in Android. Google argued it was fair use. The case went all the way to the Supreme Court.
Plagiarism vs. Proper Use
- Wrong: Copy-pasting from Stack Overflow without credit
- Right: Forking repos, keeping licenses, giving credit
Homework
- Go to your GitHub repo → Click “Add file” → “Create new file” → Name it
LICENSE - Select a license template and commit
- Explain in your README why you chose that license