A very common comment on SO questions is the request for sample code.

The thing is that this is possible to detect "automatically": by checking if the user formatted anything as code. Of course you will be warned when you forget to format your code, but I think that's a nice side effect.

I really think this is also in the poster's best interest: a question that is correct from the start focuses the community on ansering it, rather than fixing the question.

  • 4
    not all questions require a code sample. example: what are the steps to move from Axis to Axis2? – MozenRath Feb 8 '12 at 22:09
  • 2
    @jdv could you please include some sample code with this question? It's hard to tell exactly what you're asking without some code. – Dan Rosenstark Feb 8 '12 at 22:24

I think this will be impossible to ever handle automatically: There are many, many questions that make sense without any sample code.

I think manually commenting where it is really needed remains the way to go.

  • 2
    I am not talking about enforcing. Its a warning! – jdv-Jan de Vaan Feb 8 '12 at 22:08
  • 4
    @jdv either way. Why warn about something that may not even be necessary? Plus, there would be loads of clueless users who will add some junk code just to make the warning disappear. – Pekka Feb 8 '12 at 22:09
  • 6
    Apart from the people coming to Meta with the request to "please remove this annoying warning". – Bart Feb 8 '12 at 22:13

You must log in to answer this question.

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