Interview with Andrei Stankevich about sports programming



    As part of the AichiHype project, we recorded a video interview with Andrei Stankevich , the legendary coach of the ITMO University's sports programming team , which steadily wins every year in international competitions.

    And for those who are not very interested in the video version, under the cut, we prepared a detailed transcript of the interview, where Andrei talks about the nuances of sports programming, preparing students for olympiads, Russian education, salaries and meetings with presidents.

    About Olympiad programming


    Stas Tsyganov: Let's first talk about the Olympiad programming. Tell me what tournaments are and what are the rules for such competitions?

    Andrew : The largest tournament that is in Olympiad programming is the world championship among students. It has the longest story. It began, even not even me, or you, probably, was not there, in the 70s of the last century, like a tournament of American colleges.

    This is a team tournament, now it is already the international world championship. The final takes place every year in a different country. Last year I was in Beijing. There, the team of Moscow State University became the champion. This tournament has recently been won only by Russian students. And our university, ITMO, St. Petersburg State University and Moscow University have been winning for the last seven years.

    It was originally an American tournament, and it was a team tournament. There teams of three students solve problems for a while. The competition lasts five hours. You are given 11-13 tasks, you need to solve as many as possible. Further along the penalty time. A fine is the sum of the time it takes to solve all problems.

    Stas: It turns out that the sooner the task is completed, the less is the penalty time?

    Andrew: So much the less, yes. Need faster.

    Stas: And for the attempts?

    Andrew: For attempts to withdraw, too. There is a penalty of 20 minutes if you try to solve it wrong. You can try to solve it as many times as you like. And immediately the result is reported - right or wrong.

    Stas: It is interesting to discuss programming languages. When I was a student, I solved problems at our place, where it was necessary to meet the size and speed. This imposed restrictions on some programming languages.

    Andrei: Now there are still time limits, but not the size. There is a conditional restriction on the size of the source, but it is very large, hardly anyone reaches it. Basically, now everyone uses C ++ as a powerful, fast, flexible language.

    But he also has his drawbacks specifically for the Olympics. These disadvantages are not only for olympiads, but also for real programming. It is difficult to look for errors in C ++ code. It’s harder to understand exactly where your program crashes, and so on. But, nevertheless, because of the speed, everyone is really using it now.

    There are teams that use Java. There it is easier in a sense to find errors, more controlled memory, more controlled code. But more syntactic garbage, longer programs turn out. And they work a little slower because of the virtual machine.
    I myself tried to teach the teams of our university in Java about 10 years ago, we actively used Java. But since then, C ++ has also taken a step forward.

    And another programming language that schoolchildren use more is Python. It is much slower, it is even more difficult to meet the time limit on it. But then there are very compact programs, they are very quick to write.

    Sometimes, when the time limit does not play a role in tasks, then Python is chosen. The penalty time is not given for the duration of the program, but for the time from the start of the competition until you pass the task. Therefore, it is important to write faster.

    And the last language that was added to the World Cup last year is Kotlin.

    Stas: I know that quite often there is a person in a team who is responsible for the mathematical part of the task. Any other roles?

    Andrew:It happens very differently. Each team is its own unique composition. There are several success models. One is really a mathematician who solves problems. In fact, he has already gone far enough from mathematics, because nevertheless, programmer tasks, algorithms, data structures are also all on it. Such a person comes up with algorithms, comes up with ideas.

    And the rest of the encoders. What do coders mean? They, too, should know these algorithms very well, because they will not be able to program the algorithm line by line under the dictation of this mathematician. When will he solve problems differently? They concentrate more on algorithms, on implementation, on how to write code carefully so that it works immediately, to quickly find an error if something does not work. There is such a model.

    Other teams - most successful ITMO teams - worked on a different model when all three people on the team are very cool coders. And the algorithms also know. Some of them are better, some are worse, some specialize in geometry, some on complex data structures, some on strings. And they are ready to replace each other in simpler things.

    Dedicated mathematician - there is always such a danger that he did not decide something, and that’s all. It was not his theme that came across. And so, when all three people understand, come up with an idea, it seems to me that such teams are more reliable.

    About olympiadnikov


    Stas: You talked about the fact that these are mainly student competitions. As far as I know, in some competitions there are certain rules that an athlete cannot participate more than in a certain number of tournaments. What is the reason for this?

    Andrew: Really. This mainly applies to the world championship among students. There are two limitations. Firstly, you can’t participate more than two times in the final and more than five times in general. In any qualifying competition - no more than five times.

    The main idea of ​​this rule was that more and more students should join this movement. For example, Gennady Korotkevich came to mefor the first year, and that’s all, for six years I’m free, I can relax, drink tea and watch how Gena wins everything in a row. No, I have to remember all the time that only twice can he perform in the finals. During this time I have to prepare a shift, new participants who will be the best next year, after the top ones leave now. This is the first.

    For example, Gennady Korotkevich came to me for the first year, and that’s all, for six years I’m free, I can relax, drink tea and watch how Gena wins everything in a row

    Second, you cannot live forever only with this Olympiad programming. Need to move forward. So that every student understands that he will really go to the finals twice, try to win. But he will continue to have a different life. He must either engage in science, or go into industry, or engage in education, or something else. She definitely won’t be able to study the Olympics ad infinitum.

    Stas: Obviously, the code that was written in the tournament will not be used anywhere else. It may not be written in the best style. The most important thing is that he perform the task, fit into the set aside time. But in industry, they don’t write code like that.

    Andrew: The Olympics and industrial code are in touch with the fact that they use the same programming languages ​​and algorithms. But there are a lot of differences.

    Not that you need to look for olympiad companies to immediately get an employee who writes the perfect code. It is beneficial for the company to get this perfect code. They develop their guidelines, they have their own principles, how programming works. When they hire an Olympiad, they get a person who thinks well. And he will have to adapt his code, writing style and so on already while working in the company.

    When a company is hired, that is, a selection of applicants for this position. They must choose the one that best suits the company. There is an average level of people who come to them. There is some kind of variance. This average level in the olympiad environment is shifted up, because people come already trained, well-versed in algorithms, and think more quickly.

    Stas: I was familiar with the participants of the All-Russian Mathematics Olympiad. And they told me that the olympiad problems are very different from what they teach at the university. How does it work in olympiad programming?

    Andrei: Initially, olympiad problems are simplified models of real problems. The people who came and did the tasks - these were mainly people from science who did some things, projected them onto the olympiad tasks, somehow simplified, reformulated. When I was writing a dissertation, one of the algorithms from it was also given as an olympiad problem.

    But it happens that tasks for some competitions, especially at a lower level, are thought up already for some reason: let's wind it up, this, this, it will be an olympiad problem, you can give it. Traditionally, we consider competitions where they didn’t do that and where really many jury members noticed interesting tasks from their practice and turned them into Olympiad ones more interesting.

    Stas: Has it ever happened that at the Olympiad they take as the most difficult tasks some problems whose solutions have not yet been solved? And if a solution is found, it will be used in industry.

    Andrew:Yes and no. In classic olympiad competitions like the World Programming Championships they don’t do that. There are always clear tasks; the author of the task knows its solution. This could be a new approach for everyone else. It happens that he even came up with a new class of problems. But there should always be a solution.

    But there are longer competitions, marathons, in which tasks are given for which the solution is not known exactly. And the sponsors of these competitions are often all sorts of interesting companies, such as NASA. They give tasks, perhaps also simplified, but with an unknown exact solution. And the team, the participants compete who better come up with a solution to this problem. And then, perhaps, they are trying to apply it somehow.

    About the work of a coach


    Stas: What makes a coach work?

    Andrew: Actually, it evolves over time. When 15 years ago, in the early 2000s, I was just starting to work as a coach, there were my tasks. Then the main job of the trainer was to tell some algorithms, some tricks in programming. That is, to prepare a team from a fundamental point of view, talk about how to solve problems. Find training tasks, set up a training system.
    Now there are much more such courses. In the field of computer science education, we have experienced a certain leap, and now there are many good courses at Russian universities. Students come already more prepared, they were preparing for olympiads at school, were in different summer schools, and went to a circle. Algorithms are mostly people already know.

    Finding a workout is also no problem right now. There are online archives with a lot of the best competitions of past years, which can be solved in the virtual competition mode. At any time, you press and compete with all the teams that have ever decided this competition.

    Therefore, now the main work of coaches is rather in the field of organizational plan and team motivation. It is necessary to find out who exactly to form a team from, motivate students to do this. Further, at the university, many are not interested in olympiads, go on internships, are already trying to plan a career, and so on.

    Again, making a team is not so simple, because team members must complement each other, the team must have a good psychological climate. The work of the coach is now shifting more to organizational activities. But specifically, I still run courses at the university related to content. And there are trainers who are not directly connected with content, with theory, with Computer science, but do organizational work. And there are some of their assistants who cover content issues.

    Team members should complement each other, the team should have a good psychological climate.

    Stas: In other sports, especially in team sports, there are clubs, and there are national teams. Participants from these clubs representing the country are selected for the national team. Is there something similar in olympiad programming?

    Andrew: This is not the case in student competitions. There are no national teams. It is precisely the representatives of universities that are competing there. Naturally, the university is still located in some country. Therefore, when a team from a Russian university wins the World Cup, then, of course, the entire Russian community wins. But it is precisely the competition of countries - there is no such format.

    But the students just have it. Students have an international school olympiad, and there four people from each country can come and perform, represent their country. We have a whole system of preparation for this Olympiad. We select schoolchildren for the All-Russian Olympiad. Then we collect them, train at special training camps. And there we select the best to go to the country. We had four people this year. Two gold, two silver medals. Moreover, this result is considered not very good. We strive only for gold medals in school competitions.

    Stas: Is this also a team competition?

    Andrew:No, there is personal competition. Everyone speaks for himself, but in the end everyone watches how the schoolchildren of which country spoke on medals. By the way, interesting about the medals, I want to tell. Everyone who watches some kind of sport, such as athletics, thinks: there is one gold, one silver, one bronze medal, and that’s all. Three prizes.

    At school competitions in computer science, in mathematics this is not so. There, medals are awarded quite generously. About half of the competitors receive medals. And therefore, there is of particular value a gold medal, which receives 1/12 of the participants in the competition. At the international school Olympics, you need to get into the top 28. Roughly speaking, in the top 30 in the world.

    Students are given medals like this. For the four best places - gold, four - silver, the next four - bronze. 12 prizes.

    About support and prizes


    Stas: Speaking of the winners, in addition to medals, what can be won at such competitions?

    Andrew: In general, the prizes are not very large. There was a surge in prizes somewhere around 2007-2008, when large sponsor companies came, in particular Microsoft, IBM. They began to increase prizes for a while. Then it started to decline a bit, and now the prizes are mostly symbolic.

    In a personal competition held by companies, Google or Yandex, there is a prize for first place - somewhere around 5-10 thousand dollars. And for the second and lower - almost symbolic prizes. In the final of the World Cup, the prize for first place in the team is about 15 thousand dollars, and then they also quickly decrease. Only medals receive prizes. For a bronze medal - 3 thousand dollars per team prize.

    Nobody will compete for prizes, because this money can be earned in programming much more, much easier than participating in competitions, training for several years.

    Rather, in addition to medals, some kind of PR, glory, merit. Some meetings, sometimes with top officials of the state. Some prizes are already in their own country, maybe at their university. But overall financial support there is now not very big.

    About Russian education


    Egor Tolstoy: Andrei, how should students be prepared for sports programming Olympiads? And how is it organized in our country now?

    Andrew: There are two aspects to this question. Firstly, depending on what purpose. There are schoolchildren who mainly participate in olympiads for the sake of entering a university. They, of course, need to roughly understand their level. Olympics are also of different levels. And it is necessary to solve the problems of such a plan, which are found at the Olympiads that he chose. Learn algorithms, program, participate in competitions, solve online competitions.

    To participants who are already at the top level and claim to win the All-Russian Olympiad or to pass to the international Olympiad - everything really turns into a sport there. Sports programming. You need to seriously study, at least twice a week, go to some club, conduct online competitions, if there is no club in the city where the student is located.

    Egor: Does the system of teaching informatics, which is now available in ordinary secondary schools, somehow push the guys to this? Or do you need to consciously look for some circles, as you said?

    Andrew:It seems to me that in most schools in Russia now computer science is not at the highest level. This is not shared, but computer science includes not only programming. The Olympics among schoolchildren - the bulk is concentrated precisely on the aspect of programming. It is necessary not only to come up with an algorithm, and then program it.
    At the same time, computer science in school, in addition to programming, includes, firstly, the necessary things for the Olympiad, and generally useful - theoretical computer science, information theory, functions, some such things. Naturally, at a basic level, but nonetheless. There are also user things: work with office suites, work on the Internet. This, of course, helps little in preparing for the Olympics.

    There is still project activity in good schools. There may be some things when children do a project, which they can then send to the competition. This is also useful. This is preparation for potential internships. But the Olympics in no way helps.

    That is, in an average Russian school, computer science is far from succeeding at the Olympiad in computer science or programming. All schoolchildren from the regions that are achieving some kind of success obviously either started to study additionally themselves, or went to some club, or went to some summer school.

    Egor: Why do you think this happens? Indeed, in the same mathematics, physics, the program is everywhere alike. As for teaching programming or computer science, there really are completely different things happening from school to school.

    Andrew:First, mathematics, physics are already much more established subjects. They have a history of hundreds of years. And dozens of computer science only so far. Secondly, of these decades, a large period fell on the crisis of financing in education. When talented teachers, many simply could not go to education, because it was hard financially.

    And therefore ... Something needs to be taught in computer science. Initially, the computer science program, which began in the late 1980s, if you take the textbook of the late 1980s, with its aspects of the time that there were no modern programming languages, there was no Internet, was also oriented towards fundamental training in computer science, not to user.

    This is due to the fact that there were no computers. Of course, at that time I was still very young. But if we now read the stories of the people who then developed this program in computer science: we want to learn programming without computers - with such an installation it all started. Of course, this left its mark.

    Then computers appeared, but no one knows how to use them. A heavy topic. I would not say that in mathematics the situation is noticeably better. It seems to me that in mathematics there is also a basic program, which ultimately leads to a basic exam, to a non-core one. She's not so supernaturally complicated. The course of mathematics is also criticized by many, that it is also outdated, that it is imprisoned for some kind of identical transformations. We even had a teacher at the University of Mathematical Analysis said: "This is the department of identity transformations."

    We even had a teacher at the University of Mathematical Analysis said: "This is the department of identity transformations."

    Here you need to train teachers, you need serious textbooks, again. Now it appears. It is clear that some failure of the 1990s and the beginning of the 2000s, when no one was involved in the systematization of education, no one went to work in education, is gradually leveled. There are serious educators and methodologists in St. Petersburg and Moscow, who, perhaps, may already begin to lead the process of transition to teaching programming in computer science lessons.
    Now, for example, we are actively implementing the Python language. In Moscow, at the municipal stage, he takes the first or second, probably second place in popularity. It is easier to learn for both students and teachers. So, we can teach more teachers to teach on it, and further more students will be able to learn how to program.

    Egor: Can you tell me how your work as a national team coach and as a teacher differs?

    Andrei: The key goal when you work specifically for preparing for the Olympics is success at the Olympics. The key goal when you teach a course is to bring knowledge to students.

    This, incidentally, may be a crisis in Russian education in high school. There is an exam, and the goal is to pass the exam well, and not the goal to learn the program well. This, perhaps, is also some minus of the exam. Although, of course, he also has many advantages. It is very popular to criticize him, but a common understanding of how university enrollment occurs, a common understanding of how school certification occurs, is also important. It’s even hard to remember what happened before, how universities were organized.

    Egor: If we talk about the Unified State Examination, then are you generally a supporter?

    Andrew: I can’t immediately propose a system that will be noticeably better. There was some kind of unification. On the other hand, there is one of the drawbacks of the Unified State Examination, which is not obvious, but which we are now actively observing. He really created, in a sense, equal opportunities. If you scored 280-300 points in the USE, you can enter any university in your favorite specialty. As a result, you will enter, of course, the capital’s university - Moscow or St. Petersburg. As a last resort, Yekaterinburg, Novosibirsk. And regional universities have a much lower score for the exam who come to them.

    This is a crisis of motivation, including the teachers of these universities. I know university professors from Petrozavodsk and Saratov who are upset because they have to teach in more difficult conditions. The crisis of regional universities is one of the consequences of the Unified State Examination system or the RSOSh Olympiads.

    About teachers salaries


    Egor: What specifically motivates you in your work as a teacher? Why are you investing in it? Why not just do Olympic training?

    Andrei: Recently, in a conversation I clearly stated for myself that to tell someone, to see that he understood it, that he had advanced, how the person's eyes lit up, how he understood some idea that was he is unknown, he has moved, his level of education has expanded - that’s what motivates me. I'm interested. I am pleased to convey some idea, convey - pathetic sounds - knowledge to a person, notice that he did not know something before, did not understand, but now he understands.

    To see ... how a person's eyes lit up, how he understood some idea ... this is what motivates me.

    Egor: Is teaching at the university now competitive with work in the private sector? You talked about the guys who were in the team, who eventually leave to work for Google, in the Valley. What now motivates to remain a teacher, how do they work with it?

    Andrey: Now there is a rather strong stratification. Universities where there are big problems with money, where the work of teachers is not worthy. And it’s very hard for people to find motivation to work as teachers there. It is necessary to knock out some grants in parallel, or work in parallel somewhere. You teach half the time, half work in a company. Very hard.

    There are government programs that help some universities. The most relevant of them now is the 5-100 program, in which five universities out of 21 selected should try to get into hundreds of world ratings.

    In particular, ITMO University, in which I work, in my opinion, is the third year in a row to be ranked among the top 100 in Computer science in the world ranking. There is quite serious funding, through which you can offer teachers a decent salary, offer someone serious scientists to come to the university, work, create their own scientific school.

    Plus interaction with companies. We have at the department professor Shalyto Anatoly Abramovich . His program - a conditional slogan - “keep the best at universities”. Its meaning is that companies establish scholarships, allowances for the best university teachers who work on the program relevant to this company, in the current direction.
    And under this program, many programs - JetBrains, Yandex, Mail.Ru, VKontakte - help, including our faculty, look for people who want to teach, pay them a decent salary so that they are not distracted by activities in the company.

    Egor: What can a young specialist come to teach now? What are some potential forks?

    Andrew:Government salaries are very low. What he can get at the rate of a senior teacher or even an assistant professor, if he has a degree, of course, does not compete with salaries in industry. There are tens of thousands of rubles - 10-20-30. Absolutely frivolous salaries for comparison with companies.

    If this university has a program of cooperation, partnership with some companies, or it is included in the "5-100", there may be any allowances. I think there is no upper bound.

    Egor: And for yourself, you considered the options of teaching exactly to leave as a hobby, to go into the private sector? The same VKontakte, or Yandex.

    Andrew: I like everything. I'm not interested in working in a company right now. But, of course, 10-15 years ago, when the choice was what career to build, I thought about all the options.

    Many graduates, perhaps, would like to engage in teaching, but they are not sure: what if there will be some kind of crisis, we will lose the possibility of support from the company or from the state, and the salary will drop sharply. I will have to leave the company. Suddenly I can’t work there. What is a job in a company?

    People go to try, work in the company, make sure that yes, they go through an interview normally, they can work, they understand how everything works there. They return, while there is an opportunity, to work in education or in science. There are such cases.

    About meetings with Medvedev and Putin


    Egor: In 2009, you and Dmitry Medvedev met with the winning team of the Olympiad. I found the transcript of the interview. There are wonderful moments when you read him the texts of the tasks. They in some cases understand, in some not. I had a strong feeling that you troll him carefully in the process. Was it intentional or did it happen?

    Andrei: You need to understand that these meetings are held for cameras. At such meetings, nothing is decided. If any issues are resolved, then they really can be timed to coincide with this meeting. But in reality, a meeting is a PR campaign.

    At a briefing on this meeting, we were told that the president would be interested to know what the tasks were about. We looked at the tasks of the last final and selected some tasks for which the texts correspond to at least some everyday issues. Sometimes it’s hard even for an unprepared student to explain the statement of a programmer’s task. We chose quite amusing legends, as it seemed to us. I don’t know, maybe some element of trolling.

    Usually, after such meetings, quite large-scale support programs are implemented. Our very first meeting with the president - then Putin - in 2004 led to a rather serious presidential program of continuing education, including for teachers and schoolchildren. It was implemented by universities that organize quarter-finals of the World Cup. In this sense, this meeting was so useful that we managed to get financing for a sufficiently large-scale program.

    Egor: How was the meeting with Putin? What did you ask at the last, didn’t ask him to explain the tasks?

    Andrew:No, Putin is not asking for a task to explain. The last meeting I participated in was in 2016 at the Konstantinovsky Palace, here in St. Petersburg. The main topic of the meeting was just how to achieve such successes, how to make us competitive in the world.

    Meeting with Putin, rather, a public relations event. Everyone watches on TV - here Putin meets with skaters, here Putin meets with hockey players, here Putin meets with programmers.

    Putin meets with skaters, here Putin meets with hockey players, here Putin meets with programmers.

    Egor: What next time will you ask him at a meeting, offer him?
    Andrei Stankevich: You know, not that we would ask him for something. As I said, more likely work is underway on a specific issue. We always offer the same thing. Fund education. It seems to me, of the other things that can be offered to the administration of our country in the field of education, of course, to reduce bureaucratization, because at a certain point it has greatly increased.

    Some additional programs to attract leading scientists, support leading scientists. There were different programs: the program of national research universities some years ago, now the program is "5-100", the program of super-grants.

    What can the state ask for except money? Unclear. You can still ask for less climb, to be honest, but you won’t ask for it.

    Competition


    In the comments on the video on Youtube, together with Andrei we are holding a contest. The winner will receive a T-shirt of our team from the final of the last year's World Programming Championship, from Beijing.

    The task:
    Recently, e-sports has been very popular when competitors play games and win big prizes. And in sports programming, prizes are noticeably smaller so far.

    We need to come up with some motivation for sponsoring companies to make prizes for sports programming competitions. Why would they be interested? How to motivate companies to support our competitions?

    The competition will last another week, so we are waiting for your ideas! In the meantime, you expect to summarize its results, you can look at our channel for other interviews - with Oleg Bunin, Alexander Lozhechkin, Andrey Sebrant and other iconic people in domestic IT.

    Also popular now: