📜 ⬆️ ⬇️

We organize the work of a small team of programmers at opensource

Would you like to know who and when changed the line n in one of the source files of your program or site? Would you like to be able to undo the changes in the code made a week ago, after the new feature was ready? Would you like to make the work of two or more programmers on one project transparent, simple and easily controlled? Or maybe you want to be able to have access to the source code of the version of the program while not worrying about timely backups?
Good news: all this, perhaps more than that, is simple and free. In this article I will tell you how to do it.

Who needs it?


This article was written for those who are not yet using the version control system. Probably, I have not heard of them, and perhaps I was afraid to deliver them, thinking that it is very difficult or requires some special technical means (my own server, etc.).
For those IT professionals who have grown to the level where they themselves are too lazy to write the code, and the income allows you to hire someone to help you, the article will be doubly useful, as I will tell you about the option of setting up a working process with hired people, when tasks and their implementation are monitored MUNT and Subversion buggy BELT helpers.
So let's get started ...

Story about us


Not so long ago, I was “grown up” to a level where I can afford to hire people to write the code of my programs. My first employee is a 2nd year student who could program. I wrote assignments to him, he performed them, came to me and showed what he had done. We discussed the shortcomings and merits of the program, and he left to finish it. Found errors and wishes were recorded in the TXT file, and when the student came to me again with the new version of the program, in this file there were already “+” and “-” opposite each task.
It quickly became clear that it was impossible to work this way. It was very inconvenient to keep track of what was done wrong, suggestions for particular specific shortcomings. The part was lost, the part was deleted unintentionally, etc. Even the transition to Word did not help ... J
The solution was the installation of Mantis. Mantis is an error management system located on the server. Simply put, a user-friendly interface that allows you to track work on a specific error and comment on the implementation process. The database is located on the server, therefore, all you need to work with Mantis is an internet connection. This is not the only such system, there is a whole bunch of analogues . Of these, the most popular is BugZilla . But I personally like the Mantis convenience more, so the choice was on it.
After installing Mantis, the process began to work differently:

This approach lasted more than a year. Indeed, this is the minimum that allows you to track the process of implementation and roughly plan the dates. But the disadvantages of this approach make us look for a new version of the organization of labor:

The last flaw is fixed with Subversion. We will talk about it below. But besides him, there are still a number of trifles that make the work of several programmers not only possible, but also convenient ! To understand this, I worked for several employers. The result that I am talking about now is an experience that I had due to “work for my uncle”. I can say that not everyone has done as comfortably as mine, and I am very proud of it :).

Organization of the workflow with us


')
This is how the process of creating a program is organized with us now.
  1. I am writing a technical task. The task is divided into subtasks. All subtasks are recorded in separate bugs in Mantis. In addition, for each task, time is estimated and this estimate is entered in Excel (alas, for now only in it :(, it can be more convenient ...). Thanks to Excel, I can roughly imagine when I get the finished first version of the program, and the programmer has a list of tasks in Mantis and the technical assignment, which describes in detail what and in what order to do.
  2. For each new program I create a new Subversion repository (repository for code). I add accounts for myself and the programmer.
  3. The programmer creates a working copy of the repository, in which he works in the future.
  4. After completing a subtask, the programmer makes Commit into the repository and closes the bug. During Commit, automatically:
  5. When I receive the letter, I can immediately update the working version of the code, check the part of the code that has been changed (that is, is related to a specific task) and write a comment if necessary, or rediscover the error.

This method of organization allows to achieve the following:

And now, the most interesting ...

What is needed to organize the work of several programmers on a single project, and how much does it cost?



The answer is very happy. If you are reading this article, it means that you already have everything you need: a computer with an internet connection. Not even a dedicated IP address is needed :). Well, except for Mantis you need the usual virtual hosting for $ 1- $ 5 / month. But if you are an IT specialist, then you have it for sure.
Immediately make a reservation that about the installation of Mantis, I will not tell. This process is described in many articles, it’s enough to google a little bit. Let me just say that to install any special skills is not required. The installation itself takes 20 minutes - an hour. If you did not work with the system, then you will need a day to figure it out.
We assume that you have your own virtual hosting and it already has Mantis installed. You have decided to organize the work of several programmers on one project. You need Subversion for this.

What is Subversion?



Subversion is a free, open source version control system. Subversion allows you to manage files and directories in time. The file tree is placed in a central repository, which is similar to a regular file server with the difference that it remembers every change made to a file or directory. This allows you to recover early versions of data, examine the history of data changes. Due to this, many consider the version management system to be a kind of “time machine”.
Subversion is specifically designed to replace CVS, the most common open source version control system. It has all the basic functions of CVS (although it performs some of them in other ways) and is devoid of some of its drawbacks.
Subversion is often called “svn”, after the name of the client program included in its distribution.

Where can I install Subversion?



Ideally, on a server that works only on an intranet LAN. But I have another case: all employees are remote, so the server should provide access to the repository via the Internet.
In my situation, it is convenient to install Subversion on the server at the hoster. Then the repository will be available 24 hours a day at a decent speed. But, alas, there are some drawbacks. If you are working on a commercial project, the theft of the source code can cause very significant damage to your business. In order to protect against theft, you do not need virtual hosting, but a VIRTUAL SERVER. And this pleasure costs from $ 30 / month. and before hoo hoo. In addition, the placement of source codes even on a virtual server does not protect against a dishonest admin, who can merge the entire repository onto a USB flash drive, directly from the computer (perhaps paranoia, but it’s not enough ...). At the same time, no one hoster with his own money will legally guarantee the safety of the data: (.
I chose another way - to keep the data on my computer with Windows XP. This method has a definite plus - all the source code from you and no one steals it from you. But the speed of access to your computer will surely be less than that which the hoster can give, and your employees will have a repository only when your computer is turned on.

In the next article I will lay out step-by-step instructions on how to install Subversion on my computer ...

UPD: The second page with step-by-step writing of the Subversion installation process on Windows XP and instructions for linking Camites to Mantis is here . If anyone wants to keep the code of his program at his place and at the same time wants a convenient organization of work - an article for you.

Source: https://habr.com/ru/post/86065/


All Articles