Any explicitly described system of rules. This includes civil code – such as laws, policy and ordinances – as well as source code that is used to build software. Both of these are rules, some executed by humans and others by machines.
Any discrete package of code (both source and policy), the tests and the documentation required to implement a piece of policy or software.
This can be – for example – a document or a version-control repository.
The public at large: end users of the code and the services based upon it.
For example, the end users of both a service provided by a city and the code that runs the service are the city's residents.
Open source is defined by the Open Source Initiative in their Open Source Definition.
An open standard is any standard that meets the Open Source Initiative's Open Standard Requirements.
Public code is both civic code (like policy or regulation) and computer source code (such as software and algorithms) executed in a public context, by humans or machines.
Because public code serves the public interest, it should be open, legible, accountable, accessible and sustainable.
By developing public code independently from but still implementable in the local context for which it was developed, as well as documenting the development process openly, public code can provide a building block for others to:
- re-implement in their local context
- take as a starting point to continue development
- use as a basis for learning
To facilitate re-use, public code should be either released into the public domain or licensed with an open license that permits others to view and reuse the work freely and to produce derivative works.