How I brought Ruby to DomClick





At the end of 2017, I firmly decided that I wanted to move to a managerial job.



Programming itself attracted me much less than what happened at a higher level, namely thinking about business processes, planning application architecture, and organizing work.



I felt less like a gardener who cultivates a small patch of land day after day, watching the sprouts emerge through the ground, as a farmer who has to harvest and then sell crops from a giant field the size of a European country.



The scale and efficiency inspired me.



I wanted to do what I liked, but it was impossible until I became a leader.



In the meantime, my career in my current job has clearly reached the ceiling. For two years, I raised several projects, became a senior developer ... Further here it was possible to progress only in playing table football.



Therefore, when I was offered a job at Sberbank, I was glad to leave. Specifically - in DomClick.



DomClick



When I crossed the threshold of the new office, I found myself in a unique position: it turned out that I would be the only Ruby developer in the company.



In a team of three hundred employees, there was simply no physically appropriate department. There was nowhere to even put me. When this question arose, the company's IT director thought for exactly two seconds and pointed to a nearby table, which was empty for an obvious reason. It's so inspiring when management can see your laptop screen with a slight twist of their head (no).



I was needed for a specific task. Management was deciding whether to buy an American banking startup to complement DomClick's product line. The expenses were planned to be large, so it was necessary to adapt and launch the project to demonstrate to people who will get this money out of their pockets.



The startup was in Ruby, so I was needed. It was a chance. If they did buy it, more rubists would be needed. and with a high degree of probability I would become their boss. A small Alien larva trapped in a giant organism DomClick. I liked to think of it that way, imagining that from this moment my takeover of this universe begins.



But two months later, in the new place, it turned out that the violinist was no longer needed. The tops looked at the project I was working on and decided to wait.



Rubists don't belong here



I found myself out of work, a single Ruby programmer surrounded by dozens of well-coordinated teams of javists, pythonists and frontend developers. It was not planned to recruit any other rubists.



Fortunately, my management generally liked the way I did the job, so there was no question of firing. They also did not know what to do with me. โ€œWalk around for now, think about how you can be useful to the company. Maybe you can try some Go code? " - the chief told me. I was so unnecessary that at some point it stopped feeling like a bad idea. To imagine the despair of my situation, you need to understand what was happening in the company then and what DomClick is in general.



If in the last 5 years you have bought / sold real estate, then with a high degree of probability you should know about this site. In particular, because of him, NTV no longer makes serials about bloody realtors and we do not hear these chilling stories about how someone was kidnapped / tortured / killed when he decided to exchange his grandmother's kopeck piece in the center. DomClick offered the market a convenient and safe way to buy / sell housing.



The project was still young, but already at that moment everyone understood that they were present on the eve of a grandiose nix. A gigantic website is born with dozens of services that will be used throughout the country and beyond. It will take millions of lines of code, which means that a lot of programmers will be able to feed their families for years, buying vouchers for mothers-in-law in a sanatorium, and seals for wives.





But first it was necessary to decide on what these services would be written. Unfortunately for me, the discussion was closed by the time I arrived - the cup was divided between the developers in Java and Python. Javists were mainly engaged in internal and loaded services, integrations with the bank, and pythonists got more client-oriented tasks and new launches. Each of them was preparing to buy an apartment and a block of Tesla shares in the next 5 years, go to Baฬ’li and find an instamodel girl.



To wedge between them with some other technology was unrealistic.



Usually, the birth of a new project took place in this way: the business had an idea, they went to the IT director, and he was already selecting a vacant team of programmers for the project, or recruiting a new one.



What could one Rubyist do in such a situation? Could I raise my hand and say, "But Ruby already has gems ready for all this"? This would be a completely lost case for three reasons:



  1. Everyone thought Ruby was unnecessary. Python and Java are enough for the eyes.
  2. Besides the fact that Ruby is unnecessary, it is also just a bad programming language. Absolutely not rubbing.
  3. The third reason, perhaps the most serious: I am the only Ruby programmer in the company, which means that I will not pull work on anything more or less serious.


In general, one way or another, but there was a consensus in the company: there is no place for Rubyists. My appearance was an accident, confirming the rule - I was strongly advised to start coding on something else.



But a person who has learned the power of rails cannot be easily stopped.







Ruby



Despite the status quo of "Ruby is bad", everyone knew about its strength - development speed. I decided to take advantage of this and suggested to the authorities to make prototypes of the services that were planned to be launched. Kind of like "let me quickly write a sample of your startup, and then it will become clear for sure whether it is worth rewriting it in a" normal "language or, better, just for scrap".



The idea was appreciated and blessed. This was my second chance. The bluebird of luck was practically fluttering in my hands when I felt like I was losing the race. After a small MVP, the business threw me the functionality that I wanted to see in the trial version of CRM, and it was a completely overwhelming amount of work, despite the speed of the initial launch. By the forces of me alone, even charged with unwillingness to cross into pythonists, it was impossible to make the required probe in the foreseeable future.



