# July 2015 Community Challenge

The top-voted answer is StackSTV: "Build an implementation of the Single Transferrable Vote algorithm used for Stack Exchange moderator elections."

What should we do this time? Feel free to resubmit non-winning ideas from previous rounds, although new ideas are usually more successful.

• Vote for those answers which interest you
• At the end-of-day on Tuesday, June 30th, the most-voted post will become the next .

Once the challenge topic is decided, you can post questions on the main-site related to the challenge. The idea is to run the challenge all the way through July... although nothing stops you from posting an "entry" later than that :)

Disclaimer: Most of this text is borrowed from Mat's Mug.

Resubmit May's runner-up

Resubmit June's runner-up

# StackSTV

Stack Exchange uses an STV-based system for holding elections. They use the software OpenSTV to host it.

That software is no longer being maintained, and the system is being rebranded as OpaVote, and will no longer be free.

This month's challenge:

Build an implementation of the same STV algorithm used for Stack Exchange moderator elections, that consumes data in the same format that Stack Exchange provides, and produces the same results.

## Algorithm

The actual algorithm use is linked in this Meta.StackExchange question/answer: How are moderator election votes counted, in plain English?

Specifically, using the "Meek STV" algorithm here - in Wikipedia.

## Inputs

For examples of input data, see: Stack Overflow Elections

Typical data looks something like:

10 3
1 1 2 3 0
1 4 5 6 0
1 6 7 2 0
1 3 6 1 0
1 6 8 4 0
1 6 3 2 0
1 4 1 9 0
1 8 9 3 0
1 8 7 3 0
....
1 8 2 1 0
1 9 4 6 0
1 4 8 3 0
1 3 4 8 0
1 4 5 10 0
0
"meagar"
"Raghav Sood"
"Bohemian"
"0x7fffffff"
"Undo"
"bluefeet"
"Matt"
"Jon Clements"
"Siddharth Rout"
"Doorknob"


The format is essentially:

• The number of candidates, and seats on the first line - 10, and 3 represent there are 10 candidates, and 3 positions.
• a list of any candidates that have withdrawn preceded with a negative number - one per line (Stack Exchange won't have these, likely).
• a count of people with a specific combination of votes For example, in the first line: 1 1 2 3 0 that means that one person voted with the combination first-choice candidate 1, second choice candidate 2, third choice candidate 3. The 0 represents the end of that line. Note that combinations can be duplicated, potentially. In other words, three people voting for candidates 1, 2, and 3 in that order, could be represented as one of the following alternatives:

1 1 2 3 0
1 1 2 3 0
1 1 2 3 0


or

1 1 2 3 0
2 1 2 3 0


or

3 1 2 3 0


Though, it should be noted, that stack exchange elections will only have the first style of output.

• a zero on a line by itself represents the end of the vote section.

• following that, is the names of the candidates, in the order of the choices.

Feel free to implement it in the language of your choice, and to embellish it with GUI, graphs, charts, etc.

### Challenge entries

• Very apt for our upcoming elections! :D – h.j.k. Jul 1 '15 at 6:47

## Title/Question Analyzer

As we all [hopefully] know, posting code that doesn't work as intended is off-topic on this site.

Given a title and a body, implement an AI that can detect if a Code Review question is likely to be off-topic broken code.

• It would help if you give a direct link to a text file containing 1000 good and 1000 bad titles and question bodies. – Caridorc Jun 3 '15 at 19:52
• @all: I wrote a SEDE query that's pretty good at finding bad questions, if you'd like to use it: data.stackexchange.com/codereview/query/324894/… – Phrancis Jun 11 '15 at 18:32

# Chat extension

The goal here is to write a program that Oneboxes GitHub links and allows markdown formatting on multi-line comments.

Markdown code:

*Text* and _Text_ = Italic
**Text** and __Text__ = Bold
***Text*** ___Text___ = Bold & Italic


Examples:

Italic text and Italic text
Bold text and Bold text
Bold italic text and Bold italic text
An interesting addition will be to allow chat users to type [badge:badge-name] and get a link to the badge on the badge page, similar to how we can do [tag:tag-name] to link the questions with the tag.