Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Either I just have bad luck, I am wrong a lot, or there are an increasing number of pedants trolling on StackOverflow.

We know that programmers are pedantic (this question), especially toward non-programmers. But as a programmer, when you are trying to help others by answering questions on StackOverflow, what do you do to avoid being called out in comments, voted down, or engaged in a useless argument because of a minor oversight, or worse, something you purposely didn't address to prevent confusing the asker with too much information?

Example: I recently had someone argue with me about my choice of escaping in a regular expression: I chose (?<=\=) (a look-behind) when apparently (?<==) was all that was needed. I felt my answer was more safe (I didn't have a good reference to immediately find out whether the escape was unnecessary or necessary in all regular expression variations) and I thought it was less confusing to someone new to regular expression look-aheads.

Should I:

  • Be less thorough so that there are less possible points of contention in my answer?
  • Burden the asker with more information than they might need at that point in time?
  • Just ignore it?

Note: I didn't ask this question on meta.SO because I am not talking about the workings of SO, I'm interested in how to improve answers to programming questions in general, for everyone involved—the asker, and other experts who might also be answering or reading my answer.

share|improve this question

closed as not constructive by Mark Trapp, Anna Lear, David Thornley, Jason Baker, ChrisF Dec 3 '10 at 9:17

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

9  
"...minor oversight, or worse, something..." is missing a comma: "minor oversight, or, worse, something..." :-D (I'm sorry!) –  Gary Rowe Dec 2 '10 at 18:23
5  
@Gary Rowe - How careful where you while posting that comment? :) –  NickC Dec 2 '10 at 18:25
3  
Despite what you may think, this is the domain of Meta Stack Overflow and it's off-topic here. Although, ranting in any form is a sure way to get your question closed on any Stack Exchange site. –  user8 Dec 2 '10 at 20:31
12  
So you made a mistake due to poor understanding (excusable) and instead of letting yourself be corrected, you accuse your interlocutor of being a troll? The example you mentioned is a clear (though not a particularly bad) example of cargo-cult programming (i.e. blindly following a form without understanding why, resulting in meaningless code that happens to work by chance). I think calling that out is correct, not trolling. But perhaps that was just a badly chosen example and the other cases were worse. –  Konrad Rudolph Dec 2 '10 at 20:37
7  
To tell you the truth, I have a much bigger problem with people who get all excited when they get to close a question. 90% of the closed questions around here aren't hurting anyone and help a lot of people, but because they might be off topic or argumentative, people get all excited about being able to tell someone else off with authority. I like the idea of being self-policed, but I'd love to see a lot more "I don't think that's what I want to see here so I'll just ignore it" –  Bill K Dec 3 '10 at 0:21

10 Answers 10

Just ignore it

The trolls will always be there...

share|improve this answer
1  
Let the trolls troll on! –  Chris Dec 2 '10 at 18:23
6  
+1 for solid advice. Just deal with trolls gently, others reading your comments will understand which of you is trolling. –  Gary Rowe Dec 2 '10 at 18:24
2  
Never feed the trolls! –  Bjarke Freund-Hansen Dec 2 '10 at 19:53
1  
Who let the trolls out! Hooot! Hooot! –  Cape Cod Gunny Dec 2 '10 at 22:39

IMO, I think it's great to receive critical feedback like this. I love finding out how others do things and your example showed this quite well. It is very unfortunate when people do down vote you for something like this but I think that's just the way they are. Also, remember not to antagonize the dispute. You pretty much just have to roll with it and what happens, happens.

share|improve this answer
6  
Agreed. I'd like to know that I messed up, but also how to not do it again. I don't like being belittled for an honest mistake. –  Michael K Dec 2 '10 at 18:11

if they're right, thank them and fix it, or at least explain it so you don't confuse people.

if they're wrong, ignore it

EDIT: to take the question literally - how to avoid... - the answer is: proofread!

share|improve this answer
3  
Probably the best answer, as this stays true to the fact that SO is not trying to be critical, but rather get the correct answer. –  Stargazer712 Dec 2 '10 at 18:59

Everybody wants to rule the world. If you answer questions on SO, chances are you were trying to be helpful. Keep in mind that examples that you provide should be aimed at someone who didn't know what you are trying to explain, hence some people will be very pedantic.

9/10 times, it is people who just care about the quality of your answer. 1/10 times you might encounter someone who can never be pleased. The point is, you have one person to please, the one who asked the question .. and you should provide them with as much information as possible while listening to your peers.

Editing someone else's answer is 'too taboo' for many people, even though the system was designed for that, so you might get many down votes with just a few comments.

And then, you have these:

alt text

Worry about the quality of your answer, while taking into consideration what you peers have to say. I don't consider someone who drives by and dings me for a missing semicolon to be a peer.

share|improve this answer
    
+1 Partly for what you said, and mainly because the troll looks like trolls in David The Gnome. –  Orbling Dec 2 '10 at 19:37
1  
Where did you get that picture of my brother? –  HLGEM Dec 2 '10 at 20:09
    
ha ha! I was sure you looked like that HLGEM –  user2567 Dec 2 '10 at 21:37

Either I just have bad luck, I am wrong a lot, or there are an increasing number of pedants trolling on StackOverflow.

Honestly I think you might have been over-sensitive to criticism in this case.

This is the comment that tchrist wrote on your answer started out pretty tame and might have been useful to someone who knows less about regex than you.

That equals does not need to be escaped. Also, this pattern only works for ASCII.

If it had been me I probably would have started it with the phrase "minor quibble"

Your response however was fairly challenging and likely what caused the back and forth that ensued

@tchrist The equals doesn't need to be escaped? What kind of feedback is that? Who cares? It has a functional equals sign immediately preceding it, so I escaped it A) to be safe, B) to be less confusing. So since I'm obviously not the expert here, maybe you can tell me what the negatives are?

Update

As @grossvogel wrote in the comments

The options that don't involve pain are (a) engage the commenter in a friendly way so that both (and original asker) may learn something or (b) ignore the comment

As a personal example where I chose (a) one commentator referred to the answer I gave (which wasn't actually even mine) as categorically incorrect. Rather than engage strongly I invited the commentator provide their own answer. This had interesting results

share|improve this answer
1  
+1 It's easy to get defensive of your answer in the face of less than gracious criticisms, but it doesn't help. The options that don't involve pain are (a) engage the commenter in a friendly way so that both (and original asker) may learn something or (b) ignore the comment. –  grossvogel Dec 2 '10 at 20:39
    
I'll admit I was a bit snarky (and probably shouldn't have been) but I think it's a fair question - I wanted to know what the negative was, since tchrist decided it was worth pointing out. You'll see I let it go at the point that I discovered that tchrist really was pursuing nothing more than attempting to intimidate a "non-expert" from answering questions on regular expressions -- "Either you know what something does or you do not. If you do not, you should not be using it." –  NickC Dec 2 '10 at 20:45
1  
I agree with this answer. Your regex was doing something that could be deemed as unnecessary, maybe you didn't have time to research whether the equals needed to be escaped, or maybe you had a reason. Somebody pointed that out in a civil tone and you lashed out. Reading that thread gave me the impression that tchrist was polite in all his replies. This happens to me often, I can't dedicate an hour to make sure every detail of an answer is correct, then somebody comes along and points out something that could have been done slightly better. –  Juan Mendes Dec 2 '10 at 21:53
    
Well said. Looking over that question, the initial comment was terse but informative, it was only after Renesis's unnecessarily hostile response that things got unpleasant. –  Carson63000 Dec 2 '10 at 22:15

In most cases, it's safe to ignore it.

As @Aaron says up, it is great to receive critical feedback. That's what these sites are all about, right? But, there is a difference in receiving critical feedback and what you call syntax pedants (cute :-).

Critical feedback, in my opinion is expressed in two ways. One is writing down your answer with your version of the solution, and with your opinions (obviously). The other is either in your answer, or in the comments of the answeree giving reasons why and how can his particular solution (the answer of the answeree) be changed for the better. Notice I choose my words carefully here - just emphasizing that something could be made better in a way, and for what reasons, but not in any case criticizing the original solution. Heaven forbid, changing it! The original author had a way why he choose that particular solution, and we all know there is no such thing as a "best solution" to a problem. Your question gives a nice example of that.

Then there are syntax pedants. If I undestood from the context, they're what we used to call "usenet spelling or grammar police" in the old days (well, not so old). They're the opposite of "a friendly nudge" in terms of technical clarification. They will insist that their answer is "better", and will actively try to emphasize it as "the correct one".

Generally, this is a community edited site, and with some exceptions the community can make edits and modify the contents to their liking. Provided they have enough rep. of course, which is usually just a matter of time. Personally, I take the view, that apart from spelling errors, the original answer should stay, and should not be modified unless you're putting something new and useful into it. Stick to modifying it only if there is an apparent error.

If someone has a different view on the problem, he is free to put it in his own separate answer.

Why I think this is the way it should work? Because smart people are few, and the majority is well, (there are the words of Linus Torvalds, so don't blame me for this :-) idiots. And what happens when you put something good into the hands of idi... uhmm, the majority. They take it down to their level. BAD.
Of course, there is the opposite example of that as well, but usually the bright ones know how to behave and post their answers in a proper way without disturbing yours.

Just my 0,02$

share|improve this answer
    
Syntax pedants are not the same as spelling or grammar Nazis. If you don't use well grammer or speling, that doesn't matter much because you're talking to humans. If you're talking about stuff that goes into the computer, syntax pedantry becomes a lot more important. In many cases, one answer will be better than another for objective reasons, and it's useful to know that. –  David Thornley Dec 2 '10 at 20:23
    
@David Thornley however, even the compiler understands multiple ways of accomplishing the same thing, and arguing about which of them is more "correct" is often entirely pointless. –  NickC Dec 2 '10 at 20:40
    
+1 @Rook, "Stick to modifying it only if there is an apparent error." - I agree. Comment if there is a significant reason why a portion of the answer could be improved, but if it's sixes either way, just keep it to yourself. –  NickC Dec 2 '10 at 20:41
    
@Renesis: And, often, there are better and worse ways to do things even when the compiler doesn't care. Computers aren't the only thing to read programs: people have to, also. Further, some constructs are more error-prone, and hence (all other things being equal) bad. –  David Thornley Dec 2 '10 at 22:20

Learn to code the only true and right way!

share|improve this answer
    
Which is the only true and right way...? –  Gary Rowe Dec 2 '10 at 18:29
    
@Gary Rowe: You should know! –  haylem Dec 2 '10 at 18:30
    
Sure do, and it's bending my brain as we speak. –  Gary Rowe Dec 2 '10 at 18:35

Regularly I will be answering a question and the familiar "load new answers" banner appears and the thought runs through the mind, should I continue?

As a rule, I load the new answers, if they say what I was going to say, I abandon, mark that answer up. Often I have more to say on the matter, alternatives to provide, expansion of points to make.

Occasionally, well a few times a day, someone will come along and complain or vote down the "alternative" answer (which will be stated as alternative), because it is "inefficient" or "not the best".

Now you see, my view of the Stack Exchanges sites are that they are an educational wiki, questions are asked and answers given for the purpose of educating the asker and anyone else who stumbles upon the question thereafter. It is important when learning to see different approaches as what may be the best approach for the specific circumstances of the question asked, may not be for the future reader - in any case, it is better to be aware of the value judgements made that make the other answer more favourable.

Trolls and pedants can both hinder and harm the site, if they correct mistakes and factually inaccurate statements, great; if they stifle debate or incite favouritism then they need to find something else to do.

share|improve this answer

My opinion is: People trolling, or they just want to show their burning intellect - doesn't matter. In internet and in real I always pass through myself all the information that comes to me. But there is a trick - I always filter all incoming information. If a troll just flooding in my post/comment - I see it. If there is nothing interesting - I'll ignore it. If I'm interesting how this troll will behave in some situation and what it will say - I'll ask it (read as: "I feed it"). Sometimes even trolls can provide very interesting information if you read it "line after line" and pass through filter, just not to harm yourself :)

share|improve this answer
    
That's generally a good way of handling info in real too :-) +1 –  Rook Dec 2 '10 at 18:52

I will often open a new instance of my IDE and write a quick console program that demonstrates a possible solution to the problem.

If the OP has included sample code in the question, then that's great, since it gives me something to start with and it allows us to have a common sandbox in which to communicate clearly. If the sample code actually compiles, even better!

Once I've compiled and run my sample program to ensure that it actually works, I'll often just copy the entire source code (since it's usually just one file) into my answer and say "Below is a complete working example..." Usually I'll have a paragraph or two before the code that explains my approach so that the reader doesn't have to figure out what I'm doing just from the source code.

One downside of this approach is that it takes more time to write an answer. On meta.stackoverflow.com, you can find references to the "Fastest Gun in the West" problem, which asserts that the quickest answers are often the ones that receive the majority up-votes, even if another apparently better answer is posted later.

In the extreme case, you might end up getting either the Tenacious badge or the Unsung Hero badge for having enough accepted answers with zero up-votes. Small consolation, perhaps. I find that this sometimes happens to me when I feel that I've provided a much more thorough answer that is more considerate of the OP's situation than other popular answers.

The best compromise is probably to post an initial answer that briefly explains your solution along with a note saying that you are planning to edit your answer with further detail and/or code examples soon.

At that point, if I have detractors that criticize my answer, I will either acknowledge the error and correct my answer while thanking them for pointing it out, or I will add a comment and/or update my answer to clarify why I disagree with their criticism.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.