I sat in front of my laptop and watched gloomily as I was getting more and more late. Along with the last hope to remain a rubyist, career ambitions were also gone: one Pasta Monster knows how long it will take to achieve in a new language the competence necessary to shout out his name again in the election of a new Kraken.



This is not counting the fact that changing the language, for example, in Python, I automatically get 150 more deserved rivals for promotion.



It was a dead end.



The task was removed from me and returned to anxious thoughts about my future. I watched Versus battles, listened to depressing music and drank Dr. Pepper. Apparently, due to the abundance of sugar, the solution appeared quite quickly.



I learned a lesson from the last fiasco: you can't bite off a piece that you can't chew. People see how you were made a fool and remember. One or two more such attempts, and they will put an end to me here, deciding that I am a failure.



Now we need a task about which I will know for sure that no misfires will happen. Big enough to be impressive, but small enough to be within my reach. But where can I get one and how can I get it assigned to me?



The easiest way to find such a task was within the framework of an already developed project. The plan was to pretend to be a Java developer.



Troublemaker



The Javists were doing well. At first, it seemed to me that I got into a team of real true coders, working with clear patterns and interfaces. I had never felt as much of a programmer before as I did that couple of weeks.



Due to my superficial knowledge of almost all popular web languages, I quickly adapted and began to be useful. The work was in progress. The project was even launched in several regions to start catching bugs. The problem was that the movement was very unhurried, despite the fact that there were five of us. I made a discount on the fact that it should be so, because this is an enterprise, you need to understand, but it quickly became clear that everything is much more serious.



The team was in sharp conflict with the product owner. They swore, almost without choosing expressions.



The first line of code was written a year and a half ago, but the project still hasn't really worked. A good business idea ran into unexplained problems during the implementation phase. The main complaint of PO, acting as an intermediary between the business and the programmers, was the impossibility of making quick changes. When asked for any revisions, he heard: "Month, month, month." And a lot of edits were required. The system was so inconvenient that one operator could process a maximum of one or two requests per day. The functionality seemed to work, but there were so many bugs that by launching it all over the country, one could simply drown in complaints. Some operations were performed only upon a call to the programmer, who manually changed the data in the database or voiced the necessary information. The user interface was crooked. There was no question of any automation.



And amid all these problems, programmers managed to invent bicycles like a self-written analogue of tables or a mailing list service. The slightest improvements led to the fact that something somewhere must fall off. Every conceivable deadline has long been squandered.



And do you know how the programmers explained to themselves what was happening? "PO is stupid and all his suggestions are about nothing."



It seemed to me that the point was not in PO, but in the code. When the next urgent task arrived, I realized that it was time to rip off the masks. It was necessary to make a system of questionnaires, according to the results of the passage of which a finished document will be formed. The programmers from my new team, after consulting, voiced the PO that they would do the required in three months with the efforts of two developers.



Three months and two programmers!



The sofa under the PO was smoking. He turned green, but, taught by bitter experience, he was silent, knowing that it was useless to ask, beg or complain. The prospect of dismissal loomed ahead. But the furniture was smoking not only under him. I knew for a fact that the functionality I just announced comes up in Ruby at the click of a finger.



โ€œI'll write this in a week,โ€ I made a move. - And I still have time to review all battles with Oksimiron.



The task was exactly what I was waiting for to break into this game of thrones.



PO didn't believe it. The team too. In their Universe, the minimum unit of time was a month, but the deadlines were really burning, so after a short settlement of the formalities, a week was given to me.



As you probably know, Ruby is godlike for speed development. I would twist my heart if I said that I was trying hard or was in any way worried about my third chance. The gem that solved my problem was perfected in Ruby and ran like clockwork.



After a week, I showed the result.



- Why don't we do everything in Ruby then? The product owner asked. To be honest, I still don't know the answer.



We had a frank conversation that day. Ostap suffered, and he revealed to me the true state of affairs. The project turned into a hellish long-term construction. The immediate PO bosses had already directly hinted at his dismissal. He stopped sleeping. I sympathized with him and asked him to describe all the logic that the application had to execute. By the time he finished, it became clear to me that with two comrades I would rewrite the entire project in three months.



The programmers of the project were not bad people or saboteurs. They really tried. It's just that their tool was not suited to the task. They dug a foundation pit with spoons. But I had a bulldozer.



Fourth chance



When PO and I came to the CIO, he seemed to have already begun to understand that it had not worked out to baptize me again, and he was curiously expecting what I had come up with this time.



I suggested to rewrite the project. In three months with two assistants, I will completely repeat the functionality that 5 programmers have done in a year and a half, and I also throw chips on top. In turn, RO confirmed that this was necessary: โ€‹โ€‹the project code began to live its own life, practically does not react to attempts to make changes and, it seems, will soon begin to demand human sacrifices in the form of virgins.



