Sharing source code and documentation allows other researchers to freely access, reuse, modify and redistribute your research software.
If you have created code or software to visualise or interrogate your research data then you can also preserve this in a data repository, alongside full documentation to help others verify your findings or reproduce your methodology. It can allow you to keep track of versions and track download and citation statistics.
According to the Software Sustainability Institute, open sourcing is key to sustainable software practice and ensures "the software you use today will be available - and continue to be improved and supported - in the future".
A source code manager (SCM) is a software tool used by teams of programmers to manage source code.
SCMs are used to track revisions in software. Each revision is given a timestamp and includes the name of the person who is responsible for the change. Various revisions may be compared, stored and merged with other revisions.
The idea of the Free Software Movement is that computer users deserve the freedom to form a community. You should have the freedom to help yourself, by changing the source code to do whatever you need to do. And the freedom to help your neighbour, redistributing copies of programs to other people. Also the freedom to help build your community, by publishing improved versions so that other people can use them. An example of this is the GNU Operating System.
In this video we see how software was seen as finite, a product to be sold rather than being shared openly and improved by any contributors.
There are a number of repositories where code and software can be stored openly. These allow you to manage, share, and collaborate on version controlled software and code.
There are numerous repositories you can use expose software from development to deployment, and some offer a workflow to formally publish software with a DOI or other persistent identifiers (PID) to enable citation. These repositories include:
Baker, M. (2016). Why scientists must share their research code. Nature. https://doi.org/10.1038/nature.2016.20504
Frey, N. (2021, April 16). How and why to share scientific code. Towards data science. https://towardsdatascience.com/how-and-why-to-share-scientific-code-64fbd385a67
Kubilius, J. (2014). Sharing Code. I-Perception, 5(1), 75-78. https://doi.org/10.1068/i004ir