What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

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")






is_Prime(77)

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
3  
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

1 Answer 1

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
2  
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 .