Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

A question on SO (10k-only link) that recently got some attention due to a meta post consisted entirely of python code, no additional text was present in the question body. This should theoretically have triggered the “Here code. You fix.” filter that should prevent questions that only contain source code.

This didn't work in this case, the entire question body was:

    import math
def is_Prime(x):

    if ((x&1)) :
        for c in range (2,int(math.sqrt(x),+1)
                        if ( x%c == 0 ):
                          print ("not prime")


I'm wondering if the whitespace might have thrown the filter off. There might be a loophole here to evade the filter. If it's an easy fix it might be worth it to close the loophole, I don't expect the filter to be perfect, but this example looks like something it should be able to catch.

share|improve this question
It pains me to see that block of code and know that formatting it would be the wrong thing to do. – Pops Dec 9 '11 at 15:20

The 2nd and last lines were not indented so looked like text to the filter. He got the first line indented by accident. Nothing malicious, just clumsiness.

A substantial amount of user effort in answering this question got deleted. I wonder if that was the right call.

share|improve this answer
I don't think the filter depends on correctly formatting the code as code, most of the questions it's designed to catch don't have any propoer code formatting. – Mad Scientist Dec 9 '11 at 12:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .