How to understand the “foreign” code and join a new team?
- Transfer

As soon as the developer enters the company and receives the task, it most often turns out that he needs to join some team’s common project, and not write his code from scratch.
Any code has its own logic, based on certain principles, in it there are patterns and technologies characteristic of the team to which the programmer has joined. But how to quickly begin to understand someone else's project, despite the fact that it is hardly small, and often there is no documentation at all, or is it insufficient and inaccurate?
We remind you: for all readers of “Habr” - a discount of 10,000 rubles when registering for any Skillbox course using the “Habr” promo code.
Skillbox recommends: The Frontend Developer Profession online course .
In fact, the best documentation is the code itself and those who created this code (provided that they are still somewhere nearby and have not left the company). How can I reduce time to a minimum and quickly get to work, making my contribution?
I have repeatedly encountered this situation over the last 15 years of my work as a programmer, and here are my thoughts on this subject.
Goals and objectives of the project
The first thing you should do is spend a little time understanding what task (s) the application for which you are creating code is performing. This is a global challenge; having solved it, you will cope with everything else.
You cannot work on a project without realizing why it is needed at all. Common understanding will allow you to quickly understand the little things. In addition, your own work will be carried out more harmoniously with the rest of the team. Brick by brick - this is how the house is built.
Architecture
After you have learned the main task, devote yourself to the analysis of code execution and its logic.
The architecture of some projects is rather complicated, especially if the basic technologies of these projects are not very familiar to you. At the very beginning, try to find technical documentation (or ask colleagues about it) in order to see the basic logic.
Keeping in mind the structure of the project, you will be able to start work faster, and so as not to interfere with the functioning of all the other parts that other team members are involved in.
The project may contain fragments that violate the general logic, but knowing the idea and architecture, you can fix the problem, rearrange or change the "bricks" so that they fit perfectly into the general building.
Patterns
There are a large number of patterns that developers use when writing code. These are structural patterns, “behavioral”, technological and others. All of them help to typify ways to solve common problems when designing programs.
Understanding what patterns are used in your current project will help at the class level to understand how functions should be built into the code. As a result, you will be able to create a coherent code that will correspond to the general logic and patterns, which ultimately will lead to a much smaller number of comments on the code, a better understanding of it and prompt elimination of errors if necessary.
Having worked a little on the project, you will be able to understand at a glance which sections of the code fit into the overall structure and what requires refactoring.
Guidelines
Most teams have certain rules, or rather, a set of rules according to which everyone acts. This is not only about the general principles of work, but also about the use of classes and application levels. If the team representatives are guided by the same guidelines, then the developed code is easier to understand and read.
Most likely, the team you join also has guidelines that you need to learn. First of all, they relate to the programming language, which is the main one during development.
You may ask where to get all the information about the project, its architecture, templates and guidelines. There are several methods for obtaining the necessary, except for those that have already been voiced above:
- Look for any information, even that which can be considered irrelevant; Build your own knowledge base of common terms, abbreviations, and concepts your team uses.
- Once this database is ready, you can discuss all issues of interest to you with the project manager, since you already speak the same language.
- In addition, it is worth talking with the application architects and team leaders about the overall architecture of your project. Then try to learn more about this architecture and the code optimization techniques associated with it. If you see something that, in your opinion, violates the general logic of the application, be sure to discuss this with team leader.
- Find out from your teammates what patterns and rules are used in the course of work on the code - both during writing and during further maintenance. Once you know the main points, compare what works best and act accordingly in the future.
- Try to clean a section of code from potential and real problems - this will help you get a deeper understanding of the project and its code. What does your team use to clean up the code?
Generally speaking, refactoring is the best opportunity to engage your team in a discussion of which guidelines should be reviewed and which ones should be used in the future.
Share your own experiences with the team, actively participate in working meetings, discuss current issues, the architecture of the application and its elements, templates and other important points. Work meetings can be a reliable channel for more information; it’s worth telling about their observations / achievements, about what can be useful to everyone.
As a result, you can not only quickly begin work, but also join the team, becoming its irreplaceable participant in a short time.
Of course, you will meet people with whom it is difficult to communicate; there will be problems with the code. But this happens almost always - there are teams where everything is perfect, but they are few.
Skillbox recommends:
- Practical course "Mobile Developer PRO" .
- Online course "C # developer from scratch . "
- Two-year practical course "I am a PRO web developer . "