10

Consider this subset of the “give me teh codez” case where:

  • A question specifically and clearly explains what the questioner is trying to achieve,

  • That questioner shows no effort in trying to achieve it themselves,

  • The answer to that question is narrow and specific (no chance of opinionated answers and spam).

  • A complete and concise answer can be Fiddled or otherwise easily demonstrated (maybe 25-100 lines of code).

This case catches quite a few questions from new programmers (or lower reputation SO questioners).

One reason for “give me teh codez” questions might be that newbies just don’t want to do the effort. Another reason might be that they are so new they don’t know where to start. There are probably many more reasons, but I assume these are the 2 most common reasons.

Does it violate Stack Overflow rules to answer this specific kind of “give me teh codez” question?

11
  • 10
    No rule AFAIK. Ask yourself, though: Is that type of question really what we want to preserve here? It also encourages other low quality, low effort questions, both from that user and from others who see the question itself. You should be voting to close the question instead.
    – Ken White
    Aug 19, 2014 at 22:05
  • @KenWhite. Point taken on low quality questions-let's vote them down and close them. But how about the case where the question is clear, specific and well stated? Is a good question with no effort plus a clear, specific and well stated answer worth preserving---Or does the no effort part make a question unworthy by itself?
    – markE
    Aug 19, 2014 at 22:15
  • If it's clear, specific, and well stated, and the poster has clearly at least put effort into writing the question (rather than just a request for code), I'd probably answer it if it were me. I'm not sure there's any kind of general "rule" related to this, though; it's pretty much a judgement call based on the actual question itself. If the question is well-written enough to have future value, and isn't just a "Please write me the code. Be back later to pick it up." kind of thing, it's probably worth answering (and keeping).
    – Ken White
    Aug 19, 2014 at 22:18
  • I agree with no violation of anything but I typically wouldn't if they have showed no effort with at least some code. I would like to think that a by-product of the site is to help others learn how to program and think for themselves. Sometimes a little code is needed to get someone going but most of the time you can point them towards a way to figure it out themselves (or at least to start themselves)
    – codeMagic
    Aug 19, 2014 at 22:21
  • @codeMagic. I see your point. To paraphrase: "a couple lines of code is worth a thousand words". Plus it somehow "feels" better if the questioner has at least Googled+Copied some preliminary code. But I guess I'm asking about a subset of the no-effort question. Suppose a no-effort question raises a clear & useful point and suppose that its answer will be useful to future coders with the same question. Is the no-effort question "tainted" and shouldn't be answered, even if the results will definitely benefit future coders? I would answer such questions, but other SO users seem upset at that.
    – markE
    Aug 19, 2014 at 22:34
  • I understand what you are getting at. It's a little difficult to answer clearly without examples but I, personally, still would first like to see comments to the user about giving an attempt then post what they have tried. The kind of questions you are describing would be lack of picking up a book for a few minutes or just not having the mindset that a future developer needs, IMO.
    – codeMagic
    Aug 19, 2014 at 22:48
  • @codeMagic. Fair enough. Maybe one could post helpful comment(s) in the hope that the user will take those comments and edit their question to include a coded effort.
    – markE
    Aug 19, 2014 at 22:53
  • And that's exactly what I try to do if I think the user really wants to put in effort but doesn't seem to know how. I've helped people that way and not posted an answer until they understood what was going on by researching my suggestions in comments. When I've done this, the person has seemed to learn a great deal more than they would have if I would have given them the solution right off the bat. There does seem to be a problem, at times, with high rep users being a little short so there's that. But that's a different discussion :)
    – codeMagic
    Aug 19, 2014 at 22:55
  • 2
    meta.stackoverflow.com/a/260909/839601
    – gnat
    Aug 19, 2014 at 22:58
  • @codeMagic: That's also known as a proble of scale. 1on1 coaching does not scale all that well. Aug 20, 2014 at 0:22
  • @Deduplicator typically, no. But if it's done in a way where all information is visible to others to follow docs, etc... and an answer is given that may be useful to others then it shouldn't be a problem
    – codeMagic
    Aug 20, 2014 at 0:28

1 Answer 1

14

There isn't a rule against questions asking for code, and there never was.

But there's a difference between work order-like, "write my program for me" questions and "can you provide a code snippet which illustrates a solution to this well-constrained, clearly-defined programming problem?" The latter kinds of questions are the ones we want. The former type, not so much.

Further Reading
Do we need a close reason for zero-effort questions?

3
  • Thanks! Your answer adds some clarity to my foggy vision of this issue. Your link is especially enlightening. Do I understand you that if a question shows "definitional effort" but no "problem solving effort" then the decision of answering/not answering the question falls to whether the questioner is requesting a "write-it-for-me solution" versus requesting code that will help them complete a solution themselves?
    – markE
    Aug 20, 2014 at 2:10
  • 3
    "Demonstration of effort" is not a useful metric. Demonstration that you will understand the answer we give you is. Sometimes that requires you to show us some code or give us details about the research you've done so far. Aug 20, 2014 at 2:22
  • Definitely agreed! IMHO, the best answers impart knowledge at the questioner's level of understanding. "Write-it-for-me" answers may complete a questioner's project, but don't impart knowledge since that questioner is not really seeking knowledge--they're just seeking a 'black box' solution.
    – markE
    Aug 20, 2014 at 2:50

You must log in to answer this question.

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