# CPFAQ: Creating a FAQ Page

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.

For at least the next few weeks, I’ll be creating competitive programming FAQ pages for the most frequently-asked competitive programming questions, according to my analysis of Quora content. That set of pages will give me a foundation on which to add more specialized questions over time. This week, I’ll explain the page creation process that I’m currently using.

## Creating FAQ pages in MediaWiki format

Prerequisites: I have a spreadsheet with one Quora question per row. Each row contains the question title and other columns of data that I use as I work through the following process.

Sort the data

To create FAQ pages, I sort the spreadsheet by Primary Category, then by Canonical Question Title (within questions in the same category), and finally by the average of number of followers and number of upvotes (within questions with the same canonical title). Those sort criteria make it easy to isolate a list of Quora questions that belong on the same FAQ page.

Find a canonical question

The sorted list makes it easy to find a canonical question title that maps to multiple Quora questions. For example, How did (person) become a top competitive programmer? currently maps to 23 Quora questions. No doubt there are more Quora questions that fit in that category, but until I classify more questions, those are the ones listed on the FAQ page.

The goal in this step is to find a canonical title that hasn’t yet been added to the FAQ. I’m starting with titles that map to the most Quora questions, since that means the FAQ will have the most popular questions.

Search the wiki for the question title

There are a few ways to create a new page in MediaWiki, but one easy way is just to search for the desired page title. If the title doesn’t exist, MediaWiki creates a link for the new page and displays it in red.

Clicking any red link in MediaWiki takes you to a Create Page interface, with an editor for authoring the page content.

Add a section for Quora questions

I’ll eventually write an answer at the top of each FAQ page. But for now, I’m just adding links to Quora questions and answers. The MediaWiki markup == Related Quora questions == renders a section for those questions.

One of my spreadsheet columns uses other columns to automatically generate MediaWiki markup for question links. For example, the markup * [https://www.quora.com/What-was-Anudeep-Nekkantis-Competitive-Programming-strategy-to-become-35th-in-Global-ranking-in-just-6-7-months What was Anudeep Nekkanti's Competitive Programming strategy to become 35th in Global ranking, in just 6-7 months?] renders an item in a bulleted list, with question text that links to the appropriate Quora question. This allows me to copy and paste multiple question links into a wiki page, without having to manually create each one in the wiki editor.

Add a section for classification notes

Before I save the page, I like to write a few sentences at the bottom explaining the criteria for classifying the questions in a particular FAQ. This will help in the future as new questions come in and I need to decide where to put them.

Assign a category

The markup [[Category:FAQs about (category)]], which by convention is added to the bottom of the page, assigns the page to a category — for example, FAQs about people. The page link then shows up automatically on that FAQ category page.

Write a summary comment

Like a source control system, MediaWiki asks for a comment before a change is saved. If I’m creating a new page, I just write Created.

Preview and verify

The MediaWiki editor is not WYSIWYG. Its markup language is fairly simple, but it’s still worth looking at the rendered output before saving, to make sure it displays as intended. That’s what the Preview function is for. I usually click on all of the links at this point, to make sure they still go where I expect (e.g., a Quora question might have been merged since I saved the link).

Save

This saves the page to the database, and publishes it to the world.