
As part of the IT-HYIP project, we recorded a
video interview with Andrei Stankevich , the legendary coach of the ITMO University team in sports programming , who consistently wins every year in international competitions.
And for those to whom the video version is not very interesting, under the cut we prepared a detailed transcript of the interview, where Andrei talks about the nuances of sports programming, preparing schoolchildren for the Olympiads, Russian education, salaries and meetings with presidents.
About Olympiad Programming
Stas Tsyganov: Let's talk about olympiad programming first. Tell us about what tournaments are, and what rules are there in such competitions?')
Andrei : The largest tournament that is in olympiad programming is the world championship among students. It has the longest history. It began, probably not even me, nor you, probably, was not, in the 70s of the last century, as a tournament of American colleges.
This is a team tournament, now it is already an international world championship. The final is held every year in a different country. Last year was in Beijing. There the team of the Moscow State University became the champion. This tournament has recently won only Russian students. And our university, ITMO, St. Petersburg State University and Moscow University have won the last seven years.
Initially it was an American tournament, and he was a team one. 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 much as possible. Next on the penalty time. Penalty is the sum of the time to solve all problems.
Stas: It turns out that the earlier the task was passed, the shorter the penalty time?Andrei: So much the less, yes. Need faster.
Stas: And for trying?Andrew: For trying to be removed, too. There is a penalty of 20 minutes if wrongly tried to solve. You can at the same time as many times try to solve. 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 with our tasks, where it was necessary to meet the size and speed. This imposed restrictions on some programming languages.Andrei: Now there are still limitations on time, but not in size. There is a conditional limit on the size of the source code, but it is very large, it is unlikely that anyone will achieve it. Basically, everyone now uses C ++ as a powerful, fast, flexible language.
But he, too, has his drawbacks specifically for the Olympiads. These same disadvantages are not only for olympiads, but also for real programming. It is difficult to search 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 really uses it now.
There are commands that use Java. It is easier in some sense to find errors, more controlled memory, more controlled code. But more syntactic garbage, longer programs are obtained. And a little slower they work because of the virtual machine.
I myself tried to teach the team 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 most used by schoolchildren is Python. It is still much slower, it is even more difficult to meet the time limit. But there are very compact programs, they are very fast to write.
Sometimes, when time constraints do not matter in tasks, they choose Python. Penalty time is given not for the time of the program, but for the time from the start of the competition before you have passed the task. Therefore, it is important to write faster.
And the last language that was added to the world championship last year is Kotlin.
Stas: I know that quite often in the team there is a person who is responsible for the mathematical part of the problem. Are there any other roles?Andrew: It happens very differently. Each team is its unique composition. There are several success models. One is really a mathematician who solves problems. He, in fact, is already far enough away 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 remaining coders. What do coders mean? They should also be well aware of these algorithms, because they will not be able to program the algorithm line by line under the dictation of this math. When will it be another problem to solve? They concentrate more on algorithms, on implementations, on how to write code neatly, so that it works right away in order to quickly find the error if something doesn't work. There is such a model.
Other teams - most successful ITMO teams - worked on a different model, when all three people in the team are very cool coders. And the algorithms also know. Someone better algorithms, others worse, someone specializes in geometry, someone in complex data structures, someone in the rows. And they are ready to replace each other in more simple things.
Dedicated mathematician - there is always such a danger that he did not decide anything, that's all. Not his subject. And so, when all three people understand, come up with an idea, it seems to me that such teams are more reliable.
About Olympiad
Stas: You talked about the fact that these are mostly 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?Andrei: Indeed. This mainly concerns the World Student Championship. There are two limitations. Firstly, you cannot participate more than twice in the final and more than five times in general. In any qualifying competition - no more than five times.
The basic idea of ​​this rule was that more and more new students should join this movement. For example,
Gennady Korotkevich came to me on the first course, and everything, for six years I am free, I can relax, drink tea and watch how Gena wins everything. No, I have to remember all the time that only two times he can compete in the final. During this time, I have to prepare a shift, new members who will be the best next year, after the top ones leave now. This is the first.
For example, Gennady Korotkevich came to me on the first course, and everything, for six years I am free, I can relax, drink tea and watch how Gena wins everything
Secondly, it is impossible to live forever only this Olympiad programming. Need to move forward. So that each student understands that he will actually go to the final twice, try to win. But he will have another life on. He must either be engaged in science, or go into industry, or be engaged in education, or something else. Just can not do olympiads to infinity.
Stas: Obviously, the code that is written in the tournament will not be used anywhere. It may not be written in the best style. Most importantly, he carried out the task, fit into the delayed time. But in industry, they don’t write code like that.Andrei: The Olympics and the industrial code are in contact with the fact that the same programming languages ​​and algorithms are used. But a lot of differences.
It is not necessary to look for olympiad companies to immediately get an employee who writes the ideal code. It is beneficial for the company to get this ideal code. They develop their guidelines, they have their own principles of how programming works. When they hire an Olympiad, they get a person who has a good mind. And he will have to adapt his code, writing style, and so on while working at the company.
When hiring a job in a company takes place, then there is a sample of applicants for this position. They should choose the one that best suits the company. There is an average level of people who come to them. There is some dispersion. This average level in the olympiad environment is shifted upwards, because people come already trained, well-versed in algorithms, and quicker to understand.
Stas: I was familiar with the participants of the All-Russian Mathematical 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 tasks are simplified models of real problems. The people who came and did the tasks - these were mostly people from science who were doing some things, projecting them on the olympiad tasks, somehow simplified, reformulated. When I was writing my dissertation, one of the algorithms from it also gave me as an olympiad task.
But it happens that tasks for some competitions, especially a lower level, are already invented from some considerations: let's wind it up, this, this will turn out to be an olympiad task, we can give it. Traditionally, we have considered more interesting competitions, where it was done wrong, and where really many jury members noticed interesting tasks from their practice and turned them into olympiad ones.
Stas: Has it ever happened that the Olympiad takes as its most difficult tasks some tasks that have not been solved yet? And if a solution is found, it will be used in industry.Andrei: Yes and no. In classic Olympiad competitions like the World Programming Contest, they don’t do that. There are always clear tasks, the author of the problem knows its solution. This may be a new approach for everyone else. Sometimes he even came up with a new class of tasks. But the solution should always be.
And there are longer competitions, marathon, which are given tasks that do not exactly know the solution. And the sponsors of these competitions are often any interesting companies, NASA, for example. They give tasks, maybe also simplified, but with an unknown exact solution. And the team, the participants are competing, who better come up with a solution to this problem. And then, perhaps, they are somehow trying to apply it.
About the work of a coach
Stas: What is the work of a coach?Andrei: Actually, it evolves over time. When 15 years ago, in the early 2000s, I was just beginning to work as a coach, there were my own tasks. Then the main work of the coach was to tell some algorithms, some programming tricks. That is, to prepare a team from a fundamental point of view, to talk about exactly how to solve problems. Find tasks for training, set up a system for training.
Now there are more such courses. In the field of computer science education, we had a certain leap, and now there are many good courses at Russian universities. Students come to be more prepared, they were preparing for olympiads at school, were in different summer schools, went to a circle. Algorithms are already mostly people know.
Find a workout now too no problem. There are online archives with a large number of the best competitions of previous years, which can be resolved in the mode of virtual competition. At any moment you push and compete with all the teams that have ever decided this competition.
Therefore, now the main work of coaches is already more likely in the field of organizational plan and motivation of teams. It is necessary to find out from whom to form a team, to motivate students to do this. Further, at the university, many are not interested in Olympiads, they are going on internships, they are already trying to plan a career, and so on.
Again, making a team is not so easy, because team members must complement each other, the team must have a good psychological climate. The work of the coach is now shifting more into organizational activity. But specifically, I still conduct courses at the university related to content. And there are trainers who are not directly connected with content, with theory, with Computer science, but with organizational work. And there are some of their assistants who close the questions of content.
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. The national team selected participants from these clubs that represent the country. Is there something like this in Olympiad programming?Andrew: In student competitions there is no such thing. There are no prefab countries. There, representatives of universities are competing. Naturally, the university is still in some country. Therefore, when a team from a Russian university wins the world championship, the whole Russian community wins, of course. But it is precisely the competition of countries - there is no such format.
But the students just have. Schoolchildren have an international schoolchildren 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 students for the All-Russian Olympiad. Then we collect them, train them at special gatherings. And there we select the best ones already to go to the country. We had four people this year. Two gold, two silver medals. Moreover, this result is not considered very good. We aim only at gold medals at school competitions.
Stas: This is also a team competition?Andrei: No, there is a personal competition. Everyone speaks for himself, but in the end everyone is watching how the schoolchildren of which country acted on the medals. By the way, it’s interesting about medals, I want to tell you. 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.
In school competitions in computer science, in mathematics it is not. There medals are appointed fairly generously. About half of the competitors receive medals. And so there is a special value is the gold medal, which receives 1/12 participants of the competition. At the international school competition, you need to get in the top 28. Roughly speaking, in the top 30 in the world.
Students medals are given as follows. For the four best places - gold, four - silver, four of the following - bronze. 12 prizes.
Pro support and prizes
Stas: If we talk about winners, besides medals, what can you win at such competitions?Andrei: In general, the prizes are not very big. There was a surge in prizes somewhere around 2007-2008, when major sponsoring companies came, in particular Microsoft, IBM. They began to increase prizes for a while. Then it went down a bit, and now the prizes are mostly symbolic.
In a personal competition, which is held by companies, Google or Yandex, there is a prize for first place - about 5-10 thousand dollars. And for the second and below - almost symbolic prizes. In the finals of the World Cup, the prize for the first place on the team is about 15 thousand dollars, and then they also quickly decline. Only medals receive prizes. For the bronze medal - 3 thousand dollars for the team prize.
For the sake of prizes no one will compete, because this money can be earned in programming much more, much easier than to participate in competitions, to train for several years.
Rather, in addition to medals, PR of some kind, fame, merit. Some meetings, sometimes with the first persons of the state. Some awards are already in their own country, maybe in their own university. But on the whole, material support there is not very big there now.
About Russian education
Egor Tolstoy: Andrei, how should schoolchildren be prepared for sports programming olympiads? And how is it now organized in the country?Andrei: There are two aspects to this question. First, looking for what purpose. There are schoolchildren who mainly participate in olympiads in order to enter the university. They, of course, need to roughly understand their level. The Olympics are also of different levels. And it is necessary to solve the tasks of such a plan, which are found at the Olympiads that he chose. Learn algorithms, program, participate in competitions, solve online competitions.
Participants who are already at the top level and claim to win at the All-Russian Olympiad or to pass to the international Olympiad - everything there really turns into a sport. Sports programming. It is necessary to seriously engage in, at least twice a week, go to a club, hold online competitions, if there is no circle in the city where the student is.
Egor: Does the computer science training system that ordinary secondary schools now have, somehow push the guys to this? Or do you need to consciously look for some circles, as you said?Andrei: It seems to me that in most schools in Russia now computer science is not at the highest level. It is not shared, but computer science includes not only programming. Olympiad among schoolchildren - the bulk is concentrated on the aspect of programming. It is necessary not only to come up with an algorithm, and further program it.
At the same time, in addition to programming, computer science at school 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 packages, work on the Internet. This, of course, does not help much in preparation for the Olympiad.
There are also project activities in good schools. There may be some things when children are doing a project, which they can then send to the competition. This is also useful. This is a preparation for potential internships. But the Olympiad does not help.
That is, in the average Russian school, computer science is far from being successful at the Olympiad in computer science or programming. All schoolchildren from the regions, who achieve some success, obviously either began to study additionally themselves, or went to some circle, or went to some summer school.
Egor: What do you think, why does this happen? After all, for the same mathematics, physics, the program is everywhere similar. As for teaching programming or computer science, there are really completely different things happening from school to school.Andrei: Firstly, mathematics, physics are already much more established subjects. They have a history of hundreds of years. And dozens of informatics only. Secondly, of these decades, a long period fell on the financing crisis in education. When talented teachers, many simply could not go into education, because it was hard materially.
And therefore ... Something must be taught in computer science. Initially, the computer science program, which was born in the late 1980s, if you take the textbook of the late 1980s, with its aspects of the time that there was no modern programming language, there was no Internet, was focused, among other things, on fundamental training in computer science, not custom.
This is due, among other things, to the fact that there were no computers. Of course, in those days I was still quite small. But if you now read the stories of people who then developed this program in computer science: we want to teach programming without computers, it was about this setup that started it all. Of course, it left its mark.
Then computers appeared, but nobody knows how to use them. Heavy topic. I would not say that the situation in mathematics is noticeably better. It seems to me that in mathematics there is also a basic program, which, as a result, leads to the baseline exam, to the non-core. It is not so supernaturally complex. The course of mathematics is also criticized by many people that it is also outdated, that it is sharpened for some identical transformations. We even had a lecturer at the university on mathematical analysis said: "This is the department of identical transformations."
We even had a lecturer at the university on mathematical analysis said: "This is the department of identical transformations."
Here you need to prepare teachers, we need serious textbooks, again. Now it appears. It is clear that some failure of the 1990s - the beginning of the 2000s, when no one was engaged in the systematization of education, no one went into education to work, gradually leveled. There are serious teachers and methodologists in St. Petersburg, in 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 ranks first or second, probably the second most popular. It is easier to learn from both students and teachers. So, we can teach more teachers on it, and then more students can learn how to program.
Egor: Can you tell us the difference between your work as a coach and as a teacher?Andrei: The key goal when working specifically to prepare for olympiads is success at the olympiad. The key goal when you teach a course is to bring knowledge to the students.
In this, by the way, there may be some crisis of Russian education in high school. The USE is there, and the goal is to pass the USE well, but not the goal to master the program well. This, perhaps, is also some kind of minus USE. Although, of course, he also has many advantages. It is very popular to criticize him, but a unified understanding of how enrollment in universities takes place, a unified understanding of how school certification is going on is also important. It is even hard to remember what happened before, how universities were arranged.
Egor: If we talk about the unified state examination, are you generally a supporter?Andrew: I can not immediately offer a system that will be noticeably better. There was some kind of unification. On the other hand, there is one of the minuses of the USE, which is not obvious, but which we are now actively observing. In a sense, he created equal opportunities. If you scored 280-300 points on the exam, you can enroll in any university to your favorite specialty. As a result, you will, of course, go to the Moscow university - to Moscow or to St. Petersburg. In extreme cases, Ekaterinburg, Novosibirsk. And regional universities have a much lower exam score for students coming to them.
This is a crisis of motivation, including teachers of these universities. I know university professors from Petrozavodsk, Saratov, who get upset because they have to be taught in more difficult conditions. The crisis of regional universities is one of the consequences of the Unified State Examination System or the RSSS Olympiads.
About teachers' salaries
Egor: What exactly motivates you in your work as a teacher? Why do you invest in it? Why not just do olympiad workouts?Andrew: Recently, in a conversation for myself, I clearly formulated that someone had something to tell, to see that he understood it, that he had advanced, how a person’s eyes lit up, how he understood some idea that was unknown to him, moved, his level of education has expanded - this is what motivates me. I'm interested. I am pleased to convey some thought, to convey — pathetic sounds — knowledge to a person, to 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: Work as a teacher at the university is now competitive with work in the private sector? You talked about the guys who were in the national team, who eventually leave to work at Google, in the Valley. What motivates you now to be a teacher, how do you work with it?Andrew: Now there is a pretty strong bundle. Universities, where the big problems with money, where the work of teachers is paid unworthily. And people are very hard to find the motivation to work there as teachers. It is necessary to knock out some grants in parallel, or work in parallel somewhere. You teach half the time, half you work for a company. Very hard.
There are government programs that help some universities. The most relevant of them now is the “5-100” program, under which five of the 21 selected universities should try to get into the hundreds of world rankings.
In particular, the ITMO University, in which I work, in my opinion, for the third year in a row has been in the top 100 in Computer science world ranking. There is quite serious funding, due to which it is possible to offer teachers a decent salary, to offer someone, serious scientists, to come to university, work, create their own scientific school.
Plus interaction with companies. We have a professor at the department
Shalyto Anatoly Abramovich . His program is a conditional slogan -
“keep the best in universities” . Its meaning is that companies establish scholarships, allowances for the best university teachers who work on the current program for this company, on the current direction.
And according to this program, many programs - JetBrains, Yandex, Mail.Ru, VKontakte - help, including our faculty, to look for people who want to engage in teaching, to pay them a decent salary so that they are not distracted by activities in the company.
Egor: What can such a young specialist now come to teach? What are at least some potential forks?Andrei: Government wages are very low. What he can get at the rate of a senior lecturer or even an assistant professor, if he has a degree, of course, does not compete with wages in industry. There are tens of thousands of rubles - 10-20-30. Absolutely not serious salaries for comparison with companies.
If this university has a cooperation program, partnerships with some companies, or it is included in the "5-100", there may be any allowances. I think there is no upper limit.
Yegor: Did you consider for yourself the options to leave the teaching activity as a hobby, to go to the private sector? The same VKontakte, or Yandex.Andrei: I like everything. I am not interested in working in a company now. But, of course, 10-15 years ago, when there was a choice, what kind of career to build, I was thinking about all the options.
Many graduates, perhaps, would like to be engaged 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 fall sharply. I have to go to the company. Suddenly I can not work there. What is a job in the company?
People go to try, work in the company, make sure that yes, they are interviewed normally, they can work, they understand how everything is arranged 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, together with the winning team of the Olympiad, met with Dmitry Medvedev. I found a transcript of the interview. There are wonderful moments when you read out the texts of the tasks to him. In some cases they understand, in some not so. I had the strong feeling that you were trolling him neatly in the process. Was it intentional or so?
Andrew: We must understand that these meetings for the cameras are held. At such meetings, nothing is solved. If any issues are resolved, they can really be timed to this meeting. But in reality, a meeting is a PR action.
At the briefing on this meeting we were told that it would be interesting for the president to find out 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 domestic issues.
Sometimes even an unprepared listener has a hard time explaining the formulation of a programmer problem. We chose quite funny legends, as it seemed to us. I do not know, maybe some element of trolling.After such meetings, usually quite large-scale support programs are implemented. Our very first meeting with the president - then Putin - in 2004 led to a rather serious presidential training program, including teachers and schoolchildren. It was implemented by universities that organize the quarterfinals of the World Cup. In this sense, this meeting was so helpful that we managed to get funding for a fairly large-scale program.Egor: How was the meeting with Putin? What did you ask at last, did you ask him to explain the tasks?Andrew:No, Putin does not ask for a task to explain. The last meeting in which I participated was in 2016 at the Konstantinovsky Palace, here in St. Petersburg. The main topic of the meeting was also how to achieve such success, how to make us competitive in the world.A meeting with Putin is rather a PR action. Everyone is watching on TV - Putin meets with skaters, Putin meets with hockey players, Putin meets with programmers.Putin meets with figure skaters, now Putin meets with hockey players, so Putin meets with programmers.
Egor: What will you ask next time at his meeting, to offer him?Andrei Stankevich: You know, it’s not that we ask him anything. As I have already said, work on a specific issue is rather proceeding. We always offer the same thing. Finance education. It seems to me that one of the things that can be offered to the administration of our country in the field of education is, of course, to reduce bureaucratization, because at some point it has greatly increased.Some additional programs to attract leading scientists, support for leading scientists. There were different programs: a program of national research universities some years ago, now the program "5-100", the program of super-grants.What can you ask the state, except money? Unclear. You can also ask to climb less, to be honest, but you won’t ask.Competition
In the comments to the video on Youtube, we and Andrey hold a competition. The winner will receive our team’s T-shirt from the final of the World Cup in programming last year, from Beijing.The task:Lately, e-sports is very popular, when participants play games and win big prizes. And in sports programming, prizes are still noticeably smaller.
We need to come up with some kind of motivation for sponsoring companies to make prizes for competitions in sports programming. Why should they be interested? How to motivate companies to support our competitions?
The contest 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 and other interviews - with Oleg Bunin, Alexander Lozhechkin, Andrey Sebrant and other significant people in domestic IT.