24

A question was asked with the tags and . The asker is creating threads manually and trying to synchronize access between threads by creating his own thread pool.

Later, an answer was posted to this question. It said that using ExecutorService (provided by Java) is a good solution to the problem but it wasn't available when the question was asked.

There is an existing tag that was not part of the original question. Should that be added? Is it good practice to update the question with applicable tags, as evidenced by a new answer?

One advantage that I see to adding the tag is that the question will get more attention from people who follow the new tag. Those people can provide some more good solutions, or improve the existing answers.

I have gone through Tagging a question based on its answers but it does not address the lateness of the answer.

  1. What if the user did not accept the answer, and the community up-voted the answer?

  2. What if the question is very old (like 7 years) and community is providing answers with latest technical advances? (E.g. pre Java 8, interface does not have implementation. Since Java 8, you can have static and default methods in interfaces.)

e.g.

Why can't I define a static method in a Java interface?

Is there more to an interface than having the correct methods

In this case, can I update the question with tag "java-8" by highlighting Java 8 features in the answer?

7
  • 12
    In general, no, this is not good practice. However, in very specific cases, it might be acceptable. What I have in mind are cases where the asker doesn't know enough about the solution to tag the question effectively, but an answerer does. This might be one of those cases, not sure, I'm not a Java expert.
    – Cody Gray Mod
    Commented Mar 9, 2016 at 13:42
  • 2
    User is not aware of new technology that is going to solve his problem. Is it right to update the question with tags in the answer? In this case, you will get attention from followers of new tags and they can provide some more good answers. Commented Mar 9, 2016 at 13:44
  • The example may also be an example of an XY problem. Commented Mar 9, 2016 at 13:59
  • 4
    Keep in mind that tags exist to help people find questions effectively, not to describe what the question is asking. Applying a tag that helps people find the question that would want to find that question is being helpful. It is the job of the text of the question to describe what is being asked for.
    – Servy
    Commented Mar 9, 2016 at 14:01
  • Pretty unlikely that answer should have been posted, okay as a comment. We can't get quality Q+A when the Q is assumed to be without quality. There are better ways to deal with such a Q. Commented Mar 9, 2016 at 14:12
  • 2
    It changes the context and may give a different impression of the circumstances that led to the question. Sometimes the difference could be simple like technology that wasn't available at that time, but other times the difference can be more subtle, leading to unintended consequences. In simpler words, you could be changing the question significantly without even realizing it.
    – prusswan
    Commented Mar 9, 2016 at 19:10
  • 1
    add tags, but not remove them Commented Mar 10, 2016 at 0:10

2 Answers 2

26

Tags are meant to help narrow the scope of the question. If the asker is asking about java multithreading, then using the [java] and [multithreading] tags is appropriate. However, if the question doesn't ask about ExecutorService, nor does it use ExecutorService in a provided MCVE, then there's no reason to assume that the asker is interested in that answer. (Though of course that does not and should not prevent people from suggesting it anyways.)

In your other example with Java interfaces, I would still argue that the original question isn't asking specifically about Java 8, and therefore that tag should be omitted. If answers want to mention a new interface feature from Java 8, great, but that isn't the focus of the question.

The only exception to this rule, as @CodyGray mentioned, is when the asker is trying to ask a question about some particular technology but doesn't know the name for it. Also, if the asker is using that technology already but hasn't added the tag for it, then I think it's okay too.

So to finish up with an example, let's say there's a question about the lifecycle of an activity on Android that only has the [java] and [android] tags. I don't see much harm in adding [android-activity]. However, if the answers start talking about fragments and their relation to activities, you should not add the [android-fragments] tag unless the question is already using fragments , it's relevant to the actual problem being asked about, and the asker doesn't realize it.

15

The value of Stack Overflow is in the quality of the information in both the questions and the answers. If the point was to have a place to get questions answered then we could just delete the questions after an answer was accepted.

Q&As live on far past the point where the original poster doesn't care any longer. These questions keep getting richer with information and they continue to have value to other people far down the road. Because of this the nature of the question evolves and changes.

I agree that anything that changes the nature of the posters question is wrong, up to a point. The problem is that this ignores all the other stakeholders later on.

Tags are also part of the discovery process when people are looking for information. If a Q&A has information that would later help a person the goal should be to make it as easy as possible to find. Allowing after the fact tagging would help that. Pertinent tags could be added as new technology gets discussed and the value of the Q&A could increase.

My proposal would be to allow people to place tags on answers. This would avoid the issue of changing the posters intent while still allowing the appropriate tags to be added as needed. This would also allow a person searching to quickly find the answer that relates to their interest, even if the original question didn't.

7
  • 1
    Tags are most useful in sorting and categorizing questions. I don't see a need for tagging answers; you can just use a full-text search to find information in answers. I had upvoted this until the last paragraph, but I don't want to endorse that suggestion, so I removed my vote.
    – Cody Gray Mod
    Commented Mar 10, 2016 at 9:05
  • 4
    Its fine to disagree, that's what the meta section is for. I do think the ability to add tags does help add context to the information. My goal with the last paragraph would be to give us that ability without compromising the integrity of the original question. Full text search is wonderful, but it doesn't find everything. It would be rare for me to state a meta level technology description in an answer whereas that would be perfectly normal in a tag. That is what they are for. In the long run answers are an integral part of the question, making answer tags helpful for categorization.
    – drobertson
    Commented Mar 10, 2016 at 13:40
  • In a certain sense you already can: firstlawofrobotics (it doesn't render properly in comments, but in a post it will actually look like a tag). Commented Mar 10, 2016 at 17:43
  • 2
    I've occasionally wished I could tag my answers. e.g. an [x86] answer on a C question, when the problem has stuff that vectorizes well with SSE intrinsics, but that current compilers don't autovectorize. Commented Mar 11, 2016 at 11:22
  • 2
    Tagging answers feels it could be useful (if FTS is good enough to search answers, why isn't it good enough for searching questions?) Relating to the original example, someone might be looking for examples of how to use ExecutorService, which rightly often won't/shouldn't be in the question's tags, but it could help if an answer about it could be tagged as such. Similarly, for a "generic" Java question, an answer that only works on Java-8 could be tagged as such.
    – TripeHound
    Commented Mar 11, 2016 at 13:53
  • 2
    For some kinds of answers, tags could be useful. For example, all of the javascript questions that don't explicitly ask for a jQuery answer, but get one anyway. The question isn't inheritly about jQuery, but could potentially be answered with it and a user searching for a jQuery solution might miss that answer if the question isn't tagged with it.
    – zero298
    Commented Mar 11, 2016 at 17:20
  • 1
    When I hit SO for advice, I really couldn't care less if it is in the question or the answer. I think one should tag for both. Restricting the tags to the question is maybe logical in some sense, but it is not the most useful.
    – Mike Wise
    Commented Mar 11, 2016 at 21:37

You must log in to answer this question.

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