6
\$\begingroup\$

The idea jumped at me after reviewing two close votes in a row (granted, from the same user) that were homework assignments without any code in it.

Since a question that has no code in it (or one that is, say, less than 5 lines of code), is 100% garanteed to be off-topic here, can there be a "code-block detection" mechanism that prevents a user from posting a question that wouldn't have a code block?

Perhaps even pop a message saying something like this:

Questions on CodeReview.StackExchange must contain code for others to review! Moreover, the code must be working code for the question to be on-topic. No code? Sorry, no one can help you here!

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

I don't think this will work.

What if the user just puts the entire post, or part(s) of it, into a code block?
It would take a stronger algorithm to detect when *no actual code* is put into a code block.
I think this is one of the things that we just have to deal with manually.

Here is a related question on MSO, which also suggests that this won't work.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Well they'd have been warned that their post is off-topic - of course the post can be tweaked to game the thing and then we'll have to close it. But most new users that haven't read the "what's on-topic" part of the Help Center would stop at the warning and... do their homework. Or we can make the warning more like You are warned: this post will be closed as off-topic before an answer can be given. Include working code to be reviewed, or try www.gimmetehcodez.com... ok maybe not. \$\endgroup\$ Nov 13, 2013 at 3:54
  • 2
    \$\begingroup\$ @retailcoder: I still feel that some can, and will, get around this until stopped by a moderator. Never underestimate teh thirst of a help vampire! Of course, you still have to account for someone who provides an answer anyway. I hardly see it on here, but it's still possible. If that happens... teh vampire gets teh delicious codez! Plus, as a beta site, what we really need is a lean, mean, post-closing (and deleting) machine! \$\endgroup\$
    – Jamal
    Nov 13, 2013 at 3:59

You must log in to answer this question.

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