John Blischak Describe collaboration with version control.  about 9 years ago

Commit id: 8e3dcff6e070173260fa9950de6a0c325e69cd27

deletions | additions      

       

A few key problems arise when writing large amounts of code. First, you often need to experiment with new ideas, such as adding new features or increasing the speed of a bottleneck, but you don't want to risk breaking the currently working code. The simplest solution is to copy the script before making new edits. However, this can quickly become a problem because it clutters your filesystem with uniformative filenames, e.g. \verb|analysis.sh|, \verb|analysis_02.sh|, \verb|analysis_final_03.sh|, etc. It is difficult to remember the differences between the version of the code, and more importantly which version you used to produce specific results, especially if you return to the code months later. Second, you will likely need to incorporate changes from collaborators. If you email the code to multiple collaborators, you will have to manually incorporate all the changes each of them sends. Fortunately, software engineers have already developed software to manage these issues: version control.  Version control software allows you to track the iterative changes you make to your code. Thus you can experiment with new ideas but always have the option to revert to specific past version of the code. Furthermore, you can record messages as you save each successive version so that you (or anyone else) reviewing the development history of the code is able to understand the rationale for the given edits. Also, it facilitates collaboration. Using version control software, your collaborators can make and save changes to the code, and you can automatically incorporate these changes to the main code base. And the collaborative aspect is enhanced with the emergence of websites that host version controlled code.