Tag Archives: stackoverflow

Natural Language ambiguity

As developers we take ideas expressed in natural language and translate them into concrete programs.

Confusion over the stackoverflow gold electorate badge highlights the difference between natural language and programming language and the challenges developers face on a daily basis.


The definition of the stackoverflow electorate badge is

Voted on 600 questions and 25% or more of total votes are on questions.

Reading this, one determines that

a) A user has to vote on 600 questions.
b) A user’s total number of votes needs to be composed of between 25% and 100% of votes on questions.

meta.stackoverflow.com shows the interpretations of the badge definition. Let’s look at the following three posts.

1. Where is my electorate badge?

I have cast 606 votes in which 227 are on question and else are on answers

Awais Qarni interpreted the word question to represent the complete stackoverflow post or thread. This interpretation is correct, threads on stackoverflow are questions. However the use of the word question in the badge description refers to only the question part of a stackoverflow thread (not the answers or comments). Awais was expecting to receive his gold badge because he had voted on 606 threads, 227 of which question posts.

2. Electorate Badge rules. Rich Seller did not understand b). In the comments, he states that he finds the wording unclear.

From your answer it seems the badge is awarded if you’ve voted for questions 3x as much as you’ve answered them? But I initially read it as “answer/question ratio”, and on rereading as “ratio of answer votes to question votes”.

He still is not understanding b).

3. Electorate badge, is it working, the badge definition is interpreted again.

Clarify electorate badge wording changed the wording of the badge description in an attempt of clarify it’s meaning. As we saw with Awais Qarni, it is still open to interpretation.

Natural language is not able to concretely communicate meaning. We interpret it, this is why literature and the arts can be so stimulating to our brains.

From a 14 word sentence, expressing a simple rule, we’ve seen how it can be interpreted. Now, take your average software project specification. It will likely contain more than 14 words in 1 sentence. Usually hundreds of sentences. As developers we need to continuously ask questions about the software we are writing because given more than one developer there will be parts of the specification that are interpreted differently.

One could write the following program to communicate the 14 word sentence explicitly.

The program communicates the definition of the electorate badge. Nothing is left open to interpretation. We run the program to prove that the definition it communicates is correct. This is impossible with natural language, our brains interpret the sentence and reach some decision about its meaning. The notion of question is impossible to define concretely as it can be correctly interpreted as both the full stackoverflow post or the question part of the stackoverflow post.

When writing, discussing and thinking about software requirements and specifications its imperative that we ask ourselves lots of questions. If we don’t have answers to one of our questions, we take care in defining the ideas that are open to interpretation. In a nutshell, be completely explicit. If an idea is not defined, define it.

Further reading:

Using Natural Language in Software Development