The extreme sport of competitive programming
Tutor at ITMO’s Computer Technologies Department and the mentor of the world’s top programmers, Lidia Perovskaya told the audience about the challenges of competitive programming. In fact, it’s just as challenging as competing in the Olympics or the World Cup.
“Extreme programming is a thing! One of its types is called “the 40-hour week”. Every programmer facing a deadline feels like a movie character trying to defuse a bomb. Once your 40 hours are up: boom, you can’t do anything. Meeting deadlines is a very extreme activity.”
“Another sport is programming in pairs. Coding, as you know, is quite difficult. You really have to become immersed in the task, come up with solutions, try them, and then think some more. Here, you have an additional challenge because there’s a colleague staring at your screen all the time. You have to tolerate the judgement of all your efforts and, oh Lord, explain your decisions! This sport is only for the most proficient programmers.”
“You can even take it further; put not two, but three programmers behind a computer, give them 12 tasks and only 5 hours instead of 40. Now that’s competitive programming!”
“If I were to ask someone on the street what competitive programming is, they’d probably imagine something akin to biathlon. Biathlon, the “sport of skiing and shooting” is just as weird a mixture as competitive programming. In reality, it’s just like what I described: you have one computer and a team of talented programmers having to solve as many tasks as they can in a short time.”
“It’s highly popular; there are competitions like this in more than 80 countries today. The best teams go on to play in the world championship, i.e. ACM ICPC. This isn’t a new thing like, say, Dota2; it’s been around since the time when handball became an Olympic sport. In 1970 being a programmer was a demanding job; computers were the size of a room, so you’d have to be really strong to use them.”
“It was then that a group of enthusiasts somewhere in Texas invited everyone to come and program something. Even back then, programmers were known for their planning skills and their ability to calculate risks, which is why four times more people showed up than what was expected. The thing is, they used punch cards in those days, and there was only one keypunch machine for every four people. So the people in charge said, well, that’s how it was always planned: it’s a team competition!”
“In seven years, it became a genuine international event, with teams from all over the world and a selection process. Few things have changed since then. 20 years ago there was a bit more of an athletic aspect, as the teams had to download their solution onto a floppy disk and take it to the jury; today, you just send it over. The finalists’ average weight has increased slightly, but we’re working on that.”
“But the competition itself is just as it was. The tasks are always relatable. Here’s one from the final stage: you have to pick an apartment in Manhattan. The price doesn’t matter, but you have to choose the best placement. Yet stuff like the neighborhood, price per meter, neighbors doesn’t matter. The only criterion is the number of Starbucks stores you can walk to within five minutes when you wake up in the morning. See? Very relatable.”
“At the final stage of ACM ICPC, the world’s best teams are pitted against each other. They all have five hours to solve a dozen tasks and only a single computer for each three-person team. Apparently, after 40 years we still can’t afford a PC for everyone.”
“If you win once, that’s great. When you win for the second time, that’s it, you’re retired. For football players, retirement comes at 40. Competitive programmers retire at 23.”
Tour de Theoretique: how to attend conferences
A theoretical physicist from ITMO’s Laboratory of Quantum Information Science, Anton Kozubov spoke about the rules for going on business trips for scientists.
“My first conference was at Moscow State University. I used to think that conferences were boring, and everyone would retire to their rooms after all the reports were presented. That’s not true at all. On my first day, as we were walking to our rooms, we saw someone running towards us in a strange pose. I didn’t even have time to react, and as the man approached us, he shouted: “I’m a psi-function!” I was concerned that he’d collapse.”
“There was another conference in Berlin. Do you know how many scientists you need to get from point A to point B in Berlin? I don’t know either, but now I know that four is definitely not enough.”
“In Germany they have a peculiar transportation system in cities, where it doesn’t really matter if it’s a subway, commuter, or a long-distance train. You can ride anything as long as you get on and off at the right stations. We even printed out our route so as not to get lost. So we came to the station and got on a train; it didn’t bother us at the time that the train had beds for some reason. It did bother us that the train didn’t stop at our stop! We found the attendant, who told us that we got on the express train to Cologne – with no stops in between. This was less than 12 hours before an important meeting. Luckily for us, the attendant stopped the train in Potsdam (30 kilometers from Berlin) where we spent the night before returning to Berlin.
“Another fun story happened on our way to Asia. There was a stretch of the way that we had to travel on a train. I get on the train, find my train car and see that there’s only two people in there, sleeping. I find the attendant and use every language I can think of to ask for a set of bedsheets. He doesn’t seem to understand, so I use gestures to indicate the sheets on which the two passengers are sleeping. The attendant, without skipping a beat, woke them up and showed them out of the train car.”
Mikhail Kurushkin, an assistant professor at ITMO’s Research and Educational Center of Chemical Engineering and Biotechnology, and Boris Zeliger, a school student and Russia’s youngest stand-up comedian, also shared their stories at the show.
ITMO University organized the nation’s first science stand-up show for those who enjoy comedy and also want to learn about science, which should help popularize science among those who might be bored with regular scientific lectures and events. The first show was held in March 2018.
A new “Quantum Potential” show is staged once every three months. Scientists from other universities are welcome to participate, too. Students and scientists can also apply on their own by contacting ITMO University’s Strategic Communications Department.