63

Incorrect use of and in the same question has been a long source of unclear posts and conflicts. To deal with that problem, the community established rules for cross-tagging in this meta discussion which then lead to the current C tag usage and C++ tag usage rules. From that we learn that the and tags should not be used together unless the question is explicitly about differences between the two languages, such as questions regarding compatibility and porting.

Now I just posted a C question here and when I did so, the site incorrectly suggests that I should add the C++ tag, even though my question has absolutely nothing to do with C++. As it happens, the question is even about a language feature which is completely different in C and C++. Had I added the C++ tag like the site suggests, my question would have become too broad and unclear.

I realized that this suggested tags feature is very likely a source of needless mistagging. It is clearly too blunt and probably just looks at tags that are usually used together. (C and C++ both are often used with the gcc tag, probably why.)

Ideally it should be possible to configure the suggested tags feature with specific rules to avoid incorrect tagging. Or alternatively disable it for tags where it causes harm.

19
  • Maybe someone could even conjure statistics regarding incorrect tagging from the point where the suggested tags feature was introduced, whenever that was. It would be interested to see if this feature has indeed statistically lead to an increased cross tagging of C and C++.
    – Lundin
    Commented Jul 5, 2021 at 8:22
  • 11
    It probably suggested that because, funny enough, c++ is the most used tag in conjuncture with c - with more than 38k questions. The next in line is just with 27k questions. It is not true the other way around. c is "only" the third-most used tag with c++
    – Tomerikoo
    Commented Jul 5, 2021 at 8:27
  • I doubt fiddling with the suggestions for additional tags will do much. I would have thought that the primary culprit is the fact that typing c into the tag bar (before even adding any tags), immediately gives c and c++ as suggestions. And... well... that's valid as suggestion, and unfortunately may be just as likely to make the "C/C++" people tags with both. Although.... now that I tried it again, it doesn't... That's good. Commented Jul 5, 2021 at 8:35
  • 3
    Garbage in, garbage out. If you want the system to stop suggesting both tags, you need to address @Tomerikoo fact.
    – Braiam
    Commented Jul 5, 2021 at 9:02
  • 1
    @Lundin this doesn't look like a [bug] but rather a [feature-request]?
    – Lino
    Commented Jul 5, 2021 at 9:55
  • 11
    @Lino A feature that doesn't work as intended is a bug. It suggests tags that it shouldn't be suggesting. The problem is with the implementation of the suggested tag feature, so it is a bug.
    – Lundin
    Commented Jul 5, 2021 at 9:58
  • 2
    It's a stretch calling it a bug or a feature request. The tag suggestion is supposed to evaluate the content of previous posts and recognize these patterns and suggest the tags these posts have. The system is behaving as intended. The data it's fed of is the problem here.
    – Braiam
    Commented Jul 5, 2021 at 10:04
  • 6
    I don't know if I should laugh and cry when programmers think that upon implementing a feature, it isn't a bug if you read the requirements wrong, state the wrong requirements or have no requirements at all ("aimlessly hack away"). Either of those three scenarios is a common example of the most severe kind of bugs there are.
    – Lundin
    Commented Jul 5, 2021 at 10:10
  • 3
    In fact after [c++11] and [qt] the most common tag to be used with [c++] is [c], and the most common tag used with [c] is [c++]: SEDE. It's not a "bug" that the recommendation system is working exactly as intended when the tags are very often used in common with the other. The problem, again, is that users are incorrectly tagging; fix the tagging, fix the problem. Of course, that's hard now, but good curation is key here.
    – Thom A
    Commented Jul 5, 2021 at 10:14
  • 6
    @Larnu Although, why would I use a tag just because it is commonly used? That actually doesn't make any sense. The content of my question is what should determine which tags to use. For example, if the body of my question contains "C++" in several places. Not because of some "other users who bought this product also like..." algorithm.
    – Lundin
    Commented Jul 5, 2021 at 10:25
  • 1
    Just because you aren't doesn't mean others aren't, @Lundin . Clearly people commonly use [c++] and [c] together often (or people haven't been curating the questions well), and thus the system is suggesting the tag as it's a likely candidate that will want to be tagged too. That doesn't, however, mean should tag it because it's suggestion, which is again why curation (and education) is important.
    – Thom A
    Commented Jul 5, 2021 at 10:29
  • 2
    Similar features, such as defining "conflicting tags" have been suggested in the past and got no traction. Can we get a warning when a user tags multiple DBMSs?, or an extension on the I asked, Tags that could conflict with each other warning.
    – Thom A
    Commented Jul 5, 2021 at 10:49
  • 1
    We used to have a line in the C++ tag wiki about not asking about the likes of ++i++, complete with links Q&A pages that explained what was going on, and still saw the question or derivatives at least once a day. No one reads the tag wikis until it's too late. But that's another "solve the human problem" problem. Commented Jul 6, 2021 at 22:41
  • 5
    Also, "fix humans" is the lamest kind of argument. They've been pretty much the same for thousands of years. Design a UI suitable for human users is on the other hand a valid argument.
    – Lundin
    Commented Jul 7, 2021 at 6:22
  • 1
    @Braiam You make it sound like runaway feedback, which would be a bug in the design. Commented Jul 7, 2021 at 21:57

