1 of 38

Can I use that code?

Software Licences as a User

2 of 38

About Me

  • Holly Becker
  • Software Developer
  • Open source fan
  • Likes books, board games, birdwatching
  • hollybecker.net

3 of 38

IANAL

4 of 38

It's complicated!

5 of 38

What is a licence?

6 of 38

What is a software licence?

  • For software only!
    • For other creative works use Creative Commons
  • What the user can do with code
  • What obligations the user has

7 of 38

Categories of Licences

8 of 38

Not Licensed

  • Default state of code
  • Author has copyright
  • Cannot use
    • But can ask author for permission
  • Examples:
    • Blog posts
    • Websites

9 of 38

Closed Source/Proprietary Licence

  • Generally can't use this code
  • Depends on the terms of the licence
  • Author retains copyright
  • Example:
    • EULA
    • Unity game engine

10 of 38

Copyleft Open Source Licence

  • You can use this code!
  • But you have to share derivatives
    • Modifications or used as dependency
  • Author retains copyright
  • Examples:
    • GPL
    • AGPL
    • LGPL

11 of 38

Permissive Open Source Licence

  • You can use this code!
  • Few restrictions
  • Author retains copyright
  • Examples:
    • MIT
    • BSD
    • Apache

12 of 38

Public Domain

  • You can use this code!
  • No restrictions
  • Author has given up copyright
  • Examples:
    • Unlicense
    • CC0

13 of 38

Joke Licences

  • Intent: permissive with humor
  • Actually: legally problematic
  • Don't use them!
  • Examples:
    • Beerware
    • WTFPL

14 of 38

Common Licences

15 of 38

MIT

  • Permissive licence
  • Must keep licence with code
  • Disclaims liability
  • Used by:
    • SQLAlchemy
    • Twisted
    • six

16 of 38

BSD (2-clause & 3-clause)

  • Permissive licence
  • Must keep licence with source or binary
  • 3-clause: usage doesn't allow endorsement
  • Used by:
    • numpy, scipy, pandas
    • Django, flask

17 of 38

Apache 2.0

  • Permissive licence
  • Must keep licence with code
  • Grants patent rights
  • Used by:
    • requests
    • selenium
    • Android OS

18 of 38

GPL

  • Strong copyleft licence
  • Must keep licence with code
  • Must share changes if distributed
  • Affects whole codebase
  • Used by:
    • Linux kernel (GPLv2)
    • Ansible (GLPv3)

19 of 38

Can I use that code?

20 of 38

Closed source + MIT

  • Yes!
  • MIT only requires preserving licence

21 of 38

Closed source + GPL

  • Probably not
  • Can be done through careful separation
  • Probably talk to a lawyer

22 of 38

GPL + MIT

  • Yes!
  • MIT is less restrictive than GPL

23 of 38

GPL + GPL

  • Yes!
  • Same licence, no problems

24 of 38

MIT + MIT

  • Yes!
  • Same licence, no problems
  • MIT is very permissive

25 of 38

MIT + GPL

  • Probably not
  • GPL requires derivatives licensed GPL
    • Could license under GPL instead of MIT
  • Could be done through careful separation
  • Probably talk to a lawyer

26 of 38

Frequently Asked Questions

27 of 38

Can I use code on Github?

  • It depends!
  • Not licensed by default
  • Check if the repository has a licence

28 of 38

What about Stack Overflow?

  • Complicated :(
  • All user contributions are CC-BY-SA
    • But CC (probably) doesn't apply to code
  • Plans to move to MIT on hold
  • Uncertain if SO code is usable in projects
    • But good as inspiration

29 of 38

Conclusion

30 of 38

Take aways

  • Software licences are good
  • Software licences are hard
  • Permissive open source is easy to work with
  • GPL enforces software freedoms

31 of 38

Check the licence!

32 of 38

Thank you!

HollyBecker.net

33 of 38

Resources & Bonus Slides

34 of 38

Resources

35 of 38

Contributor License Agreement (CLA)

  • Allow others to use & distribute your work
  • Often when contributing to a project
  • Allows project to defend license
    • Have legal docs saying they have copyright for all parts of the project
  • Github added implicit CLA (code licensed under repo license when make PR)

36 of 38

LGPL

  • GPL family
  • Dynamic linking isn't a derivative work
  • Less viral
  • Easier to use in non-GPL projects

37 of 38

AGPL

  • GPL family
  • Network access is distribution
  • Closes SAAS loophole
    • Don't want people using APGL code to run a website
  • Only GPLv3

38 of 38

PyPI

  • Doesn't verify it has a licence to upload
  • Check!
    • Or ask maintainer to add a licence!