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

Examples:

Help me understand this TCP/IP code snippet
Explanation of C code

On topic or not? Reasoning?

What should I do with these kinds of questions, and why?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

The OP doesn't understand code and is showing a willingness to learn.

No, they haven't.

The OP has not demonstrated that they have put forth any effort to learn. Willingness means actual effort not randomly spamming us with code in the vague hope that others will explain it to you and do your work for you.

So, no, these sorts of "what does this code do?" questions are generally not valid, and they should be closed.

share|improve this answer
    
I wish to categorically deny that my statement is incorrect. At least 2 users on English.SE agree with me that a willingness to learn is entirely different from an effort made, and no users have disagreed. Nor do I think that an effort should always be required—in some cases, willingness to learn is enough. –  waiwai933 Feb 13 '11 at 6:38
2  
@wai well, you can have that opinion all you like, but my job is to protect the people of value in our system -- those who answer. A copy-paste job of "what does this code do?" is simply not interesting to answer, or useful to anyone else in the world. –  Jeff Atwood Feb 13 '11 at 7:06
1  
Well, then if we examine the second example Robert linked, it seems evident to me that the OP made some effort and understood the first half, but couldn't decipher the second half. Does that not count as enough effort? –  waiwai933 Feb 13 '11 at 7:13
1  
@wai look at this user's questions. stackoverflow.com/users/544222/arocon I'm going to say, hell no. –  Jeff Atwood Feb 13 '11 at 7:17
    
Ok, I didn't look at that. Mea culpa. However, my point is that I don't think there's anything wrong with this type of question in principle. For example, if a 20k user asked this and showed some effort, would there be anything wrong there? Basically, where are we drawing the line for effort? –  waiwai933 Feb 13 '11 at 7:26

From the FAQ:

Stack Overflow is for professional and enthusiast programmers, people who write code because they love it. We feel the best Stack Overflow questions have a bit of source code in them, but if your question generally covers …

  • a specific programming problem
  • a software algorithm
  • software tools commonly used by programmers
  • matters that are unique to the programming profession

… then you’re in the right place to ask your question!

Has code? Check.
Is about a specific programming problem? Check.
A real question? Check. Not too broad or vague.
Better covered by another Stack Exchange site? Nope.

The OP doesn't understand code and is showing a willingness to learn. It's not a question.

I don't see why it would be off-topic...

What should I do with these kinds of questions, and why?

Nothing. Or answer it. No special mod actions necessary.

share|improve this answer
    
I would argue that there is a limit beyond which they fail the specificity requirement. We do occasionally see posts where an apparent beginner asks for an explanation of hundreds of lines of non-trivial code. In cases like that I would say they are asking many questions at once. Other than that quibble I agree completely. –  dmckee Feb 13 '11 at 4:05
    
@dmckee Yes, anything greater than 20 lines should be closed as NARQ. But the examples Robert linked have fairly short code, so I was concentrating on those. –  waiwai933 Feb 13 '11 at 4:07
    
Anything greater than 20 lines? How did you get that out of the faq? –  Robert Harvey Feb 13 '11 at 4:15
    
@Robert Arbitrary number. Point is, we want to close entire programs as NARQ, short functions like you linked are fine. Of course, what is acceptable depends on whitespace, number of statements, etc. If in doubt, leave to the community. –  waiwai933 Feb 13 '11 at 4:19
    
@waiwai: Thanks for your response. I have posted a rebuttal as another answer. –  Robert Harvey Feb 13 '11 at 4:25
1  
As to leaving it to the community, I chose these posts because they were flagged for moderator attention. –  Robert Harvey Feb 13 '11 at 4:30
    
@Robert In that case, I guess asking here, as you did, is the right thing to do. :) –  waiwai933 Feb 13 '11 at 4:31
    
"The OP doesn't understand code and is showing a willingness to learn." The OP has not demonstrated that they have put forth any effort to learn. Willingness means effort not a vague hope that others will do it for you. –  Jeff Atwood Feb 13 '11 at 5:02
    
@Jeff Let me ask you this then, putting aside the difference between willingness and effort. Would it be ok if one of the top 10 SO users asked that question? At what point does someone show effort? Does having worked on it for an hour and not understanding anything show effort? –  waiwai933 Feb 13 '11 at 5:09

From How to Ask:

  1. Do your homework. Have you thoroughly searched for an answer before asking your question (stackoverflow.com/search)?

    You can't. Every question of this type is going to be absolutely unique, like a fingerprint, and yet they will all have essentially the same title.

  2. Be specific. if you ask a vague question, you’ll get a vague answer. But if you give us details and context, we can provide a useful answer.

    Is the asker really providing any context, if they just post code and ask what it does?

  3. Make it relevant to others.

    Are these questions interesting to anyone else but the asker? Are they too localized?

share|improve this answer
    
2. Many times the asker is asking because (s)he doesn't know what is or isn't important. We should ask in comments for specifically what else we need to know, but we shouldn't close just because the OP couldn't figure it out. 3. This is what SE has a hard time with. On one hand, we want to solve problems. On the other, we want to help the Internet. Take, for example, this question of mine. Is anyone else going to find it useful? Probably not. And yet it's not off-topic, is it? The line isn't well defined, but I don't think the examples have crossed it. –  waiwai933 Feb 13 '11 at 4:35
    
That's a nice example. Too bad more people don't write their highly-specific questions that well. –  Robert Harvey Feb 13 '11 at 4:39

You must log in to answer this question.

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