53

I know about this question, but this one is different.

I found a question that was well formed and clear. Both grammar, purpose of the code, and the code itself were correct and present respectively.

Yet, I don't know how to help the one who asked, as he doesn't seem to know what his code even does, how the frameworks that he's using work, etc. He seems very confused, for example, between Angular's controllers and ASP.NET MVC's controllers (totally unrelated code).

This is not intrinsically a bad question, but I can't just write the code for the user and let him use it, and he doesn't really seem to know how to do it himself.

Am I wrong in my assessment of the situation? What should I do?

11
  • 1
    You can always drop a comment and ask for clarification (if you don't know why the OP is doing something in a specific way) or suggest better ways to do something after understanding the OP's reply to the first comment. I would not write the entire code for OP. From what I see, OP doesn't know where he is going wrong. Apr 15, 2016 at 9:12
  • 3
    After a quick glance over the question and the comments, I'm very tempted to close it as "Too broad".
    – Cerbrus
    Apr 15, 2016 at 9:26
  • I flagged it, but it wasn't accepted. It could be a good question, if the asker understood what is going on...
    – RaidenF
    Apr 15, 2016 at 9:28
  • Off topic: this post was edited, to not show the 1st line as a spoiler, quoting "really annoying and unneeded spoiler". Is it frowned upon to use spoilers? I just didn't think it was very relative to the question and most users wouldn't want to read that line.
    – RaidenF
    Apr 15, 2016 at 9:29
  • 1
    @K.Gkinis you're right, so I deleted my comment, (not that it was intrinsically wrong, just no tapplicable here, as you say:). Apr 15, 2016 at 9:47
  • 15
    @K.Gkinis: I would view it as annoying to have a grey box which only showed anything when I hovered over it, yes. It's not like a movie spoiler where you deliberately want to obscure information.
    – Jon Skeet
    Apr 15, 2016 at 10:35
  • @JonSkeet Noted, will know in the future.
    – RaidenF
    Apr 15, 2016 at 10:50
  • 9
    @K.Gkinis: Yet all users need to move their mouse over it to find out whether they want to read the line, by which time it's too late anyway. So literally all you're doing is causing work for people. It's an inappropriate use of that feature. Apr 15, 2016 at 12:45
  • 2
    @LightnessRacesinOrbit When you explain it, it seems embarassingly obvious xD
    – RaidenF
    Apr 15, 2016 at 12:57
  • 3
    @K.Gkinis: It's a gift :) Apr 15, 2016 at 12:59
  • 1
    You used a term he wasn't familiar with when referring to client side code. You took that as him not knowing the difference. I didn't come away with that conclusion at all.
    – user1228
    Apr 15, 2016 at 13:40

4 Answers 4

75

You can't.

If the user's skill isn't up to the level of understanding the code that they posted, the likelihood that they'll understand the answer is pretty small.

Fortunately, this is not your responsibility. Provide an answer roughly at the difficulty level of the question, and let the OP manage their learning curriculum. If they need to pick up a book and do some studying, then so be it.

10
  • If it's a bad question that the OP should have just googled, I've occasionally taken the passive-aggressive approach of writing an answer that might be interesting to other SO readers that visit the question to see what it's about, but that intentionally more technical than the question. e.g. yet another x86 asm "How do I do this in asm?" "The same as in any other language, as usual", I just chose an interpretation that would make it interesting (asm is for high perf) and wrote up an optimized SIMD implementation of finding the max in an array. Apr 15, 2016 at 13:31
  • 6
    @PeterCordes: Gunning for reversal? You're probably going to be disappointed when your answers eventually get deleted along with the question, but that's fine I suppose. Still, it would be much better if you answered good questions where your answers would then get the appropriate amount of attention and help the most people in the most relevant way. Apr 15, 2016 at 14:07
  • heh, that's definitely the exception to my question-answering practices. It was more of a too-broad than a "should have googled" question, now that I look at it. It was a combination of there being an actually interesting answer, and being in a snarky mood. There's nothing really special about that answer; I didn't spend a long time on it, and it wouldn't be a big shame if it got deleted Apr 15, 2016 at 14:47
  • 2
    I like your answer because the very nature of someone asking a question indicates SOME GAP in understanding. That gap will dramatically vary between OPs and to manage that is unrealistic and unnecessary.
    – joshmcode
    Apr 15, 2016 at 19:19
  • 1
    @joshmcode: Definitely. I don't know where the idea came from that we have to do all the learning for people. Apr 15, 2016 at 19:20
  • This is what StackOverflow has become. A community of arrogant people who have forgotten the original reason for StackOverflow - to help others. Sometimes, the little rants that these people write as answers take the same time as actually replying to the question and helping people. Apr 15, 2016 at 19:28
  • 16
    @user4811392: No, the original reason for Stack Overflow was to create a peer-reviewed repository of re-usable questions and answers that would be far superior to the forum-style, "helpdesk" websites of the day. Yes, arrogant people have forgotten this, instead proclaiming in their loud and ignorant voice that we must do everything we can to "help" at every opportunity, turning the whole system into a useless cesspit of single-shot message board garbage, and producing a whole generation of utterly incompetent "software developers" whose only skill is begging here for help. It's a crying shame. Apr 15, 2016 at 21:29
  • I agree - and perhaps the people behind these arrogant little rants who don't help anybody lack the ability to differentiate between those who really need help from those who want it easy. All I'm saying is that we should be more sensitive and considerate about these developers and give them the benefit of doubt - not all of them want you to do their job, they do want to learn. Peace. Sorry if I call you arrogant. I didn't mean to. Apr 15, 2016 at 21:41
  • 12
    @user4811392 so..... Jump into the php tag for a while, answer and educate, assume the best out of everyone. This is definitely how most of us START on stack. The issue is that there are WAY too many question askers that dk not care AT ALL. it's easy to become jaded when you get insulted day in day out because you refuse to write their homework for them. After too much of that, you don't give the benefit of the doubt. And that whole frakking approach by many "but stack was meant to help". Yes. In a VERY specific way. Not the one most people think.
    – Patrice
    Apr 15, 2016 at 22:20
  • @Patrice: Spot on. Apr 16, 2016 at 13:37
29

I try to help novices by explaining the process of breaking down a problem into smaller steps. Usually that process is what they're actually hung up on: their underlying question is about that process, not about programming. It can be very difficult for a novice (or a non-novice) to take a big goal and break it down into its constituent parts. It can be equally hard to take an existing codebase (even if they wrote it) and try to add a new feature to it. So I try to help break things down into smaller chunks, because that's what they're actually struggling with.

Here is my template, applied to this meta question:

Break their problem down into smaller steps.

Step 1: Be honest. Tell them that they might have better luck if they start with a blank project and only add one small thing at a time.

Step 2: Try suggesting some small steps that they might break their problem down into. Keep these as small as possible. Smaller than they think is interesting. Explain that by keeping things small, they'll get more done.

Step 3: Tell them to keep these steps in isolation. If their end goal is to create a program that does ABCXYZ, then first they need to create two small example programs: one that does ABC, and a separate one that just does XYZ. They might even need to break it down further into a separate program that does A, another one that does B, etc.

Step 4: Tell them that if they have a problem with one of these small steps, then they'll already have an MCVE that they can include in a new question along with a specific question.

Step 5: Then when they have each example program working independently, then they can start thinking about combining them. As always, take one small piece at a time.

That's what I do. Many people are very responsive to this, as what they really needed was somebody to help outline the process of breaking down a problem into smaller parts. That's a huge part of programming, but it's one of the hardest to teach (and learn). Some people are frustrated by this approach, but those people are usually the "gimme teh codes" variety, and there isn't much we can do for them anyway.

1
  • 5
    This is so good that I'm going to refer back to it so I can improve the quality of my answers. Apr 16, 2016 at 11:50
5

I have noticed that many questions have something like "I am new to coding and need assistance". If they have provided some code that almost works, they are at least trying. It is helpful to comment out information in the answer code how that line (or lines) work. No, this should not be a total tutorial session. But, if the answer provides some helpful insight, the OP might learn enough from that to move on without much more intervention. Well, at least for that issue.

I was like many others on here when I started coding with VBA. It was a work project thrust upon me by management. You need to code this in VBA without training. I found SE. A lot of talented people here have helped me come a long way in a short time. I have been able to utilize this site, and the new information I have received through my questions that I find myself asking questions on here a lot less frequently. Yes, I have bought books and am interested in taking some advanced courses.

But a number of the OP's are new, and under pressure at work from management. Some have inherited code that no one understands, so they put the responsibility on someone. I agree that anyone asking a question in these forums should show effort in resolving the issue. I struggled with this in the beginning and had a lot of down votes and closed questions. Some were closed as duplicate questions. I learned from those mistakes as well.

In the end, sometimes adding a little more to the answer than "Try this:" will go a long way towards teaching someone to fish. Yes, some people will keep coming back for free answers and that will always be a problem.

1
  • 1
    "In the end, sometimes adding a little more to the answer than "Try this:" will go a long way towards teaching someone to fish. Yes, some people will keep coming back for free answers and that will always be a problem." - This is exactly what I'm doing (or want to do). Also one can still only sketch things, not explain in detail. Thus those who just want the answer won't get it but those eager to learn get a small push in the right direction. In the end this will pay off.
    – Trilarion
    Apr 17, 2016 at 20:49
2

If the asker does not understand even the basics, the question can often be closed as either

  • unclear what you are asking, if their lack of understanding has thwarted their attempt to describe the specific problem

  • too broad, if an answer that they would understand would amount to a tutorial

Such questions are rarely useful to anyone else, so are often worthy of a down vote.

You must log in to answer this question.

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