19

I was looking through the Stack Exchange hottests questions and stumbled on one of the Programmers questions:

When do you start documenting the code?

Because I'm reading Code Complete and I hoped to find another insightful post to help me decide when I should be doing this. Only to find an answer like:

If you don't comment the code as you write it chances are minimal that you will come back and do it later (let alone do it properly).`

Honestly? This answer only tells the OP he should do it, because else he has to come back and do it anyway. No explanation about how writing your code as pseudocode, which can be converted to comments might lead to fewer errors. Or how commenting what you write helps you think harder about the code you just wrote. Nothing.

Why does this answer have 25(!) upvotes? That's a lot of rep for something that doesn't answer the question and clearly doesn't teach anything to users who are interested in it.

Now if this were just incidental it wouldn't be a problem, but I stumble over your 'hot' questions a lot and more often than not I've come back disappointed. Don't believe me? Here's another example from the top 50 Laptop ergonomics: How do you position yourself when working on a laptop for long hours?

Normally, like I would if I was working on a desktop computer. Regular desk, a sturdy wooden chair (I don't like ergonomic chairs or anything of the kind) and a normal posture. Worked for me. YMMW though!`

Nothing about using an external keyboard, a mouse rather than a trackpad, using a laptop stand for a better viewing angle or height? There's a whole industry devoted to this and there's actual science behind the ergonomics, yet an answer that says: 'Worked for me' gets 5 upvotes.

Now I don't have a solution to offer, but as a fellow Stack Exchange user I think upvoting such answers is giving a bad example. Worst of all, legitimately interested users like myself are repelled from even looking at Programmer questions any more because of the bad experiences, which I hope isn't something we're striving here for.

Should we be rewarding poor quality answers like this?

13
  • 9
    The first answer you cite seems like a perfectly valid answer to me, with a perfectly valid rationale. Commented Aug 8, 2011 at 3:51
  • 4
    Also in the second example, the answer perfectly matches the question: "How do you position yourself when working on a laptop for long hours?" (emphasis mine)
    – user281377
    Commented Aug 8, 2011 at 7:33
  • 3
    @GrandmasterB: then its clear we have a disagreement in our quality standards, because if you need to know that its a valid answer, then it no longer has any value. Ironically after my posting it got an additional 11 upvotes, which makes the outlook even more depressing
    – Ivo Flipse
    Commented Aug 8, 2011 at 11:15
  • 3
    @ammoQ that's makes it very localized question and of no value to anyone other those who answer, so it should be closed.
    – Ivo Flipse
    Commented Aug 8, 2011 at 11:15
  • @Ivo: Indeed, it's a poor question and has already been closed.
    – user281377
    Commented Aug 8, 2011 at 12:13
  • 18
    1. Down vote 2. Leave comment 3. Add your own answer, if you can.
    – Nicole
    Commented Aug 8, 2011 at 16:23
  • 2
    Where's your answer?
    – JeffO
    Commented Aug 10, 2011 at 18:47
  • Where's who's answer @Jeff O?
    – Ivo Flipse
    Commented Aug 10, 2011 at 18:55
  • 1
    @Renesis This is why I believe that down votes on ANSWERS should be free.
    – Stephen
    Commented Aug 11, 2011 at 18:56
  • I personally like short answers that are correct. It's like a summary, then you can look for more detail below it. Because maybe someone is in a rush, glances at first answer and has to go. Maybe we can limit the rep for one-liners though, to a certain number of votes.
    – user29032
    Commented Aug 16, 2011 at 17:56
  • 1
    @Adel, there's a difference between giving a summarized answer and one that lacks any context.
    – Ivo Flipse
    Commented Aug 16, 2011 at 18:15
  • 1
    Couldn't agree more with @Renesis. If you don't feel justified in downvoting and don't want to leave a comment, then maybe it's in fact a not-so-bad answer after all...
    – user541686
    Commented Aug 24, 2011 at 21:30
  • You need 125 rep to be able to downvote, though hypothetically I could visit the site as an Anon and leave feedback that way. Either way, my comment which is at the bottom of an answer, most likely won't stop users from upvoting these answers.
    – Ivo Flipse
    Commented Aug 24, 2011 at 22:18

6 Answers 6

8

Respectfully, the problem with your first cited example may not be the answer, but the question itself (which the top-voted answer answers cleanly, succinctly and correctly).

Ask a specific question, get a specific answer. Ask a general question, get a general answer (which, by its nature, will attract lots of upvotes).

This is why we try to encourage people to write questions that are specific and answerable.

2
  • 9
    A bad question is not free license to provide contentless answers: it just perpetuates the problem and rewards people for taking zero effort in asking and answering. If a question can be improved, it should be edited first, then answered.
    – user8
    Commented Aug 8, 2011 at 7:35
  • 4
    All I can do I repeat what @Mark has said, you're not just answering the question for the OP, but for potentially hundreds or thousands of other users as well. So if the question is to specific: close it as too localized!
    – Ivo Flipse
    Commented Aug 8, 2011 at 10:30
5

I've seen something similar to this (on stackoverflow.com) even for very technical, answerable questions. The problem is that the really hard questions either don't get answered, or when they do the general community doesn't care or doesn't recognize that an amazing answer has been posted. Because you aren't going to upvote something you don't understand yourself or aren't involved with. On the other hand, when someone asks something like 'why are singletons bad practice?' or 'why does jquery use the $', everyone wants to either jump in and answer or at least upvote something that sounds about right. The result is that reputation is awarded to popular, general, easy, and well-known questions/answers.

Having a high reputation is probably a function of cherry-picking easy questions and not (necessarily) being a guru.

Not sure how to "fix" this sort of thing, but it's definitely been laughable to me when I answer a difficult question and get maybe (maybe!) 1 upvote. And then later I'll answer some trivial c++ question posted by a complete beginner. And, because I happened to be the first person to see it, I end up with like 10 or 12 upvotes.

1
  • 2
    I couldn't agree more. It's so frustrating to be guided by numbers that mean nothing. I thought SE was an organized, filtered, quality knowledge base but I was wrong. It's a jungle, like any other forum out there. Anyway, quality is a moving target. I like concise and focused answers, but SE promotes the opposite...
    – Ando
    Commented Aug 12, 2011 at 23:11
4

Why does this answer have 25(!) upvotes?

Because it is:

  1. Correct. It may not be a 20 page treatise on the subject, but you cannot deny that it is ultimately correct.
  2. Succinct. Some people prefer answers that are brief. Indeed, I sometimes find that overly flowery and highly detailed answers are less useful than a quick sentence that points the person in the right direction. Long answers are not better even if they are more detailed.
  3. Sufficient. Any of the techniques you discuss ultimately involve something that has little to do with comments themselves. Those are general coding techniques; you could just as easily keep the "comments" in a separate text file or even on paper. This answer provides exactly what the user asked for: the time to start commenting. Namely, as you write the code.
  4. Flippant. For many programmers, the answer is so obvious that even asking the question shows that the person didn't spend much time actually thinking about it. And therefore, a flippant response is entirely appropriate. Generally, quite a few people will upvote flippant responses to seemingly dumb questions.

Note: I'm not saying I agree with any of these reasonings for upvoting. But all of these are properties of the answer.

Are there times when a poor answer is upvoted? Absolutely. So what? It happens. You deal with it and move on.

You cannot make people agree with what you consider to be a poor quality answer. Everyone has their own idea about what constitutes a good answer. Some people only consider multi-paragraph essays to be good. Others feel that if you can point someone in the right direction, that's a good answer. And so on.

You need to accept that other people are not going to agree with what you consider to be poor quality.

1
  • +1 100% agree with your reasons.
    – user541686
    Commented Aug 24, 2011 at 21:26
3

Should we be rewarding poor quality answers like this?

The problem is determining if the quality is poor.

This answer only tells the OP he should do it, because else he has to come back and do it anyway. No explanation about how writing your code as pseudocode, which can be converted to comments might lead to fewer errors. Or how commenting what you write helps you think harder about the code you just wrote. Nothing.

I don't think that the quality of the code documentation/commenting answer is poor at all. The asker wants to know when he should be documenting code. The other information, although true and possibly helpful, does not necessarily answer the provided question. Should it be included? I would probably include it. Must it be included for an answer to be good? No, as long as the answer addresses the question asked.

If you re-read the question, the person asking doesn't ask anything about how to reduce errors (which is a good thing) or thinking harder about design and implementation (another good thing). He just wants to know when you should document your code. The answer says when you should, and says why you should write it at this point in time.

Would I include more information, about producing pseudocode as a form of documentation, for example? Yes, probably. But that doesn't explicitly answer the question. I would consider upvoting this answer (although I typically read all the answers, and upvote the top couple).

Nothing about using an external keyboard, a mouse rather than a trackpad, using a laptop stand for a better viewing angle or height? There's a whole industry devoted to this and there's actual science behind the ergonomics, yet an answer that says: 'Worked for me' gets 5 upvotes.

As for the ergonomics answer, that is a little lacking. More details about the environment would be extremely helpful. However, it's not a bad answer at all. The answerer should discuss his entire work environment - desk, chair, keyboard, mouse, monitor size and position, and so on. Another good answer would link to research or studies on ergonomics.

The "works for me" approach is common here and Programmers, and it should be given the nature of the majority of the questions. However, the answer you mention doesn't really delve into why it works for the person writing the answer, which is key. Without the why, it becomes harder to tell if it will also work for me.

I wouldn't upvote this answer, but I also wouldn't downvote it.

6
  • I'm curious as to why someone disagrees with answering the questions asked...
    – Thomas Owens Mod
    Commented Aug 8, 2011 at 2:52
  • 1
    Well, by way of a counter-example, I just removed a substantial portion of your answer that doesn't really address the question being asked. While it did change what you said, it also (IMO) made it a better answer. Commented Aug 8, 2011 at 2:53
  • @Robert Actually, it did answer an original part of the post (which I don't see anymore, perhaps it was edited away within the grace period, since it's not in the history, or I'm just gone insane) where it was proposed that answers be edited by other people. With that part of the post gone, it still (1) preserves the integrity of my answer with respect to the questions asked and (2) made it a more readable, easy to understand answer. Those are the two criteria for an edit.
    – Thomas Owens Mod
    Commented Aug 8, 2011 at 2:58
  • There has been some discussion in the moderator chat room about being more proactive with editing (I am a moderator on Stack Overflow). The problem is that the original posters are the ones most vested in their own questions or answers (I personally don't have the time for such cleanup efforts), and all too often it seems OPs are more willing to abandon their posts than they are to improve them. Commented Aug 8, 2011 at 3:04
  • 1
    @Robert I don't think there's that much that anyone can do about that problem. If a person isn't willing to make their question a quality question that not only helps themselves, but other people, it should be edited for grammar/spelling (all posts, even those in a closed question, should be written in clean, readable English) and closed for too localized or not a real question (or any other relevant reason), with a note left for the author should they come back later. If the author can't at least help clean up after themselves, I say whatever. We deal the best we can.
    – Thomas Owens Mod
    Commented Aug 8, 2011 at 3:07
  • No argument there. Commented Aug 8, 2011 at 3:09
1

I've noticed conflicting and uncomfortable attitudes toward the Programmers users. On one hand, we need users to generate the content that makes the site interesting and enjoyable. On the other, we don't trust those users to make good decisions. When you ask, "Should we be rewarding poor quality answers like this?", you question the legitimacy of more(assuming downvotes) than 29 users' opinions. You're bypassing the voting process and appealing to Meta's perceived higher sense of quality.

I don't blame you. I, too, find many Programmers questions and answers poorly written, irrelevant, obnoxious, or just plain stupid. Despite that, I recognize in a democratic system there are bound to be times I'm in the under-served and dissenting minority. My disagreement doesn't make everyone else wrong. The democratic dynamics are even harder on Programmers (compared to other StackExchange sites) since its questions tend to elicit answers that are more persuasive exercise than objective truth.

I can put up with highly-rewarded, weak questions and answers. What I'm more afraid of is a small group of highly-motivated, well-intentioned users controlling the site's policies through Meta advocacy and aggressive editing. I know all users are welcome on Meta, but relatively few participate. These non-participants show approval and disapproval with their votes. It would be a shame to diminish the value of those votes with new rules or policies. Users won't participate if their input is ignored or they sense condescension.

3
  • 2
    You aren't in the minority: there were 384 users voting this month and 39,000 users total. 18 and 35 people voted the question and answer up, respectively. Even looking at our all-time highest voted questions, it only comes to a small fraction of the userbase. The people who participate in meta are an even smaller fraction. There's definitely a silent majority, but it's not the people up-voting junk or down-voting answers on meta.
    – user8
    Commented Aug 10, 2011 at 18:31
  • 1
    @Mark Trapp I hope I didn't come across as suggesting everyone's weighed in and good taste lost. Obviously, very few users chose to vote on each Q/A (I didn't vote on the cited question since I don't see how any answer can claim to be definitive). I'm just pointing out that, of the users who voted, it's always possible to end up on the losing side despite having good taste. Commented Aug 10, 2011 at 18:55
  • +1, very good answer, Corbin. Its the nature of democracy, sometimes you just have to put up with things you dont like. Commented Aug 10, 2011 at 22:17
1

How about an "I Demand a Recount!" feature? It could work like this:

  • After X users indicate the question/answer landscape has changed enough to warrant a recount, the question goes into recount mode.
  • Each user who cast a vote is notified and encouraged to revisit the question.
  • For X days, all votes are unlocked and may be modified/reallocated to better reflect the new question/answer landscape.

You must log in to answer this question.

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