Marathon of the mind

The most grueling sport on campus just might be competitive computer programming.

Benjamin Recchie, AB’03 | Photography by Jason Smith

October 2013

In a computer lab on the first floor of the John Crerar Library, nine students sit around computer terminals in anticipation, waiting for the word from Borja Sotomayor, SM’07, PhD’10. “In five, four, three, two, one, go!” he announces. The teams each flip open their question packets and begin to type feverishly. Every moment is precious—after all, they only have five hours.

This is the regular Sunday afternoon practice for the Association for Computing Machinery’s International Collegiate Programming Contest (ICPC), a worldwide test of college students’ programming mettle. Sotomayor—by day, associate director for technology and lecturer in the Department of Computer Science—is the coach for UChicago’s programming team.

Practice today is a run-through of actual tournament conditions. There are ten problems to a packet and five hours to create a program that answers them. The object is to get the most problems answered correctly in the least amount of time. A score of 3/203, for instance, means a team solved three problems in 203 minutes. At the end of the tournament the “total time” is used, if necessary, as a tie breaker.

Sotomayor talks to me in hushed tones, trying not to distract the students around us. There are three squads of three players (all male, incidentally) readying for the Mid-Central USA Regional tournament to be held at the University in November. The flagship team is the Conjurers of Cheap Tricks, followed by the misleadingly named second-string team, ITT Tech Team B, and the third-string team, the Missing Semicolon, named for the minor typo that can ruin an otherwise functional program. Each team shares one computer, a rarity in today’s electronics-rich environment; it forces them to work together as a unit.

As we talk, the Conjurers submit a solution via the computer lab’s isolated network; Sotomayor tests it successfully, sends them a message to that effect, and updates the online scoreboard. On the other side of the room, fists shoot into the air in triumph.

ITT Tech submits an answer, but there’s a problem with their output. The answer should be a list of two-digit numbers, but their program adds “- 0” to the end of each number. It doesn’t matter that the answers are mathematically correct—in a real-world situation, that output might confuse the next program that uses it. Sotomayor marks it wrong.

Sotomayor started coaching in 2007, when his students approached him about setting up a team. “As a grad student being buried alive by my research, I thought I should pick up a hobby at some point,” he says. He learned to coach by the method any computer scientist will tell you is the least efficient, trial and error. But the team’s popularity is growing. This year Sotomayor had to hold a qualifier to choose the three teams for the upcoming regional tournament from an original eight teams. (There were two women among the original competitors, but neither made the final cut. In the latest tryouts, for next year’s team, there were ten women.) 

Halfway through the practice, the Conjurers of Cheap Tricks have answered seven problems correctly, Missing Semicolon four, while ITT Tech Team B is far behind with only one. The scores tickle Sotomayor; he shows me the actual results from the 2010 regionals, from which this problem set came. If the Conjurers quit now, halfway through, they would still place fourth.

I slip away for a few minutes to speak with assistant coach Denis Pankratov, SM’13, a graduate student in computer science. Pankratov was on the programming team at University of Toronto as an undergrad and was still eligible to compete in his first year in grad school at Chicago. Now he holds a weekly discussion session for the team, teaching new algorithms and tricks the contestants can import to their computers for later contests.

American students who want to work in the computer industry can go to recruitment fairs, he explains, but a foreign student’s best bet is a good showing at the ICPC world finals. Foreign students on programming teams will spend eight hours a day in summer camps refining their technique. For this reason the contest has a much higher profile abroad. An American team that does well might get a mention in their local newspaper, but in 2004 the winning team (from St. Petersburg National Research University) was invited to the Kremlin to meet Vladimir Putin.

In the last hour of practice, Sotomayor freezes the scoreboard. Not knowing whether an opponent is surging or stuck keeps leading teams from getting complacent and lagging ones from throwing in the towel, although it’s also a way to add a little drama into what is otherwise the most boring spectator sport I can imagine.

Sotomayor counts down to the end of the practice run. The final score is Conjurers 8/501, Missing Semicolon 6/543, and ITT Tech—down to one contestant by the end—with just 2/318. He’s pleased. “If you had walked away an hour and 19 minutes into the contest, you still would have gone to the world finals,” he says to the Conjurers. World-finals quality or not, though, everyone has room to improve; Pankratov leads the remaining students into the next room for a review session.

The competitors

