Warning: this is not an article discussing a new super advanced version control technique. I only present what is available very easily today and so should be used a lot more.
I have now worked with more than a dozen organizations in France and the code management methods put in place are not always at the top of what is available today. I do not mean anything revolutionary or especially new, but simply have a system that:
- Lets you collaborate easily on parts of code and allows everyone to comment on the code of others
- Track who coded what
- Track a list of bugs and features
The different situations that I met are in general:
- No version management at all, we send the codes by email as zip files and the latest version is the one with the most “_final” at the end of the name.
- A simple git or svn behind an SSH or on a NAS.
This second method is already much better than the first. But there is little collaboration option, and no bug tracking. Just a tracking of the code.
One thing I did not expect is that all devs are not trustworthy. So much so that I interacted with 2 companies that got their code stolen in one case part of their code, in the other all of it’s code. And I’m not talking about copying the code, but about stealing. These companies have paid to develop software and they do not have access to the sources of the said software.
In case there is a simple git, it is already much better. The code is on a server that actually acts as a backup. And on top of that we have a history of who coded what in what order. The problem with this approach is that it manages the past well but does nothing for the future. Our goal as a developer is to develop the future of the project, not archive the past.
What is available today
Today, there are systems that integrate all these features in a single software. The 3 dominant solutions are:
These 3 solutions are roughly the same at different costs and with different levels of support. This article is intended for small organizations with someone willing to push forward the use of more modern tools, I will only address the gitlab solution because it is the best suited to the experiment without risk .
The lack of risk comes from the fact that the free version is more than enough for the majority of SMEs (I deployed it for an R&D of 30 people working on domains ranging from hardware design to web front-end (“super fulll -stack “)). You can use gitlab online, but also simply install it on your PC to test.
Finally, the most important (and this is valid for the 3 solutions): if things go bad, if nothing works anymore on your installation, the code is not lost. It is saved as a git folder. So in case of big crash just copy these files and no code will be lost.
It’s fine that it is safe and free etc …. but in what ways do those tools improve the process of development. Here is a list of features that seem to me the most interesting:
- Pull request: to request the integration of a group of commits into a branch. This step allows for easy code review of the changes made.
- Continuous Integration: allows you to run a home made script for each commit. For example to launch unit tests. The result will be displayed in the gitlab web interface.
- Rights Management: It is possible to manage the rights of users to limit the access and scope that a user has over a code repo.
- Bug tracking: a list of bugs and features that integrate properly with the code management system. Thus it is possible to assign a user to the resolution of a bug. But above all it is possible to keep track of the commits that corrected this bug (very useful in case of reappearance of the said bug later).
Of course this is only a very small list of what is available, and since gitlab is open source, you can always add the functionality you would miss on your own. But that would surprise me considering the colossal list of features already integrated: https://about.gitlab.com/features/.
I hope this article has motivated you enough to take a look at these kinds of systems and test whether these tools can improve your development process. The advantage of this kind of tool is that a productivity gain even marginal applies to all the R&D of your company which quickly becomes significant.