Skip to content

Instantly share code, notes, and snippets.

@rsp
Last active December 20, 2017 12:45
Show Gist options
  • Save rsp/2ea37bdf84a7820833c54f8b7f4b7a2a to your computer and use it in GitHub Desktop.
Save rsp/2ea37bdf84a7820833c54f8b7f4b7a2a to your computer and use it in GitHub Desktop.
Releasing internal libraries as open source

Releasing Internal Libraries as Open Source

My recomentation of releasing internal company libraries as open source.

Writing from scratch

If there is a need to write code that can be abstracted away as a library and used in many projects and it is not written yet:

  1. define the needed functionality and interface
  2. write and publish the library following my guide as an internal project (not the client project)
  3. use the library in the client project as you would use any other open source library

Already written

If the code is already written as a part of a client project and you would like to have that functionality available as a library in the future projects:

  1. define the functionality that should be a part of the library (only functionality, not interface)
  2. rewrite it from scratch by someone who hasn't written the original code and who knows only the functional requirements from point 1, as an internal project (not the client project), defining the interface from scratch
  3. use the library in future client projects as you would use any other open source library
  4. optionally upgrade the original project to use the new open source library

If the original code cannot be implemented any other way then it is just boilerplate, not useful as a library.

For any interesting functionality there will be countless ways to implement it. A clean-room implementation from scratch is the only way to create a library implementing functionality that was previously implemented as a part of a client project - otherwise it cannot be released as open source without an explicit written permission of the client who paid for the development of the original project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment