How it all began

How did it all begin? Why did you decide to create a competitive programming platform ten years ago?

It was a natural process that began after I stopped participating in the competitions myself. I was working hard as Saratov State University’s team coach, but gradually I started to feel that it’s not enough for me. I wanted to work with a wider audience. Yes, it certainly is fascinating to come up with new tasks, organize local competitions among university students, but it’s much better to do something like that for people from all over the world.

I had an idea that I need to step up my own game, to create a platform that would become a core center for competitive programming. This aspiration was supported by the idea that such competitions are a great way to motivate people to study programming. It’s not only about organizing a competition and giving out awards, it’s also about the skills that participants acquire. On the other hand, 10 years ago I already noticed that the Internet and communications had developed just enough. The right moment had come.

Finally, when I was participating in the competitions myself, I always noticed some details that could be improved. As a result, I started to work purposefully on creating my own platform.

Tinkoff Challenge 2017. Credit: social networks
Tinkoff Challenge 2017. Credit: social networks

How did you do it? What were the first steps toward creating Codeforces?

For almost a year I’ve been thinking in the back of my mind how to name the site. It was not easy, I didn’t come up with “Codeforces” right away. In general, I think it’s important for a creation to have a name, even if it’s only a concept for the time being. When there is a name, a lot of things fall into place.

At the same time, I started working on a system for task development. Even back then, the platform that is now called Codeforces was intended for regular competitions, which are impossible to arrange without task authors from the community. So, I knew that I needed such a system. That’s what I focused on first. Now, this system is called Polygon and it’s used for Codeforces competitions as well as for some other purposes: ICPC, local championships, school competitions, educational tasks and so on.

During the development of Polygon I was testing the technologies and approaches that I was planning to use for Codeforce as well. For example, for Java web development I wrote a microframework that supports hot reloading of the entire application’s code. This made the development much faster. There were no re-deploys: you just write the code, compile it, press F5 in your browser and there you go. The conventional development didn’t work like that in the world of Java, especially in the late 2000s.

I showed Polygon to my colleagues for the first time during the [Programming] World Cup in Stockholm in 2009. Codeforces started to operate at its full capacity soon after that. I’ve been writing the main part of the project non-stop by programming 14 hours straight, day after day. I’ve been creating an incredible amount of code and functional parts. Participating in the competitions has taught me to work fast and that’s still the preferable pace for me, be that a competition or some commercial project. 

Codeforces. Credit: codeforces.com
Codeforces. Credit: codeforces.com

You’ve said that the existing platforms did not satisfy you in one way or another. How did your project differ from other similar platforms from the very beginning?

It was clear to me from the beginning that I had to create not just a competition platform but also a platform for communication. Codeforces had features of a social network even when it was only a concept. The second half of the 2000s is the Web 2.0 time.

I’ve planned the support of two languages from the very beginning. Starting from the first version of the platform, any post can be published in two languages: Russian and English. Every comment had and still has a “language” attribute. So, the English version of the website displays only the content in English, and the Russian version displays both Russian and English content. I think that’s the right way to go.

I was also trying to establish a certain pace of the competitions that is still kept. Competitions are the main content that attracts site visitors, and that’s why it’s important to keep the pace. This is one of the reasons why the task development system was created. It allows us to attract various authors and standardize the task preparation process. 

Mikhail Mirzayanov
Mikhail Mirzayanov

Any Codeforces user who has confirmed their level and experience by participating in previous rounds can leave a request to arrange their own round. Such requests regularly appear, and get processed by our coordinators - several people who are well versed in task preparation and work in close collaboration with the authors. They check the task ideas out, decide which tasks can be used to make a round and then help the authors to improve them. The tasks are also tested before they are actually used. For example, someone can’t take part in the next round, but does not mind helping to create it in advance, say what they think about the tasks, check that the author's solutions are correct and the tests are complete. With the help of such testing, we make sure that the rounds take place with a preset frequency and high average quality.

An important principle of Codeforces that has been around since its launching is being friendly to novices, to those who are new to such competitions. We aim to choose the tasks’ difficulty level in such a way that everyone would find several tasks they can complete, be supportive when answering the participants’ questions about the competition’s procedure, and formulate the tasks as comprehensively as possible. Codeforces supports a wide range of programming languages, doesn’t limit code to a specific pattern, and shows details of the testing procedure when being run. These details are most important, and our approach involves working on hundreds of them.

A decade later

How much did the sports programming community change during the ten years of Codeforces’ existence?

A lot, and I think Codeforces played a part in it, as well. Ten years ago, the community was disorganized, and participants from different countries seldom solved each other’s tasks. I believe there was quite a rift between the development state of the Internet communications and technologies and the community’s operation.

Codeforces has become the common platform for discussions where anyone can have a say and get an answer. Sometimes, this results in a senseless holy war, but we occasionally get a sensible dialogue, i.e. useful content that gets accumulated over the years. As of now, we have many valuable tutorials and exercises in our archive that can be of interest to not just sports programmers but also those who have just started coding.

ICPC
ICPC

What is Codeforces’ audience?