The ICPC, Sotomayor says, is all about team dynamics, knowing how to split up work, how to share the computer, and how to recognize your team’s strengths and weaknesses. “Conjurers of Cheap Tricks have that nailed down,” he says. Its members are Harrison Weigel, a third-year math and computer science double major; Jeremy Archer, LAB’12, a second-year computer science major who filled in on Chicago’s world finals team last year; and Jake Koenig, a second-year majoring in, yes, mathematics and computer science. (When they aren’t coding, they enjoy the hobbies you might expect: reading science fiction, playing video games and Magic: The Gathering. The outlier is Archer: “I dance tango,” he says. “I guess that’s a hobby.”) In Sotomayor’s opinion, they are one of the best programming teams the University has ever fielded.

There’s not a lot of time for coordination during a contest. Work needs to get divvied up with minimal discussion. “When getting the easy problems out of the way, we just split up the contest into three sections and let each other code on a first-come, first-served basis,” explains Weigel. “When only the hard problems remain, we tend to pick problems that suit our respective styles.”

“Usually Harrison sets up the computer while Jake and I read,” elaborates Archer. “Jake is more mathematical, and Harrison can write code that works beautifully. My code is cleaner, but I’m not as good at tricky problems as Jake and I’m not as good as Harrison at complicated code.” And then there’s the matter of endurance. A contest is “one of the most exhausting experiences you can possibly imagine,” says Archer. “All three of us are totally out of commission for at least three hours after.”

There’s one more critical element to this team: Sotomayor himself. All three of the Conjurers credit him for bringing them onto the team. “He’s the one that convinced all of us to do this, and he introduced me to my partners,” says Weigel. More than that, “He’s the best person in the University to hold this position,” says Pankratov. “But Borja wouldn’t brag.”

November 2013

The Mid-Central USA Regional Contest takes place on campus, on the top floor of Ryerson Physical Laboratory. Next to the computer lab where the 19 teams are getting ready is a door with a sign that says, in 11 different ways, that no contestants are allowed inside for any reason. Examples:

Q. Someone propped the door open. Can I enter the Judges’ Lair?

A. No.

Q. The Contest Director said I can come into the Judges’ Lair. Can I come into the Judges’ Lair?

A. No.

Inside this mysterious Judges’ Lair—which I am allowed to enter—I find volunteers inflating a rainbow of balloons. “You’ll need to start inflating C and F,” Sotomayor advises them. The balloons, color coded to each question, are handed out to each team when they answer a question correctly; C and F are expected to be solved most quickly and often.

Sotomayor signals the start, then retires to the Judges’ Lair, where the judges—mostly other coaches—wait for the first round of submissions. The first question successfully solved goes to the home team, and Conjurers of Cheap Tricks takes an early lead.

The judges and coaches also keep tabs on the other regional tournaments in the country. One hundred thirty-eight teams (some schools, like Chicago, have more than one team) are competing on the same question set simultaneously—or are supposed to be, at least. One location got started 17 minutes late; in that 17 minutes, someone could have surreptitiously transmitted the contents of the questions to a team there. The chance is remote, but the judges are concerned nonetheless.

After the first hour, the Conjurers are in first place, followed by the Northwestern A team (unimaginatively dubbed the Wildcats). ITT Tech Team B is sixth; Missing Semicolon is 11th. The contest is still in flux, though; by the second hour, Northwestern edges into the lead.

For the next three hours, not much happens in the Judges’ Lair. Submissions come infrequently. I check my e-mail, read a few blogs, check my e-mail again. The competitors have been cut off from the rest of the Internet, giving them no such distractions. The world could be ending and they wouldn’t know.

With an hour to go, the scoreboard is frozen. From here out, balloons will be delivered only to teams with three or fewer questions answered so far; leading teams’ scores will remain a mystery. “There are surprisingly few Hail Mary runs,” observes Sotomayor as the last few minutes expire. But no sooner has he spoken than four more last-minute submissions come in, all wrong. Finally, as time expires, a last-minute surge from Northwestern pushes them past Conjurers of Cheap Tricks. But second place is good enough to send the Conjurers to the world finals in Ekaterinburg, Russia, in June.

March 2014

It’s a big deal, Sotomayor says, that Chicago (and not, say, MIT or Stanford) hosts the North American Invitational Programming Contest, a kind of warm-up for all the teams on the continent headed to Ekaterinburg. The Department of Computer Science has happily let Sotomayor plan it for the last three years (in addition to his day job) because the invitational raises the school’s visibility to potential graduate students.

The contest takes place in the Arley D. Cathey Learning Center in Harper Library, which has been transformed into a technophobic alum’s nightmare: computers everywhere, no books anywhere. But the judges don't care. “What a magnificent hall!” one marvels to nobody in particular.

