📜 ⬆️ ⬇️

Team Programming Psychology

When several people work on the same project (code), the software development process begins to differ significantly. With this fact one cannot but agree. A number of additional factors come into play. The overall result is a decrease in development speed, and sometimes the quality of the software being developed can also decrease.

How to be then? After all, there are projects that can not be written alone. In this article I will try to show one psychological aspect of working in a team of programmers. I will arm you with some theoretical knowledge, thanks to which you can improve the efficiency of programmers and their overall emotional background.

What is the reason for the decrease in efficiency and quality of software?


Factors reducing the effectiveness of programmers can be divided into objective and subjective.
As I understand these 2 terms
Objective - this is something that does not depend on the point of perception ... A kind of constant, which do not change their value, at what angle you do not look at them. But the subjective factors are those that depend on the point of perception.

Subjective factors affecting efficiency

Rejecting banal interpersonal hostility, suppose that in our situation we have a team of several programmers with a sufficient level of emotional understanding and respect. However, even in such a team there may be problems.

The fact is that the programmer develops a sense of ownership to the code. After all, the code is something that he created, and it is something tangible (it can be seen on the monitor screen). The programmer can perceive the code as an object ( I wrote this code ) and as a space (when this code is open in my editor, I feel comfortable ). Thus, the code can be “mine”, “not mine” in the same way as a chair or as a room. This is my chair, and I'm sitting on it (I wrote this code). This is Vasya's chair, and Vasya uses it, and I am emotionally uncomfortable sitting on it (Vasya wrote this code).
')
I want to emphasize that we are now talking about the subjective self-identification of the programmer with the code that he sees on his screen.

A programmer, while working, may feel that this code is “his” or “not his.” This self-identification with the code is pretty important. If a person believes that the code is "his", then he:

Also, I note separately that we are now talking about revisions in the code. Reading the code and especially using (calling "other people's" functions) does not affect the emotional state of programmers.

Objective factors


There is also an objective component: it may be that the programmer knows this code, or does not know this code. By “know the code” I mean remembering the names of the functions and what they do. It is not difficult to notice that this knowledge is really objective - they either exist or not, and it doesn’t matter how our poor experimental programmer feels. In order to make the correct changes to the code, a person must know it objectively.

Concrete and Problem Statement


What do we have? A theoretical ideal state for a project would be: all programmers objectively know all the code and all programmers consider all code to be “their own”. But tell me, please, can one toothbrush have 2 hosts? Unfortunately not. Any programmer “touching”, making changes to the code, makes this code more “alien” in the eyes of the author of the code (the “current” owner).
Purpose : each programmer should work (the maximum possible time) with a code that he knows, and which he considers "his". That is the result is already possible to achieve.

The solution of the problem


In the process of software development, objective knowledge about the project and the subjective self-identification of programmers to the code will change. Our task will be to influence the distribution of knowledge and feelings of ownership in order to maintain the goal set in the last paragraph. The more the programmer knows about the project or the more code he considers “his”, the better. Porridge butter will not spoil. We have nothing to lower these things for, but it is always useful to increase them.
Another thing is that increasing these factors takes time from our programmers. And here the question of rationalization arises: programmers can spend 2 hours a day getting to know their project and 2 hours a day to increase their sense of ownership ... But then they will only have 4 hours a day to productive work: (.
Before we get to the issue of rationalization, let's look at the levers of influence. To enhance the objective knowledge of the code are suitable:

To enhance the sense of ownership of the code, the following methods are suitable:

Separate paragraph about code design standards (another way to increase the sense of ownership, just too long)

Code design standards (whatever they are) mainly aim at unifying the appearance of the code. So they make it easier to read the code, and they also contribute to increasing the identity of the programmer with this code, even if he sees it for the first time.
How does a programmer think
ABOUT! It is written as if I wrote

or
ABOUT! Look, but he also likes Zhiguli beer, and his sofa is as soft as I have at home! I feel comfortable here!


But it was not there. The code can be designed identically, but the logic that the code follows will differ from the one that our experimental programmer would use (our programmer would use the while loop, and the code is written foreach ). These differences between the logic of the code and the logic of the one who reads this code, and lead to the fact that a sense of ownership in the end is not created. That is why the requirements for the design of the code do not give the full expected result on the one hand, on the other hand they to a certain extent constrain the freedom of programmers and add another layer of bureaucracy.

One solution would be to force all programmers to think the same logic, to implant the one and only correct logic (or to detail the requirements for the design of the code up to when to use while , and when to use foreach ). But this is utopia. In addition, all people are different, and why "clone" 10 programmers for a carbon copy.
It is better to cultivate mutual understanding among programmers and help them get acquainted with the logic of their fellow programmers. In particular, code reviews, can make programmers know each other’s logic quite well. The magic of code review is that the programmer Vasya gets into his hands the code written by programmer Petya, but Vasya does not have to edit anything in it. He only studies the work of Petit and after that, tells Petya his thoughts (Vasya suggests Petya to change something in Petit’s dining chair, but the chair itself does not touch). While Vasya and Petya communicate, they manage to understand how and what both of them like. Thus, in the future, Vasya, seeing the code of Petit, will already feel much more comfortable knowing the logic of Petit.

Rationalization issues


How to find a balance between the fact that programmers continue the development of the project, but at the same time always worked on the code that they feel “their”? The answer to this question will depend very much on the context. I will only show you 2 of the most radical methods, and these 2 extremes are unlikely to ever be appropriate for use in a living situation, rather you will need to find a balance between these 2 opposites.

Method number 1. Separation of responsibility and "personal rooms"

If the specifics of your project allows you to:

then give your programmers little minks where they will be the sole masters of the situation. You will only need to clearly agree on how these “minks” will interact with each other, and the internal implementation of each mink will be taken over by its “master” (responsible programmer).
This is a rather radical approach, and therefore it has quite significant drawbacks:

Pros:


Method number 2. Forum

Forum - area for mass communication. Similarly, your software can be turned into an area for mass communication, when everyone will know all the parts of the project and will interact very closely with each other. The advantages and disadvantages of this method are practically the inversion of the advantages of the “personal mink” method.

Conclusion


In addition to the correct distribution of programmers and communication between them, it is also important to take into account the way the project is managed and developed. Is it often expected to change the vector of development and often change the current tasks of the project? Is this a mature project? Take into account the peculiarities of your programmers, maybe there is a genius among them, but he simply cannot accelerate and fly upwards under a huge amount of bureaucracy? How confident are you about the responsibility of your programmers and that they will not leave you halfway? Think and decide.

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


All Articles