According to Google Analytics’ data for January, we had about half a million users and 32 million pageviews, which means about a million pageviews a day. The average pageview duration was over 15 minutes. Few websites can boast such numbers.

Over 17,000 register for a single round of our competitions, and this number is constantly growing. Not so long ago, I was remembering how we first got over 1000 registrations for a round ten years ago. Back then, it seemed a lot.

Apart from regular competitions, Codeforces also organizes joint and special tournaments. Can you tell us more about them?

We gladly work with companies, conduct joint events, sometimes with on-site finals. We’ve collaborated with VK for quite a long time and organized VKCup; we have a long history of collaboration with Mail.ru and other companies, both major enterprises and startups. We are open to collaboration with anyone who shares our interest in sports programming, who are ready to organize a joint competition and support the community.

From time to time, we organize unconventional events. For example, almost every year, we do a fun competition on April Fool’s day. The tasks are quite unusual: for example, some don’t directly explain what you have to do, and you have to guess what the author had in mind.

ICPC
ICPC

What makes the tasks at Codeforces different from those of other competitions, from tasks at ICPC, for instance?

Obviously enough, the tasks are generally similar. However, a round of ICPC takes five hours and involves teams of three. Our competition goes for two hours, and it is a single participant who has to solve the tasks. As a result, our tasks are more concise. Then again, we organize various competitions: some are aimed at novice, others - at professionals, and there are also mixed ones...

What’s more, we traditionally write the specifications in both Russian and English. The proportion of those who solve the tasks in Russian gradually becomes less due to the involvement of the international audience. It has been for a long time already that less than half of the participants use the Russian interface.

Have you thought about adding other languages?

There are lots of associated organizational difficulties: I’ll have to guarantee the quality of translations. Another issue is that this will prompt numerous questions: if we add Spanish, for instance, people would ask: why is there no Chinese? And if we do Chinese, where’s Hindi? And this will go on forever.

As of now, everything is simple and comprehensible: we have tasks in Russian for historical reasons. It is also a tribute to my aspiration to develop the community in Russia. English is an international language, so this is also ok with users.

You said that it’ll be you who will have to guarantee the quality of translations. How much do you personally do for Codeforces, and have you ever wanted to delegate some of your responsibilities?

I would’ve liked to delegate a great number of tasks, but unfortunately, there’s not so many people around me who are ready to spend the same amount of time and effort on organizing competitions and managing the platform.

I spend about eight hours a day on Codeforces and tasks, and sometimes significantly more. There are times when I get an alert from Telegram in the middle of the night that something went wrong on one of the servers. I get up and get it right. I never stop working on Codeforces, so I don’t have vacations. Unfortunately, I can’t just leave this process and say: “Bye, I’m leaving for a month to some island to go surfing”. Though sometimes, I really want to do so.

You’ve recently launched a crowdfunding program. Can you tell us about its goals and deadline?

The situation here is simple: our platform isn’t aimed at getting profits, but it still needs money to operate. Our authors are enthusiasts, but we have to stimulate them in some way, pay our coordinators, and I occasionally need money to expand our server base.

On the whole, we have a stable source of support thanks to Pavel Durov. We got to know each other ten years ago, he listened to my idea, and since then, first VK, and then Telegram have continuously supported us. Nevertheless, this is not enough for covering all of our expenses.

For this reason, we’ve announced a fundraising campaign. Doing that on a regular basis can be tiresome for the community, so we came up with a time limit, which ends in about a month.

From Saratov to St. Petersburg

Mikhail Mirzayanov
Mikhail Mirzayanov

A couple of personal questions, about you moving to St. Petersburg, to ITMO. What are your impressions of these changes in your life after a year and a half?

When I was in the process of moving to St. Petersburg, I had particular expectations, and I have to say they came true. It’s a pleasure to come to work at ITMO every day. I am surrounded by like-minded people. Sometimes, when I feel that I need to discuss some task or idea with somebody, I just go to the next room and there are four world champions in programming there who don’t mind helping me out. What’s more, ITMO’s infrastructure is also a great help for me. 

Finally, I’m thrilled with ITMO students. Their level is very high and they are pleasant to work with.

You know, having interesting tasks is very important for me. If I’m interested, if I’m fired up, if I wake up with thoughts on how to do my job better, then I understand that what I am doing is right. For a very long time, Saratov State University was home for Codeforces, and now it’s ITMO University. I really like the atmosphere here.

VKCup-2016. Credit: social networks
VKCup-2016. Credit: social networks

Is there any difference in the programming traditions of Saratov and St. Petersburg universities?

I’d say there’s a considerable difference. In the regions, everything is organized in such a way that the best students leave for the capital cities. So those universities that are not listed as the leading ones have to account for it. Oftentimes, that means that they have to teach students from scratch, which has its effect on the curricula. In St. Petersburg, you can focus on more complex things and expect the students to already have some specific level of knowledge.

Another impression from ITMO: it’s really great that every day as I come to or leave the university, I see lots of children in the hall. There are always some lessons going on. I think this is very important. Every university has to work with school students; it’s a mistake to think that prospective students will come to you because of your reputation only. And I think that ITMO’s current popularity has a lot to do with its projects for school kids.