It was decided that the final decision on this issue will be made at the next architectural committee - a special meeting where directors gather with architects and approve some kind of process.



As you might guess, the fact that you are reading these lines suggests that I was allowed to rewrite the project. With a minimal majority of votes, the Archcommittee gave the go-ahead for this adventure. Among other things, I was allowed to recruit two rubyists as assistants.



I finally became a leader.





As I understand it, not the last role in the approval of my initiative was played by the fact that the management began to realize that some of the company's programming teams were relaxed and overly confident in the future.



They needed a whip, a threat, to motivate them to work better. A kind word and a gun can achieve much more than just a kind word, as Al Capone used to say.



And I put this pistol in their hand.



Giving the go-ahead to rewrite the project, the bosses seemed to be telling the company's programmers: "If you screw up, we'll call this guy and they'll rewrite you."



But first, I had to not fail the task, which became my fourth chance. When I returned from the meeting, it was a completely different company. Now they hated me. My conflict with the DomClick software ecosystem, which began from the very beginning, reached its climax. They did not talk to me, did not sit at the same table in the dining room. As soon as I entered the room, all those present began to examine me. They whispered behind my back. I found myself in complete isolation.



To be honest, such a reaction gave me strength. Life is filled with meaning when you feel like the cutting hand of the Lord. I decided I would be a very good pistol.



Literally that evening, I called an old friend who was coding in Ruby, and I was sure of his professionalism. He agreed to join without further ado. A couple of weeks later, the second developer came and turned out to be a really tough guy who greatly strengthened our little detachment.



The company's programming organism rejected us. They did not communicate with us. Everyone was waiting for our failure. And paradoxically, it brought us together and made us grow.



A feature of Ruby is its high development speed. For some reason, it is believed that this is at the expense of quality. They say that a perfectly executed project in Ruby will be worse than an ideal project in any other language.



But where have you seen the ideal designs?



Developers almost always do not have enough time to write high-quality code, strictly adhere to patterns, doing everything like in textbooks. As a result, this most ideal code, which everyone so threatens, never appears.



But Ruby, due to its speed, allows you to get the same excess time that can be spent on thinking about architecture and looking for better abstractions. The resulting code, paradoxically, also turns out to be of the highest quality.



When we rolled out a new version of the project three months later, apart from minor bugs, it worked perfectly. The end users of the project - the lawyers of Domclick - were initially unhappy, because the user interfaces had changed, but after a couple of weeks their voices died down. The project worked like a clock. It was deployed almost immediately to all of Russia.



RO was happy. The old project team was disbanded.



I was allowed to recruit two more programmers.







My little barrage platoon turned into a full-fledged company. They hated us, but there was nothing they could do.



My guys felt the peculiarity of their position. They rushed, and they succeeded. There was a feeling of flow - a state of maximum concentration and readiness for action. We could quickly and efficiently rewrite everyone here.



This spurred the whole company.



In addition to the fear of being overwritten, there was a healthy sense of competition. If these newcomers can work so quickly and efficiently, then why are we worse? We will defend our own company! Let's throw these upstarts back into the underworld from which they came!



Part of the team raised the glove thrown by the rubists, and this benefited the whole company. In fact, the team divided into brothers and lachers.



Brothers skip the patterns, are always ready to help, think about the benefits of the company and the success of their project. Lachers are playing for time, do not admit mistakes, do not want to relearn and negotiate. You do it clearly - brother. You are stupid, you put a spoke in the wheels, you harm, you want to earn a lot, but to do little is a lacher.



We did a great job and set the Ruby banner over the conquered DomClick when the final boss of this story came out on me.



At one of the meetings in high offices, after a long story about a new project, a very intelligent man asked in a low voice: "Show me this on Monday."



And there was nothing to show. It was Friday evening. When I was called to the meeting room, tense faces were sitting around and holding their heads with their hands, thinking what to do. The minimum period for which the others were ready to complete the project was โ€œnot less than two weeks,โ€ but it was three days. I agreed.



The whole company was waiting for how it would end. Ordinary employees with curiosity, bosses with a sense of impending disaster. And when the sun rose on Monday, no one had to write a letter of resignation, shoot themselves or flee across the state border.



Everything worked in production. The buttons were pressed, the pages were refreshed, and everyone was happy. And somewhere in Moscow, three unshaven programmers were asleep like death.



When I picked up the phone in the evening, I was told the main three words in my life: "Hire more programmers."



As of today, the Rubyists department is about 20 people, 6+ projects of varying complexity, and we continue to expand.



And now the moral of the story.



Once, at one of the quarterly meetings, a question was asked to our permanent leader: "How can I become a leader?", To which the quote was given: "they don't give power - they take power." Be effective, strive for success, and if you're really willing to get better every day, you will succeed.



In general, life is too short to write long code. Use gems, friends!



PS Also, here is a video with our performances, from which you can understand what allows us to be fast and efficient:








All Articles