2 Answers 2

46

Having an automatic tool suggesting to put both a C tag and a C++ tag on a question is simply a bug. There is really not more to discuss. It's a bug and it must be fixed.

C and C++ are different. While C++ covers most of C (but not fully), C is far from covering most of C++. Further - perhaps even worse - a good solution in C is in many cases the wrong solution in C++. And a good C++ solution is in many cases something that you can't even do in C.

In some cases a question can be answered with a solution that is fine for both C and C++. But such questions may also be answered by solutions that are pure C or pure C++. So a SO visitor looking for a C solution may find a question tagged with C and an answer which is for C++ only. That's bad. We don't want visitors to have to figure out by themself which language an answer applies to.

So C and C++ should be kept apart (with exceptions as already mentioned in the question). So obviously we can't have a tool misguiding users to put both tags on their question.

The "tag-suggestion-tool" must be fixed like:

if (C in tag-list AND C++ in tag-list)
   display-big-sign("Are you really sure that this question is to be
                     tagged with both C and C++")
   answer = get_answer_from_user()
   if (answer == YES)
       display-even-bigger-sign("Are you really, really, really sure
                                 that this question is to be tagged
                                 with both C and C++")

And while the bug is being fixed, please consider including other languages as well. We get way too many questions tagged with various combination of C, C++, C#, and Python for no reason.

10
  • 11
    I think must be fixed is overstating things. Should be fixed? Maybe. But it's something that should be considered alongside other things such as availability of development resources, feature priority, difficulty of fix, addition of complexity (e.g. one-off custom code), etc. Sure, it leads to incorrect human behavior resulting in an incorrect system state, but on the other hand, it doesn't lead to anything irreversible (e.g. data loss) and can be fixed even by users with almost no reputation.
    – M. Justin
    Commented Jul 6, 2021 at 5:02
  • 2
    See also this feature-request to have the system discourage unlikely tag-combos that often result from people not reading tag popups, just the names, for abbreviations: Stop users from tagging SSE and Sever-Sent-Events in the same question, and warn for SSE + JS? Commented Jul 6, 2021 at 6:38
  • 6
    @M.Justin I disagree, having C question will often return results in C++ which is clearly wrong, but question was tagged with both languages. Should you downvote such answer because someone used wrong tag? As said in answer: "good solution in C is wrong for C++" and vice versa.
    – Myszsoda
    Commented Jul 6, 2021 at 13:08
  • 5
    At least the source of the C++/Python confusion is obvious. They share a lot of the same letters. Commented Jul 6, 2021 at 19:03
  • To augment your logic: once the user selects the C or C++ tags for their question, the UI should stop suggesting the other one. The confirmation dialog should only be necessary when the user goes out of their way to manually add the second tag. Even better would be if the language was selected by a different mechanism entirely and the tag suggestor only suggested non-language tags.
    – bta
    Commented Jul 7, 2021 at 19:14
  • @M.Justin "must be fixed" vs. "should be fixed" is a bit of a nitpick to mee. Anyway, it's obvious that even "must be fixed" issues have severity levels that are part of prioritizing which issues to solve first, I don't disagree about that. But when you write " it doesn't lead to anything irreversible ... and can be fixed even by users with almost no reputation" I disagree. Example: A question ....
    – 4386427
    Commented Jul 8, 2021 at 12:18
  • (cont.) ..... with both tags gets two answers before the wrong tagging is addressed. Answer A is a C++ only solution and answer B is a C only solution. How can that be solved? And in case OP never tells whether it's for C or C++, how can it be solved? Shall we torse a coin to decide which tag to delete? And then hope for the answer for the deleted tag gets downvoted.
    – 4386427
    Commented Jul 8, 2021 at 12:19
  • This implementation ignores an important reality: anyone can create any tags and the system should be able to suggest newly created tags without developer intervention. The current tag suggestion system deals with this.
    – Braiam
    Commented Jul 8, 2021 at 14:51
  • @Braiam Apperently the current tag suggestion system doesn't even deal with long existing tags
    – 4386427
    Commented Jul 8, 2021 at 17:01
  • It does. It suggest tags based on the text content of the previous questions and how similar is to the one you are asking.
    – Braiam
    Commented Jul 8, 2021 at 20:29
-8

It is? Really? I mean, you guys literally hijack C questions to make them about C++ too, instead of just having your own version of it. Obviously the system would see this, act rationally and presume that all questions that have text related to C or C++ should have both tags.

The system is working as intended taking the signals that the users give them to suggest tags. If you are seeing a problem with the suggestion system, there are ways to manipulate it without having to spend developers time, namely feeding the system with good data, go through this list and remove the irrelevant tags. The system after all is very likely machine learning, which means that the model presumes that the information they are fed is correct (asking SO to make a better ML model is obviously unrealistic, since which what data would the feed it?).

22
  • 3
    Which of the C and C++ tags are you suggesting is irrelevant? Commented Jul 6, 2021 at 23:41
  • @JonathanLeffler whichever isn't relevant to the question asked. If people ask a C/C++ question, just close it as unclear.
    – Braiam
    Commented Jul 7, 2021 at 3:53
  • 5
    "You guys" is one single confused user who made an edit in 2010. And since you don't participate in either tag, if you are at all participating on the main site and not just meta, nobody cares about your subjective opinions. How can you know anything about how the site or specific tags works if you don't use them?
    – Lundin
    Commented Jul 7, 2021 at 6:25
  • 2
    I spend a lot of time in the C-tag and in my experience it's very rare that someone adds e.g. a C++ tag to a question which initially only has a C tag. And your example seems to from 2010. Seriously, are you suggesting that this 10 years old example is causing a tool to give bad tag suggestions today? Really?
    – 4386427
    Commented Jul 7, 2021 at 6:55
  • 1
    "The system is working as intended ...." Well, in principal the system may work in accordance with a given requirement specification - true. But if so it's the requirement specification which is wrong. No matter where you place the responsebility, the fact is that the final outcome is a system that doesn't work.
    – 4386427
    Commented Jul 7, 2021 at 6:58
  • 1
    @4386427 "it's very rare that someone adds e.g. a C++ tag to a question which initially only has a C tag" Your experience is n=1. It happened about ~1.3k times., most of them 2010 to 2015. There are enough of them to have swayed the tag engine into thinking that they are sufficiently related. See later years how the numbers fall, because the system starts suggesting both tags so they are added less via edits
    – Braiam
    Commented Jul 7, 2021 at 12:31
  • 2
    @Braiam Thanks for proving that it happens rarely. E.g. 75 times in all 2020 that's rare compared to the number of C questions posted.
    – 4386427
    Commented Jul 7, 2021 at 12:38
  • 1
    @Lundin Calling sbi “confused” is a bit weird. Before quitting Stack Overflow he was one of the most senior, prolific and knowledgeable C++ answerers (just look at the score and the number of gold badges), and that particular retagging is completely appropriate, and was probably preceded by a consensus-reaching discussion in the C++ chat (so it wasn’t “one single … user” either). Commented Jul 7, 2021 at 15:39
  • @KonradRudolph No that retagging is not appropriate. Unspecified behavior, undefined behavior and implementation defined behavior are not the same in C and C++. So the retagging is completely inappropriate.
    – 4386427
    Commented Jul 7, 2021 at 16:19
  • 1
    @4386427 They’re not identical, but the concepts are (intentionally and consciously) closely related in both languages, and the answers in this FAQ question address both. Treating and contrasting them in the same answer is entirely appropriate. It’s however a shame that none of the existing answers properly contrasts them. Commented Jul 7, 2021 at 16:22
  • @KonradRudolph I respectfully disagree
    – 4386427
    Commented Jul 7, 2021 at 16:49
  • 2
    @Braiam Those numbers don’t show anything about whether the tags are appropriate. And respectfully, you simply don’t have the necessary expertise to judge whether the tag edits are appropriate or not. The fact remains that both tags are appropriate only for a tiny minority of all C and C++ questions, and that suggesting them for new questions is unarguably inappropriate. Only somebody not active in both tags (= you) would claim that there’s even an argument. Commented Jul 8, 2021 at 8:48
  • 2
    @Braiam Nobody here is wondering why the system is making this mistake. I think all involved understand this. It’s just completely irrelevant, since the resulting behaviour is unambiguously undesirable and must be classified as a bug. Your answer and comments imply that you believe that the software system is behaving correctly, and that this bug needs to be “fixed” by changing user behaviour. We’re telling you that you’re wrong. Utterly wrong. Commented Jul 8, 2021 at 14:31
  • 2
    @Braiam It's simply incredible that you keep on defending a system that obviously fails. I'm beginning to think this is personal. Did you implement it?
    – 4386427
    Commented Jul 8, 2021 at 15:39
  • 1
    @Braiam What are you talking about?! This problem is trivial to avoid. Maybe take it easy on the machine learning Kool-Aid. Commented Jul 8, 2021 at 16:20

You must log in to answer this question.

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