About version control systems

Every programmers that is editing the source code of a software has at least two versions of the that source code: the one loaded in the primary storage (typically implemented by electronic RAM) of the editor process, and the one saved in a file on secondary storage (typically implemented by magnetic disks). The latest version is the one in primary storage, but the most reliable version is the one on secondary storage. When the programmers believes that the reliability of the latest version caught up with that of the saved version, he saves the module in the file, replacing the older version. Actually, typically the programmer save more often then this, to prevent memory loss due to a crash in the system or in the editor, or to switch off the computer at the end of the day.

It is well known that only two versions is not enough, for the following reasons.

If the saved version is correct and the programmers is editing it to add or change a feature but he is not finished yet, he must decide if it is better to save the work done to prevent a loss, but spoiling the correctness of the saved version, or do not save the work, risking to lose the work done in case of a system or editor crash. In addition, as it is quite easy to give inadvertently a “save” command, or to save voluntarily a version believed correct but that it is not, such saving would degrade the quality of the saved version.

Therefore every programmer keeps at least three versions: the first is the edited version in primary volatile storage, the second is the saved version in secondary persistent storage, and the third is a repository version in another part of secondary persistent storage. Often the second version is on a local device, while the third version is on a shared server device.

The copy from first to second version is performed rather often to prevent a memory loss, or when a version, that is somewhat believed to be correct, is to be tested.

The copy from second to third version is performed by the programmer when the software has passed the testing stage, and therefore it is strongly believed to be correct.

Actually, as it is very useful to have the source code of every version in use, every time a version of the software is released to users, a copy of it is performed on the same secondary device, and it is marked by a version code. The same version code is readable by the user on its system. In such a way it is always possible to get the source code corresponding to the version a particular user is using in a particular moment.


About Carlo Milanesi

I am a software developer in Italy. I have develop financial, engineering and commercial software using many programming languages, mainly C, C++, Visual Basic, Java, and C#. Now I am interested in Rust and TypeScript.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s