Sotomayor walks up, perturbed. A volunteer accidentally let a competitor out of the room after the problem set had been distributed but before the contest began—a breach of security. “I made him swear on his honor that he didn’t remove the problem set,” he says.

The reading room at the far west end of the hall is set up as the judges’ quarters. Sotomayor narrates the countdown off an enormous digital clock projected on a screen, then steps away to the judges’ room as the teams open the problem sets. Volunteers are inflating balloons for problem G.

The contestants—the 21 teams from North America headed to the world finals—are the continent’s best young computer programmers, and they’re in high demand. It’s been an eventful weekend. There was a panel discussion on training for the world finals, a breakout problem session, dinner at the Quadrangle Club thrown by the Department of Computer Science, a full practice contest, a talk by a California-based Internet company called Facebook, and a reception at the Museum of Science and Industry sponsored by Groupon.

The competition is off to a roaring start. After the first hour, it’s MIT in first place, followed by the University of California, Berkeley, and University of Texas at Brownsville. The Conjurers are in 11th place. By noon—halfway through—two teams have already solved seven of the ten problems. This actually worries the judges; they don’t want a team finishing all the problems during the last-hour scoreboard freeze. “We don’t want anyone saying, ‘We’re done’ before the end of the contest,” says Sotomayor; it would drain all the suspense.

I pass the hours by chatting with a group of developers who have come to observe the contest at Sotomayor’s request. Starting in 1989, they created the software used to judge submissions. The world finals are broadcast live on the web, they tell me, complete with a live scoreboard and color commentary; it makes the sport very interesting, provided you’re interested in programming. I guess even the most boring sport can be compelling, if you have the right guides.

Going into the scoreboard freeze, MIT has eight correct and has submitted incorrect answers for the remaining two; they could very well solve all of them. The Conjurers are hovering under the top ten, with just four. I watch as they submit a fifth, which fails to make the grade. Still, Sotomayor is upbeat: “Last year they finished 20th out of 23.”

In the last 20 minutes, an ill-constructed submission by MIT keeps crashing the judging program. A quick conference ensues: they decide the program is a fail, but what reason will they give MIT? They settle on “time limit exceeded,” since a crash means the computer would take an infinite amount of time to complete.

Ten minutes to go. If the teams are making more noise, it’s impossible to tell; the high ceilings swallow up all sound. Some contestants are standing away from their computers. Are they nervous? Worn out? Or just finished?

Finally, Sotomayor counts down the last ten seconds. “Three, two, one, it’s done!” The whole room seems to sigh. The contestants and coaches mosey over to the octagonal repose of Kent 107 for the awards ceremony.

A projector screen shows the results up to the last hour, when the scores were frozen. Starting from the bottom, Sotomayor updates each team’s score; school names rise up a few places, only to be knocked down again when another team does better. (Like the balloons and the scoreboard freeze, it’s designed for maximum drama.) In the end, MIT takes first place with nine questions solved. I’m astonished by the size of the prizes: from $1,500 cash for sixth place up to $12,000 to the top team. (Clearly I did the wrong extracurriculars in college.)

Conjurers of Cheap Tricks have placed 13th, out of the money but still respectable. Archer laughs at his team’s result. “That’s exactly the same as practice yesterday.”

As the room starts to clear, the team turns to Pankratov. “Where can we improve? Graph theory!” says Weigel, answering his own question. Pankratov launches into his own postcontest critique; the problem session has begun before they even leave their seats.

June 2014

The ICPC World Finals take place from June 22 through 26 of this year. Because of the Core’s publication deadline, we can’t tell you what happened, but you can see for yourself at

Only the top 60 teams are ranked; Chicago didn’t even place last year. I ask the team and Sotomayor to take a guess where they’ll place this time around. Nobody takes the bait, although Koenig cryptically quotes Niels Bohr: “Prediction is very difficult, especially about the future.” Well then.

Win or lose, the Conjurers of Cheap Tricks can point to a number of ways these intellectual marathons have profited them. They’ve honed their programming skills, been flirted with by Silicon Valley firms, and visited a part of the globe they might never otherwise have seen. If they place at the finals, so much the better. But whatever happens in Ekaterinburg, the team still has another year of eligibility. Just wait till 2015.


Left: Jake Koenig codes with all his might during the 2014 North American Invitational Programming Contest, held at the University of Chicago.

Below: Borja Sotomayor, UChicago’s programming team coach and the tournament’s organizer, reveals the final scores.

Our heroes, the Conjurers of Cheap Tricks. From left, Jake Koenig, Jeremy Archer, Harrison Weigel.