Lesson 20 / 25

Licensing and Ownership

Understand the licence and copyright questions around generated code and what to do about them.

Check your rules, not just the code

Generated code may resemble open-source code that has a licence with obligations (for example attribution, or share-alike for copyleft licences). The legal position on AI-generated code is still evolving and differs by country, so this is not legal advice. Practical steps: use tools that offer duplicate-code detection or filters if your organisation needs them, follow your employer's or university's policy, keep a record of which tools you used, and be cautious about long verbatim blocks that look like a known library.

Academic honesty

For coursework, many institutions have specific rules about AI help. Follow them and disclose your use when required; submitting generated work as your own can count as misconduct.

Quick check: Which is a sensible habit regarding licences and generated code?

  • Ignore all policies
  • Follow your organisation's policy and be cautious about long verbatim blocks
  • Assume everything is public domain
  • Remove all comments
Answer

Follow your organisation's policy and be cautious about long verbatim blocks — Policy compliance and care with verbatim code reduce legal and ethical risk.