24

A check that's been enabled for years on Stack Overflow attempts to identify unformatted code in posts (questions and answers) from new users, and blocks posting until it has been corrected. A related feature checks the ratio of formatted lines of code to non-code characters in questions.

As of right now, both of these checks are enabled here too.

Rationale

The recently-revised scope for this site makes it abundantly clear that debugging code-dumps is not on-topic here:

don't ask about explaining, writing or debugging code

Therefore, I think it's reasonable to expect folks who are posting code in their questions to include ample explanation along with it - ideally, code would be illustrative of some concept, not a literal dump from some program they're working on.

In practice, this shouldn't affect very many questions; my spot-checks indicate only a few recent instances where either of these would've blocked someone from posting, and all of them are already deleted because they were blatantly off-topic anyway.

But please let me know if these checks cause any issues.

  • since you asked, letting you know about an issue: amon's hypothesis needs an update to account for questions that would be posted despite site name change but were blocked by new filter (not that this "issue" makes me sad though) – gnat Nov 8 '16 at 20:50
  • Quite honestly, I don't expect this change to have much of an effect, but with the name-change out of the way it's time to start chipping away at other stuff and this is some low-hanging fruit. – Shog9 Nov 8 '16 at 21:22
  • @gnat My hypothesis is well under way. We are currently at 12.23% close rate for debugging (136 questions) down from 14.26% (177 questions) from 2½ weeks ago. That's a reduction by 14% percent so far. With two more weeks to go before the 30 days are over, it's conceivable that we would hit my 20% reduction target anyway. We don't get too many ill-formatted questions, so this change will not have a substantial effect (though still welcome!). I'm more concerned about seasonal effects (September…). I'll have to do a bit of research with SEDE to account for that. – amon Nov 8 '16 at 21:55
  • 1
    agree @Shog9, I was mostly joking about that hypothesis. I expect the impact to be mostly psychological, like when you enabled all caps block. Stuff like code dumps happens infrequently but when it happens it is very frustrating – gnat Nov 9 '16 at 7:52
5

6 days later, five different users have hit the code formatting check (including the author of this deleted question, who tried to post it 12 times before finally getting the formatting almost right).

In addition, two questions have been caught by the code ratio check:

  1. This one was later posted as later posted as: https://softwareengineering.stackexchange.com/questions/335931/question-about-security-of-php-login-page

  2. The other was never posted:

  • 1
    Wow, it literally says "plz give me teh codez". Also, look at my follow-up to that philosophical discussion we had in the Election 2016 room. – noɥʇʎԀʎzɐɹƆ Nov 20 '16 at 1:51

You must log in to answer this question.

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