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

I just answered a question over at StackOverflow. It was asked by someone that was clearly in over their head: "How do I add an if statement to this code? ...[insert code sample from order processing system here]"

I tried to make it clear in my comments and answer that they might be causing more problems than fixing by trying to maintain this code with their level of understanding. That said, I did provide an answer, modifying the code appropriately. Since it was such a simple mod, hopefully it provided some education for the questioner.

But should I have answered the question? How do you tell someone strongly enough that they may not know what they are doing: Code can be very interconnected: don't pull on the thread unless you are prepared for more to unravel.

What Would Jon Do? Is this like giving to the panhandler: am I just enabling the bad behavior?

Thanks all for the thoughts... No clear answer here. Turns out the questioner was working on a hobby project, which I think really changes the dynamic. +1's all around...

share|improve this question

migrated from programmers.stackexchange.com Oct 11 '11 at 15:07

This question came from our site for professional programmers interested in conceptual questions about software development.

10  
Jon probably would enlighten the questioner with a complete and canonical explanation of the if statement (nicely fitting in a four-line paragraph), then would proceed to teach him LINQ. –  Frédéric Hamidi Oct 11 '11 at 15:10
1  
Sounds like you did fine to me. –  Robert Harvey Oct 11 '11 at 15:13
    
I'll have to try teaching LINQ. Then maybe I can be more like Jon. –  John Saunders Oct 11 '11 at 15:13
2  
For your entertainment: Comments in the original question turned (a little bit) ugly once the questioner found this post/question. –  Jamie F Oct 12 '11 at 16:33

5 Answers 5

up vote 5 down vote accepted

You can't always know whether you're helping someone or just delaying the inevitable realization that the real problem is much greater than the one described in the question. You often can't see the entire situation through a window as small as a web browser. Sometimes it's even true of colleagues -- is it better to just answer the question at hand, or should you try to help them discover the answer themselves? Hard to say. All you can do is to do your best:

  • Be kind.
  • Be patient.
  • Give an answer if you can, and if you think it could be helpful.
  • Try not to confuse or mislead. Sometimes an answer can be technically correct but still increase the asker's level of confusion.
  • Don't spend too much of your own time. Figuring it out is ultimately the asker's responsibility.
share|improve this answer
1  
"You can't always know whether you're helping someone or ..." Turns out the questioner may have been working on a hobby project. –  Jamie F Oct 12 '11 at 16:32

There's levels of "over their head".

I try to explain to them why what they are asking for is not a good idea or the theory behind what they want to do if the person seems at all attentive to wanting to learn.

If the person is clearly simply relying on me to do his work, I ignore the question.

If the person is so far out of their competency that there is no possible way for them to salvage their project, I tend to be less than tactful and tell them that they need to hire someone who has the ten years of specialized knowledge the project needs.

share|improve this answer

"How do I add an if statement to this code? ...[insert code sample from order processing system here]"

Unless it's obviously someone playing around for learning purposes, I think the only right thing to do here is to tell the user to stop what they're doing and learn the basics of programming, and the language of their choice, first. Politely but firmly.

Nothing truly productive can come out of giving them a hand with the current problem: The next one is just waiting around the corner.

share|improve this answer
4  
+1 "The next one is just waiting around the corner." –  Matt Oct 11 '11 at 15:56

I think that you were right to have answered this question. Perhaps the questioner did not really understand what he/she was doing, but they will probably stand to learn a lot from your answer.

share|improve this answer

The reason someone gets into such a situation is that they believe they can do it. It's doubtful that a simple comment will change their minds. Only complete and utter failure has a chance.

It might be selfish of me, but when I see a question where I think I would be wasting my time I just move on without leaving an answer.

share|improve this answer

You must log in to answer this question.

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