I’m working on a project this year to build a competitive programming FAQ. This is one in a series of articles describing the research, writing, and tool creation process. To read the whole series, see my CPFAQ category page.
Last week, I described using a Quora topic’s Most Viewed Writers page to collect questions with popular answers. I started with the Competitive Programming topic. This week, I’m moving on to most viewed writers in related topics.
Related Topics
Quora topics are organized in an ontology, a hierarchy of topics and subtopics. But topics can be created by anyone, and new topics don’t have to be added to the ontology. Furthermore, popular topics (like the Competitive Programming topic) are locked, which means only Topic Gnomes are allowed to add direct child topics (though anyone can add topics further down in the hierarchy, if they can find an appropriate unlocked parent).
By traversing the ontology and using other techniques to find topics outside of the ontology, I came up with a list of 138 topics that I have been using to collect questions and answers. This week, I updated my scraper to traverse that topic list to download pages of the form https://www.quora.com/topic/[topic-name]/writers
(the Most Viewed Writers page). Out of the list of 138 topics, I found 30 that had /writers
pages. Although Quora doesn’t disclose how it decides which topics get a Most Viewed Writers page, users have come up with various theories. At a minimum, a topic must have some reasonable level of activity (questions and views) for the MVW page to be meaningful.
Once I had the 30 pages, I used the XPath technique described last week to get links to the answers written by the most viewed writers. One difference from last week is that I only extracted links for the top 10 writers for each topic, since that’s all an anonymous user (like my automated tool) can see.
Results
Because competitive programming questions are often tagged with the top-level Competitive Programming
topic, I got good question coverage just by looking at that topic. Last week, I found over 3000 questions with answers written by the 50 most viewed writers in the topic. However, more questions can be found by exploring related topics. I found about 1300 more by looking at the 10 most viewed writers in relevant topics with /writers
pages. Here are some examples.
Although Dr. Thomas Cormen (co-author of the famous textbook Introduction to Algorithms) never participated in competitive programming himself, he appreciates the creative thinking that goes into solving programming puzzles. He doesn’t think competitive programming is for everyone though, so he doesn’t emphasize it in his introductory classes.
Adam D’Angelo is CEO of Quora, a former competitive programmer, and a top writer in related topics. He wrote popular answers to these questions.
- How did Adam D’Angelo improve so fast in TopCoder?
- Why do people from Eastern Europe and China now dominate coding competitions?
On the subject of getting started at competitive programming, Nikhil Garg has several pieces of advice, including a suggestion to re-write your solution from scratch after you get it accepted the first time.
On the subject of time management, two answers to this question suggest keeping a problem in your head so you can work on it when you’re not in front of a computer.
Last week I linked to a popular question about which algorithms and data structures to learn for competitive programming. Here’s a similar question about mathematics topics.
(Image credit: John Bell)