38

A recent post on SO Meta mentioned this:

[...] we are in the early exploration phase of:

  • [...]
  • making it possible to label individual answers with technology versions — for example, [python-v2] vs. [python-v3].

I think this feature could be beneficial to other sites on SE. As a Code Golf regular, I'll list possible benefits and implementation considerations mainly for this specific site, but some general ideas may apply to other sites as well. (I can imagine some sites may not find this helpful; in that case, it could be made an opt-in feature per site.)

Benefits

Categorize answers (obviously), and search answers by label.

On Code Golf, each question (challenge) has many answers in different category (language). The benefit is not very obvious by itself, but if we get related features like "search answers by label" or "filter answers by label on question page", it would be much better. Especially search answers by label: plain text search doesn't help much when the language name is a common English word, is very short, or contains special symbols. (I do this kind of search a lot when I pick up a new language, mainly to check out existing solutions on the site in that language, or to check if a given challenge already has an answer in it.)

Other possible categories/labels on other sites might look like these (just some ideas):

  • SO: language versions (already mentioned in the SO meta post), maybe "meta-categories" such as outdated, good/bad practice
  • Puzzling: [no-computers] vs. computer-assisted answers, post-mortems a.k.a. "creation-of" answers

Allow gathering statistics per answer label.

Probably this part was already in mind in the SO meta post, since it is mainly about gathering statistics about answers and user actions on them. For general use, I think a new column in the Posts table on SEDE and/or an extra field in the API would be a great addition.

We use various scripts and/or SEDE to gather data about answers, but pattern matching on the rendered HTML (as the post body currently is) is a mess. HTML formatting can change and scripts break. All the different heading formats people use make it even worse. A separate field indicating the label solves the issue neatly; we don't need to try to parse HTML at all.

Considerations

Separate answer labels from question tags

Some existing tags may overlap with some nice answer labels, but they serve different purpose. On Code Golf, the distinction is significant: each answer category will represent a language, but usage of language tags on questions is generally discouraged. (No, blacklisting is not an option, since their usage is justified in [tips] questions for example.) I'm not calling answer labels "answer tags" because of this point.

Do not bump posts on answer label edit

We have hundreds of thousands of posts (if not millions) to add labels to answers accumulated so far. Bumping every post on every answer label addition would make the site unusable.

11
  • 1
    "Wonderful" idea. One more excuse for users wanting to post their SharePoint Online specific answer on my question that is about SharePoint 2010. No thanks.
    – SPArcheon
    Aug 19 at 8:08
  • 3
    I would also suggest that it be more difficult to create a new answer label than it is to create a tag. Like maybe only site mods could create new ones. The English sites might use these labels for “flavors” of English, like American, British, Australian, Indian, etc.
    – ColleenV
    Aug 19 at 12:58
  • Law might use those labels for jurisdictions when the question is asking for answers from any jurisdiction.
    – ColleenV
    Aug 19 at 13:21
  • @ColleenV That could be problematic for sites like CGCC, because we allow (and encourage) creating custom languages. Maybe it should be per-site. Aug 19 at 15:20
  • @RedwolfPrograms Wouldn’t they be labeled “custom” then? What good is a label that only applies to one answer?
    – ColleenV
    Aug 19 at 15:24
  • 1
    @ColleenV It wouldn't necessarily be just one answer. But quite a few potential uses for this would be totally useless (on CGCC) if there wasn't a way for new languages to be easily added. Having a way for each site to set the requirement for creating a label seems like the best and easiest option to me. Aug 19 at 15:26
  • 2
    The other language sites might also find this useful as @ColleenV suggests since at least Portuguese and Spanish have a wide geographical spread leading to distinct dialects.
    – mdewey
    Aug 19 at 15:46
  • 1
    "Allow gathering statistics per answer label." What types of statistics are you looking for?
    – Yaakov Ellis StaffMod
    Aug 23 at 7:10
  • @YaakovEllis For CGCC, the list of answers by label is valuable by itself. If we limit "statistics" to the ones derivable from the labels alone, it would be something like activity per label. But we can do many more things much more accurately with answer body and label combined: Elo ratings of languages by golfiness and n-gram analysis for specific languages, to name a few.
    – Bubbler
    Aug 23 at 7:31
  • Closing this as a dupe of the 'official' post, just so its all in one place
    – Journeyman Geek Mod
    Oct 14 at 10:04
15

The more I think about it, the better it sounds, assuming the UI is done correctly.

Imagine an old question with an outdated accepted answer. With this feature, we could put a big fat label on that answer (applies to <version>), AND a list of labels from all answers for quick filtering (for a solution in <version>, click here).

(I don't necessarily suggest this exact wording.)

4

For sites like Code Golf, this has another big advantage. Currently, language and byte count are formatted in a number of ways, so determining that accurately with automated scripts is very difficult.

This is important to fix, because these scripts include leaderboards and various other things which are really only relevant to Code Golf. This feature would allow for much better leaderboards, without SE needing to work directly on their own leaderboard feature (which would be irrelevant for basically every other site).

0
1

An existing site which uses answer labels is Law, where general legal questions can be answered from the perspective of any jurisdiction, so long as that jurisdiction is highlighted in the answer. They usually use tag formatting to do this, though of course such labels do not function as tags. Whatever about the merits of the proposal for other sites, implementers should look first at Law and Code Golf, as these are the two sites which currently use something like this feature to manually label answers.

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