From Android developer to DevOps

    We continue a series of articles about those who do their own projects. With  Stepan Goncharov, we talked about how to organically change the direction of professional activities, and at the same time from an Android developer to retrain in DevOps. They asked about the release cycle and the processes in Grab  , a company in which 40 people are developing only for Android. They wondered about where to get ideas for games, asked Stepan Archetype and kOptional about OpenSource-projects .



    About the guest : Stepan Goncharov ( stepango) develops applications and games for Android since 2008, since those time immemorial, when the Android SDK has not been released. During his career, managed to visit the role of QA, manager, marketer, blogger, analyst, adviser and many others. Participated in the development of as anyone unknown applications, and applications with millions of users around the world. He currently works at Grab, actively uses Kotlin and Rx and devotes more and more time to OSS.

    Here is the text transcript of the Run Loop podcast . Moderators: Ilya Tsarev, Alexey Milyaev and Roman Busygin.

    Ilya: Tell us what Grab is directly involved in and what is your role. Do you just write code or something more?

    Stepan: Initially Grab is a ride-out service. You can order a taxi, they will come to you, pick you up, take you to. But lately, the company has been increasingly acquiring additional services, such as food delivery and its payment system. When I came to Grab, I was in charge of the driver application development team. Then he switched to the passenger application. One of my recent projects was a complete redesign of the passenger application . Now I do more DevOps - CI setup, build time optimization and all that.

    Devops


    Alexey: Stepan, and if it's not a secret, why did you decide to switch to DevOps and CI? I often hear such a story when mobile developers come to the platform, are full of enthusiasm, pumped to incredible heights, and then decide to suddenly go for some non-food tasks.

    Stepan: Actually everything turned out, I would say organically. While I was developing the application, we had an emergency migration to GitLab because CircleCI instances could no longer build our project. It turned out to be too big and ate a lot of memory, and there were no suitable CI instances. Somehow, I was stuck for several weeks trying to migrate our processes and in general everything related to CI on GitLab. Then, after the project ended, we formed a new platform team. While I spent 3 weeks on vacation, all the other tasks were taken, so when I returned, I was told: “ That's it, you’re working on optimizing build speed and CI”.

    Different roles and activities


    Ilya: We also have birds - not the ones that are microphones, buttonholes, but still they told you that you had been a QA, a manager, a  marketer, a blogger , and an analyst - in general, went through many different classes . Please tell us in more detail how it drove you into all of these roles, how long have you been in them, what did you like in each, did you not like? Maybe you would love to back to the bloggers?

    Stepan: In principle, in each of these roles, somehow it organically turned out to flow smoothly from one to another. It all started with the fact that I became interested in Android development even before the release of the first device on Android. I was interested in the idea itself - the Java operating system is somehow unusual. As a result, while I was studying at university, instead of doing laboratory work on C or other boring university tasks, everything smoothly reduced to Android. The teacher was not against it, he was also interested in learning something new, and I wrote Android applications.

    By the time I finished my undergraduate degree, I already had some experience. I wrote my first application, released it to the Market, and this was where the marketing passion began . I had my own application, and I had to somehow promote it. I started to indulge in a bit and write blogs.

    In 2010 I found the work of an Android developer, then it was almost unreal - there was no market, nobody knew about Android. I got into an outsourcing company, and I had to recruit a team, having only six months of experience and 2 published applications.

    So, from marketing and blogging, I went back to development. Then he graduated from the magistracy, moved to St. Petersburg - also to outsource. There I started to get involved in automated testing, and it turned out that I developed Robotium in the company and taught QA how to write automated tests before I  left for Singaporewhere again I recruited my team to one of the Singapore startups. Already after that, I began to further develop in Android development. Now I am in Grab - first in managers, then in DevOps.

    Roman: Stepan, tell me, please, do you not miss this time when your tasks have changed dramatically enough? Now, roughly speaking, you saw DevOps every day - and that's all?

    Stepan: Actually, not yet. I recently completed a big project, and in principle, there are still enough tasks. They may seem, of course, the same - that is, the goal is the same, but what I do is a lot of different things , including, for example, memory-profiling, working with CI. Now I look at Amazon analytics on S3. This is all for me while new. I do not think that I will be engaged in exactly CI and optimization of assembly time. Most likely, for example, in the next quarter I will switch to something else.

    Roman: For example, I have a cycle of transition from one direction to another, about 2-2.5 years . I started with testing, then switched to load testing, then I became a developer. How often do you have a change of interests and directions in the work?

    Stepan: Somewhere around 1.5-2 years. But recently it turned out for half a year.

    Games


    Alexey: What would you most like to do? Ideally, maybe you would like to leave the development, do not touch anything with your hands? Or maybe you, on the contrary, would like to dig into some deep native things? What do you specifically want most?

    Stepan: This is a good question! I actually never decided. I still wonder a lot of things . One of the most interesting for me, where I could not get, is the development of games. While studying at university, I was fond of writing all sorts of games. I had projects in Flash. My second Android application was also a game. I even worked for a month in a gaming company, but somehow I didn’t have it.

    Basically, I would like to try game design.but this is still complicated. The longer I spend time and develop in Android, the more difficult this transition will be, if it happens at all.

    Ilya: Step, if we touched on the topic of games, then the question is - what was your first game about?

    Stepan: It was 2010, so it was pretty simple. It was a logical puzzle with lasers and mirrors that had to be turned in such a way that the lasers hit the target. Unfortunately, this game was hosted on the account of the then my employer. This account has long since retired and there is no game there. But I really liked her. It was written entirely on the Android View, which of course I regret, but the experience was excellent.

    Ilya: And now you find time to develop games?

    Stepan:Not. Absolutely not enough time to play now. Besides the fact that I work in the company, I also organize Kotlin-mitapes in Singapore and speak at conferences. That is, free time is completely clogged. Maybe someday I will come back to this. I recently bought Google VR to try Unity when there will be time, but so far they have failed.

    Roman: And tell me, please, where did you get ideas for games? How did they come to your mind?

    Stepan: Ideas for games usually come to me from technical innovations. I usually watched some technological demos, or, for example, in 2008-2010 there was a fashion for physics engines. You see some cool technology or a new fashion shader, and the  ideas themselves appear based on what you see.

    Novel:Is your hobby related to making games with the fact that you are a gamer yourself - you play at PlayStation, at Switch, on PC - is there any correlation?

    Stepan: Yes, I think that is. As a child I had a Sega, then a PC, I spent a lot of time playing games. Now I have both the PlayStation and the Switch, but now I spend much less time on games , I don’t even have enough of it to play.

    Roman: And what games do you remember most? Or what genre of games do you like best? For example, I like shooters or some kind of Survivor-horror.

    Stepan: I somehow didn’t work with shooters. I played Counter-Strike in my childhood, but it didn’t tighten. One of the favorite games is Space Rangers-2., and the first part is also epic, of course. Then from memorable it was a freelancer .

    Alexey: Freelancer is a game? This is a lifestyle!

    Stepan: Actually, this is a space simulator, roughly speaking, very close to the Space Rangers, but from the third person. Another Witcher, Arcanum, and Fallout - like that.

    Ilya: It seems to me that developing games is the dream of most programmers . As it always seemed to me, people generally go into development just to make games. This is super cool! My first project on iOS - it was also a game, by the way. What do you think about it?

    Alexey: I heard that for many people, the way to programming really starts with the fact that they want to make a game, they like to play games, they want to understand how to do it. For some reason I did not have this. I was more interested in how the programs work - what happens when you click on windows in windows. But at some point I realized that I had no idea how to make games. I understand how you can write this or that application on a mobile phone, this or that program on a PC - I didn’t imagine how to make games. Somehow I was so carried on  the YouTube channel. There, a dude in Java and Canvas wrote his toy from scratch - a clone of some RPG game with something like a cross between Diablo and Final Fantasy. This is really very interesting. I would advise everyone to just try to play with it in their free time., understand how it is generally spelled, how it works. It was a very cool experience. Then I somehow got into the same lessons, where the dude saws some simple game on Unity. It is very interesting to compare approaches when you start writing your own engine, and when you already have something ready, like Unity, and you somehow arrange it to make your own. I would highly recommend something to try, because it’s really interesting.

    Roman: I have a similar experience. I love to play, but I'm not an avid gamer, but at the same time I was first of all interested in understanding how programs are made. Then I come to the conclusion that what I like, what I like, I want to try to do with my own hands. But in terms of games , everything starts with an idea.. I'm waiting for an idea that can be implemented in any free time, or clear my time and make this game.

    Stepan: Regarding ideas, one of the last, which came to my mind, was related to the  automatic generation of maps . Now, it can be said, a trend, and some games use the generation of huge worlds, so that they are very similar to the real ones.

    There is a whole class of algorithms that allow you to generate a landscape. The landscape can be built in such a way that both mountains and seas will be there. In principle, if a person shows the top view of Google maps and the generated landscape, few people will be able to distinguish them. This is very interesting, because you can single-handedly, without having large resources, create content for the game, because it is one of the most difficult parts. At least I think so.

    Working day


    Alexey: Stepan, how does your working day usually go? You woke up, got to the office, or didn't get - what are you doing, how are you doing?

    Roman: I still wonder what happens to you before you get to the office? Maybe you have any favorite coffee shops or favorite traditions: for example, do you like to walk on the public garden in front of the office? What really starts your day?

    Stepan: Recently, my day begins with 50 pushups.

    Alexey: Respect!

    Stepan: At some point I realized that I had to spend more time on physical activity , and now I try to force myself to do it in my free time. In principle, nothing special.

    Since the main business of the company is ridehayling, that is, ordering a taxi, the company pays me a taxi. Therefore, the first thing I do in the morning after breakfast is ordering a taxi and going to work.

    I work in a fairly decent office with a cool view of the bay. As most of us probably have, the first thing is, of course, a cup of coffee . Most often, we just go down with colleagues to the basement of the same building, go to one of the coffee shops, take coffee and  go to discuss some news, plans. It is especially interesting if something happens for this night, which is in the USA - a day: something new was released, some interesting news, a new framework. All this we are discussing, and after that you can start working.

    Then everything is about, like everyone else: you go in  Jira , look at the tickets. The last couple of weeks, I acted in the role of on-call. This is such a developer, on which all production-problems are blamed, and you have to somehow decide, or delegate, or say - this is not a problem and forget about it.

    Since the team is very large (over 40 people  are already working on the passenger application , these are different teams that are responsible for different areas), it is sometimes quite difficult to find the right person to solve this problem. We have such a rotation -Every week, one of the developers is engaged in raking up production problems . Specifically, this week I have been preparing a release, this is a fix issue from testing, and again finding the right people to solve this most quickly.

    Roman: 40 people is only Android, or is it the whole team that makes the mobile app?

    Stepan: This is only Android.

    Roman: Wow! When I  heard how many mobile developers in Uber, I felt uneasy. But your team confirms this trend. You mentioned that you were, roughly speaking, a bug report officer. Tell me, how is the release cycle of the application going on?

    Application release cycle


    Stepan: Basically, I think this is a more or less usual process that large applications are trying to follow. We have a fixed release train . This is currently a week. That is, every week on Tuesday we have a release. This week a release engineer is chosen, and by the beginning of the week all features that fall into release should be ready.

    If a feature is not ready, it is thrown out, closed with a flag - they do anything so that it does not fall into regression. As soon as this build, where all features are ready, given to QA, the release-engineering process begins. That is, any open bugs should be fixed as soon as possible., they are given the highest priority. Even if the developer is working on the next feature, which will go to the next release, but there is a bug or some problem that he knows best, and he has the least time to solve it, it is given to him.

    It happens at our place until Friday. On Friday, we try to end the regression , close all the regression bugs, and leave with a calm soul for the weekend. If something suddenly happened on Monday, you can quickly fix it, and on Monday evening or on Tuesday morning, publish and roll out quietly - first 10%, then more, more, more. For a week, we are trying to get close to the site somewhere, and release the next release.

    Testing and updates


    Roman: Quickly write and lay out - what about the testing process? Special testers who check at what point?

    Stepan: There are a lot of testers, they have time. I do not know how many of them exactly. The reason is that most teams are not in Singapore. I do not remember how many offices we have, but at least 5 more offices are, where the development teams are with QA. During the development of features, these commands, together with QA, debug these features themselves, test them. By the time the release cycle begins, features should not have open bugs . Regression occurs as follows: one, maybe two QA from all teams is allocated, and they drive the regression according to their features. Just this week, while bugs are searched, regressions are fixed.

    Ilya:It turns out that you have a weekly update cycle, and users have time for such a time to update? We, for example, faced with the situation that we have iOS-users have time to upgrade, and Android - not really. We have a version that was right for several weeks.

    Alexey: Yes, I also think that the week somehow feels like a quick one.

    Stepan: Yes, it is. The week is pretty fast, but  we have no goal for all users to update . We switched from a two-week release cycle to a weekly one in order to reduce the burden on QA during the regression, because in 2 weeks a huge number of features accumulated. 40 people can do business!Later, at the end of the second week, we happened to get out pretty serious bugs that were obtained due to the imposition of these features, and it was quite difficult to solve them. It turns out that we broke it weekly and distributed this load on testing more evenly.

    Ilya: How many percent of your user base use the latest version?

    Stepan: It depends on what time period we are talking about.

    Ilya: In the moment.

    Stepan:You can use the latest version only if you are in this week reload plan. That is, 100% reload will be either around Friday or already on Monday, since on Tuesday the new version is coming out. It already depends on luck. But we do not have such a goal that users always sit on the latest version. The only thing we still need to think about is the minimum supported version. We periodically force users to upgrade by force, when at least 90% of users will be on the minimum supported version, which is about 3-4 months.

    Teamwork organization


    Alexey: Tap dance, I have such a question. You say that 40 people are engaged in Android - right? Is this really serious. 40 developers are doing something?

    Stepan: Yes.

    Alexey: There is such a moment that as the number of employees grows , especially in one area of ​​the company, that is, specifically in Android development, the cost of communication grows exponentially . All business processes are committed to resolving this phenomenon. And how is it settled for you? What is the organizational structure of this machine from 40 developers?

    Stepan: Actually, our solution is quite simple. These 40 developers are not engaged in the sameand they essentially don’t need to communicate much with each other. It turns out that teams in different countries are engaged in different features. Basically, you do not need to communicate with other teams. You communicate mainly with your manager. As a result, communication costs are not that big, because the team is 5-6 people . There are also teams of 1-2: for example, only some new business vertical appeared, there is one developer, and he just has an engineering head who is responsible for everything, including the backend, iOS and other things.

    It turns out that we just have small teams that work in the same repository, in the same code base.

    Archetype and kOptional opensource projects


    Roman: I propose to proceed to the next question. I learned that you have OpenSource projects. I always have respect, as developers manage to find time for OpenSource, honest with users, etc. Please tell us about your two popular projects - this is Archetype and  kOptional . What it is?

    Stepan: I'll start with  kOptional . From the title it is clear that this is a small implementation of Optional . somehow I needed to process the Null very urgently, and I wrote down a very small library. In fact, there is nothing special there. I did not want to bother much, I took the implementation from Java8 and ported it.

    Honestly, it turned out so-so. Of course, I was pleased - it was better, much better than nothing. But if I knew the code a little better then, I would have done it differently.

    Pro Archetype  is a pretty interesting story. About two years ago I joined a startup called 90  Seconds . This is one of the world's largest platforms for online video production: you go there as a customer, describe your idea, and make a video for you. On the other hand, this is a platform for performers: you have a video camera, you know how to shoot - you register and orders come to you.

    I started writing an application from scratch, and at some point we needed a second developer. Then I met  Denis Neklyudovand hired him. He came to us in Singapore. When he saw what I had done, he said: " Let's make a report out of it ." Why not?

    As a result, the report is good, but we need some sample code so that people can show it. Naturally, the code 90 Seconds is not going to shuffle anywhere, there is the NDA and all that. Just a few days before the conference, we threw this project in, and since then it has been playing the role of a test task in order to pass an interview in 90 Seconds: you need to sign out, add some small feature, do something in this project.

    In principle, this is a showcase of architectureI used when writing 90 Seconds. Then it was a novelty for me, and, in principle, for developers, with whom I was familiar. Then, literally two years ago, I started writing an application completely from scratch, and decided to do everything initially on Rx. The idea was to do absolutely everything reactively, and absolutely everything on Kotlin, from scratch without any legacy.

    It turned out pretty cool, except for a couple of things that I still regret, but ... so here.

    Alexey: Listen, I really liked the idea before the interview to ask a person to become a partner in your OpenSource project . This and the project develops, and you can see how a person kodit, and in general, what he thinks, what features offers. I think we need to try it for sure!

    Let's develop the topic of conferences a little bit. You are already speaking at AppsConf next week  . Please tell me about your topic and what will you tell there?

    AppsConf Conference


    Stepan: Yes, I speak at AppsConf. The topic sounds quite interesting in English, but I don’t like it when translating into Russian, but I can’t think of anything better: “Architecture of the asynchronous tasks execution layer”. I planned this report, probably, for three years already to be done, and all the hands did not reach.

    The idea came just from the implementation, which my colleagues and I used in a startup application, where I originally came to work in Singapore. We had a rather difficult task, it was a social network for musicians in which it was possible to write music. One of the features was that you can write music offline, and then when you go back to the Internet, everything will synchronize with the server.

    The structure was rather complicated. First, there is such an entity as the idea of ​​a song, and then in you you can convert this idea into a tree. In fact, it turns out version control for your song. The song itself was also a multitrack, effects and a whole lot more.

    The result is a graph of dependent entities that needs to be synchronized . We wrote such an interesting system, which, firstly, wrapped all these requests, and secondly, allowed them to be recorded in the database, connected to the database and sent.

    It seemed very cool to me then, and since then I wanted to tell about it. But, unfortunately, now with experience, it seems to me that the implementation was just awful. Literally after that performance with Denis, I was offered to speak again at Mobius, and since then I have been preparing this report. The report generally transformed for quite some time.

    The result was such a show case, as you can, adhering to very simple rules, design beautifully and elegantly some component that will help avoid copy-paste throughout the project, and at the same time allow you to create something similar to WorkManager, but even more complicated.

    The talk will be about how to use Kotlin , how to design the components of the application , and how you canEfficiently manage tasks , while solving some very common problems in a very simple way.

    Alexey: Tell me, is this experience now used in your company?

    Stepan: No, unfortunately. First, when I arrived, there was already a fairly large amount of code, and now it is already quite expensive to implement such a system, and nobody needs it. But, nevertheless, I have a plan to use similar techniques to reduce the amount of code we use.

    Roughly speaking, one of the things I’m going to talk about is how can I get rid of, as I call it, manual subscriptions, when you simply subscribe within your objects. If you simply delegate the call of this method to an object that you will call in all places, this can improve almost the entire code base. I also want to introduce this into our project.

    Alexey: The final short question is, is there any solution waiting for us for this kind of OpenSource for this topic that will help to implement it in other companies?

    Stepan: Hardly. I didn’t plan to make this decision in production-ready, but those that I’ll have in my presentation will be crammed into GitHub.

    Novel:
    Oh, intrigued! To all those who fall into the same category of intrigued people, I remind you that Stepan will be at the AppsConf conference on October 8–9 in Moscow.

    AppsConf is very soon, the schedule turned out to be very busy, there are a lot of useful reports, and you can still manage to book a ticket and also take part.

    Also popular now: