Start
Valera
is still working as a team leader in a large IT company in a large Central Asian country. There are several large-scale projects in operation, and judging by the beaming faces of marketing and sales specialists, soon there will be much more. At the same thought, Valera invites an invitation to the meeting, which he received from the technical director. The topic of the meeting is the expansion of the direction of educational systems.
The next morning, key referral staff gathered in the meeting room. The technical director (for those who are not familiar with him, his name is Ivan) immediately went to the heart of the question: “Greetings to all! As you know, some time ago we set a goal to expand our presence in the market and for this we opened a new sales office. So, this strategy worked. In a month we are signing an agreement for the development and implementation of a distance education platform. The project is very interesting, but not yet about it. To pull it, we urgently need to form a new team in the direction of educational systems. ”
“Opachki!” - flashed through Valera’s head. He clearly understood that there are very few free developers on the market now, and in a month it will be almost impossible to find the right amount of them. He shared these thoughts with colleagues. After some discussion, the participants came up with the following decision. Of the other teams in the direction of the new will be selected three strong specialist. And all the teams will be taken interns - yesterday's students or undergraduates who need to be trained. Train quickly so that the obligations of all projects are not affected. Valera becomes the team leader of the new team. Solved.
Two weeks later, a young guy uncertainly entered the new office of the new team. He approached Valera’s table and introduced himself: “Yerzhan is your trainee.” For the first time, Valera saw a person with whom he had just corresponded in the mail, 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 in the direction of the chair - “I am the very Valera who tormented you in absentia for the last week and a half. Our company has a rule that a mentor is attached to each intern. He 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. Please contact me with any questions. ” Yerzhan smiled: “Super! I think this will help me get up to speed at times and begin to solve real problems. ” Valera said to himself that the guy has the right motivation.
Motivation is motivation, but Valera still needed to understand how, in a few weeks, from a person tattered by the domestic education system, make a specialist who is able to solve problems independently. And to solve them qualitatively and in time. To do this, you will need to systematize all the experience that Valera received over the long years of his career, and try to quickly pass it on to the trainee. The task is not easy, but worth it. You look, somebody will write a book about it later.
In general, what to concentrate on? What distinguishes a bad programmer from a good one? Why are you afraid of one to give the task, knowing that you have to constantly connect, monitor the status and rewrite half of the code, and gave the other a statement, explained the details and calmly went about their business? Maybe one of them knows the programming language well, and the other is not very? No, not that. Valera has seen enough people who have studied more than one book on the programming language, but have not been able to design the simplest application. So wait ... design ... that's it! A good developer must be able to design. And on the development of this skill you need to concentrate first.
Now we need to bring this to Yerzhan. Valera began unexpectedly: "Requirements change always." Seeing the astonished look of his interlocutor, he continued: “Your main task as a developer is to implement the requirements of the users of the system being created. 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 clarify and often vary greatly. And you have to write code so that every time you find out that the functionality should work differently, you will be happy. Because the design you created makes it easy to fulfill these requirements, and the system will be a little better. ”
Valera spent some more time explaining to Yerzhan why correct design is so important. He spoke about how in the early stages of his career he worked with poorly designed systems. The need for even the slightest change in them caused panic fear in the whole team. After all, no one knew where the system would break after this change. And well, if the testers report the breakdown. Situations when business users reported this did not relate to Valera’s most pleasant memories.
Valera summarized: “The system, which we will begin to develop in a few weeks, is large and complex. And you will not sit there on fixing bugs. You will be a full participant in the development. So be ready to dive into the world of flexible object-oriented design. ” “Always ready!” - the phrase heard in some film jumped out of Yerzhan’s subconscious. 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 "Ideal Programmer" by Robert Martin. Asking Valera to explain why exactly these books are on the table, he heard in response: “The first book tells about the qualities of a good code. The second book talks about the qualities of a good programmer. I think they complement each other perfectly. One without the other does not happen. After reading these books, you can significantly speed up your development. In addition, good books inspire. This is important for success. ”
Having finished with the books, Valera briefly explained what system they would develop. Not long ago, the Ministry of Education created the Institute of Distance Education, which was tasked to develop a new model for the provision of educational services. As a result, the concept of a platform was born, on which teachers from different universities publish their courses, and students choose the right kit for themselves based on the curriculum. Each teacher specifies the price of passing his course. And students on the basis of the relationship 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, in general, will increase the quality of distance education.
“And our company must develop a platform for launching this model,” Valera continued to explain, “This will be a web-based solution and we will write it on the .NET platform and C # in particular. I now propose to discuss the modules of the system and select the one in which you will participate in the development and design. ”After a brief discussion, the colleagues decided that this would be a module for checking completed tasks.
Erzhan’s laptop has so far been from the technical service specialists, who installed all the necessary tools on it. Since they will give him only tomorrow, Valera decided to use this time so as not to discuss the details of a specific task, and instead convey to Yerzhan those things that every programmer must understand. And the sooner he understands them, the better.
Valera began with his favorite question: “What is object-oriented programming and why did they come up with it?” Yerzhan was surprised at the simplicity of the question and immediately replied: “Every student knows this. Object-oriented programming allows you to describe in the code objects of the real world. 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 talked about is true. But this is not the main thing. In fact, the main goal of the PLO is to combat complexity. Let me explain what I mean. Before the advent of OOP, procedural programming was the dominant development model. But as systems became more complex, the procedural approach began to slip. Maintenance and development of the code has become very time consuming. And all because of the fact that the procedures did not allow to properly separate the components of the system from each other; a change in some procedures influenced the behavior of others. OOP come up with in order to solve this problem. The object approach allows the program to be divided into independent and isolated components. And the change of some does not affect the behavior of others. In addition, the human brain is very weak and can not at once cover the entire system. A class allows you to concentrate on a separate part of the system, to understand and work with it, reducing the overall complexity of the task. ”
After thinking for a few moments and remembering his first project, Valera added: “It is also important to realize that using the OOP language does not automatically give all these advantages. I could see, how on the same C # wrote completely the procedural code with all accompanying 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 you do not think that now only OOP is used. There are other approaches, each of which is used in its own field. But for us, as for developers of corporate systems, OOP is very important. "
Starting with OOP, the next logical step was to tell Yerzhan about weak coupling (or loose coupling, if you 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 be as independent as possible. Then changes in one class will not affect another class. In addition, the system will be convenient to develop a team of programmers, distributing independent components between them. Weak connectedness is a quality to which one should strive with all his might. But making it harder than it seems. Relationships between system components can manifest themselves in different ways, both explicitly and implicitly.
After some time spent on explanations, Valera looked at Yerzhan’s thoughtful face and hurried to reassure him: “Do not worry if you don’t fully understand what I’m talking about. We are in the company of fans of flexible development methods and in the design adhere to the same approach. Starting tomorrow, you will start a real task and gradually hone your skills. And for today the theory is enough. I suggest you walk around the office, see how everything is arranged, and meet people. ”
Yerzhan hurried to take Valera's advice. The remaining time he spent on communication 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, describing the basic principles of object-oriented design. And it turns out that smart people have come up with ready-made recipes for solving various programming tasks. They are called design patterns. Of course, Yerzhan understood very little at once, he only had a strong desire to understand and learn how to write cool software.
So the first day of Yerzhan in his new company passed. After the clock showed 18-00, he said goodbye to his colleagues and headed home. But after a few minutes he came back, picked up the "Perfect Code" from the table, once again waved his hand to everyone and left the office.
To be continued…
PS This is the initial article in a series of articles about Timlid Valera, 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 fictional.