How Valera took the intern as a team and began to teach his design

    Start


    Valera still works as a team leader in one large IT company in one large Central Asian country. There are several large projects in the work and, judging by the radiant faces of marketing and sales specialists, in the near future they will become much more. To the same thought, Valera is prompted by an invitation to a meeting that he received from the technical director. The topic of the meeting is to expand the direction of educational systems.

    The next morning, key staff members gathered in the meeting room. The technical director (for those who are not familiar with him yet - his name is Ivan) immediately went to the core of the question: “Greetings to all! As you know, some time ago we set ourselves the goal of expanding our presence in the market and for this we opened a new sales office. So, this strategy worked. A month later, we sign an agreement on the development and implementation of a distance education platform. The project is very interesting, but not about that yet. To pull it, we urgently need to form a new team in the direction of educational systems. ”

    "Squads!" - flashed through Valera’s head. He clearly understood that now there are very few free developers on the market, and in a month it will be almost impossible to find the right amount. He shared these thoughts with colleagues. After debating for some time, the meeting participants came to the following decision. Three other strong specialists will be distinguished from other teams in the new direction. And interns will be accepted into all teams - yesterday’s students or older students who will need to be trained. Train quickly so that obligations on all projects are not affected. Valera becomes the team lead of the new team. It is resolved.

    Two weeks later, a young guy hesitantly entered the new office of the new team. He went to Valera’s table and introduced himself: “Yerzhan is your intern.” Valera first saw a man with whom he had only corresponded in the mail before, gave tasks and checked their solution. And with which he will have to work for a long time on one of the most important projects of the company.

    “Sit down,” our hero waved toward the chair, “I am the same Valera who tortured you in absentia for the past week and a half. Our company has a rule that a mentor is attached to each intern. It helps the trainee in completing assignments, gives recommendations on what and in what order to study. In general, my task is to tell you everything that I know myself. Contact me with all questions. ” Yerzhan smiled: “Super! I think this will help me get into the course of things many times faster and begin to solve real problems. ” Valera said to himself that the guy has the right motivation.

    Motivation by motivation, but Valera still needed to understand how, in a few weeks, to make a specialist capable of solving problems on her own from a man battered by the domestic education system. And solve them efficiently and on time. To do this, you will need to systematize all the experience that Valera has received over the long years of her career, and try to quickly pass it on to the trainee. The task is not easy, but worth it. You look, someone will write a book about this later.

    But in general, what to concentrate on? What distinguishes a bad programmer from a good one? Why are you afraid to give one the task, knowing that you have to constantly connect, track the status and rewrite half the code, and give the statement to the other, explain the details and calmly go about your business? Maybe one of them knows the programming language well, and the other is not very? No, not that. Valera had seen enough of people who had studied more than one book on a programming language, but were not able to design a simple application. So wait ... design ... there it is! A good developer must be able to design. And the development of this skill must be concentrated first.

    Now we need to convey this to Yerzhan. Valera began unexpectedly: “Requirements always change.” Seeing the surprised look of his interlocutor, he continued: “Your main task as a developer is to implement the requirements of users of the created system. So, users are very windy creatures and never immediately know what they need. Only after they see the first version of the system, their requirements begin to become clear and often change greatly. And you have to write code so that every time you find out that the functionality should work differently, you are happy. Because the design you created will make it easy to implement these requirements, and the system will become a little better. ”

    Valera spent some more time explaining to Yerzhan why proper design is so important. He talked about how he worked with poorly designed systems in the early stages of his career. The need for even the slightest change in them caused panic in the whole team. After all, no one knew in what place after this change the system would break. And it’s good if testers report a breakdown. Situations when business users reported this did not belong to Valera's most pleasant memories.

    Valera summed up: “The system that we will begin to develop in a few weeks is large and complex. And you won’t be sitting there fixing bugs. You will be a full-fledged participant in the development. So be ready to dive into the world of flexible object-oriented design. " "Always ready!" - the phrase jumped out of Yerzhan’s subconscious mind. He also thought that he was starting to like it here.

    First day. First truths


    When the next day Yerzhan came to his workplace, the first thing he saw was two books lying near the monitor. "Perfect Code" by Stephen McConnell and "Perfect Programmer" by Robert Martin. Asked Valera to explain why these books are on the table, he answered: “The first book talks about the qualities of a good code. The second book talks about the qualities of a good programmer. It seems to me that they complement each other perfectly. One cannot exist without the other. After reading these books, you can significantly accelerate your development. Plus, good books inspire. It is important for success. ”

    Having finished with the books, Valera briefly explained which system they will develop. Not so long ago, the Ministry of Education created the Institute of Distance Education, which was tasked with developing a new model for the provision of educational services. As a result, the concept of the site was born, on which teachers from different universities publish their courses, and students, based on the curriculum, choose the set they need for themselves. Each teacher indicates the price of completing his course. And students, based on the ratio of price and quality, choose the best option for themselves. The Institute assumes that this mechanism will lead to stimulation of competition between teachers and generally improve the quality of distance education.

    “And our company must develop a platform to launch this model,” Valera continued to explain. “It will be a web solution and we will write it on the .NET platform and C # in particular. "I propose now to discuss the modules of the system and choose the one in the development and design of which you will participate." After a short discussion, the colleagues decided that this would be a module for verifying completed tasks.

    Yerzhan’s laptop was still owned by technical service specialists who installed all the necessary tools on it. Since they will give it only tomorrow, Valera decided to use this time so as not to discuss the details of a specific task, but instead to convey to Yerzhan those things that every programmer should understand. And the sooner he understands them, the better.

    Valera began with his favorite question: “What is object-oriented programming and why did it come up with?” Yerzhan was surprised at the simplicity of the question and immediately replied: “Any student knows this. Object-oriented programming allows you to describe real-world objects in code. Suppose there is a car, it has wheels and other mechanisms. "We can create an appropriate class and use it to drive a car and use it in the program."

    The time has come for Valera: “What you spoke about is true. But this is not the point. In fact, the main goal of OOP is to combat complexity. I will explain what I mean. Before OOP, the dominant development model was procedural programming. But as the systems became more complex, the procedural approach began to slip. Maintenance and development of the code has become very time-consuming. And all due to the fact that the procedures did not allow to properly separate the system components from each other; a change in some procedures influenced the behavior of others. OOP was invented in order to solve this problem. The object approach allows you to divide the program into independent and isolated components. And changing one does not affect the behavior of others. In addition, the human brain is very weak and cannot at one point in time cover the entire system.

    After thinking a couple of moments and recalling his first project, Valera added: “It is still important to realize that using OOP language does not automatically provide all these advantages. I have seen how completely procedural code was written on the same C # with all the attendant problems. You need to understand object-oriented programming and object-oriented design and be able to use them correctly. Then you will have a happy and fruitful career. And do not think that now they use only OOP. There are other approaches, each of which is used in its own field. But for us, as developers of enterprise systems, OOP is very important. ”

    Starting with OOP, the next logical step was to tell Yerzhan about weak coupling (or loose coupling, to use English terminology). Classes allow you to divide the system code into separate parts - this is good. But it is even more important that these parts know as little as possible about each other and are as independent as possible. Then changes in one class will not affect another class. In addition, the system will be conveniently developed by a team of programmers, distributing independent components between them. Weak cohesion is a quality to which we must strive by all means. But to do it is more difficult than it seems. Connections between system components can manifest themselves in different ways, both explicitly and implicitly.

    After some time spent explaining, Valera looked at Yerzhan's pensive face and hastened to reassure him: “Don’t worry if you don’t fully understand what I'm talking about. We at the company are fans of flexible development methods and in the design we adhere to the same approach. Starting tomorrow you will begin the real task and will gradually hone your skills. And for today, the theory is enough. "I suggest you walk around the office, see how everything is arranged here, and meet people."

    Yerzhan hastened to take Valera’s advice. He spent the remaining time communicating with his new colleagues. And each of them gave Yerzhan a portion of new information. So, he learned that there is a magic abbreviation SOLID that describes the basic principles of object-oriented design. It also turns out that smart people came up with ready-made recipes for solving various programming problems. These are called design patterns. Of course, Yerzhan did not immediately understand much, he only had a strong desire to understand all this and learn how to write cool software.

    So passed the first day of Yerzhan in his new company. After the clock showed 18-00, he said goodbye to his colleagues and headed home. But a few minutes later he returned, picked up the "Perfect Code" from the table, once again waved his hand and left the office.

    To be continued ...

    PS This is an initial article from a series of articles about team leader Valeru, trainee Yerzhan and flexible design. The following articles will describe the thorny path on which Yerzhan will implement the requirements, write a lot of code and at the same time study the principles of flexible object-oriented design.

    PPS The very first article about Valera can be found here .

    PPPS All matches with real people and events are fictitious.

    Also popular now: