19

I wondered if it makes sense to tag, for example, JavaScript, when you have a problem like "How can I change the Bresenham circle algorithm to get filled rings instead of circles with as few overlap as possible?" and you tried some things and used JavaScript for that. If you want to write a ring algorithm, it probably doesn't matter too much that you use JS instead of, let's say, Python. But it might be useful if the reader of the question has some JS knowledge so they can understand your example code. I just don't quite know - if you search for a JS question, do you expect any question that is somehow related to JS or do you more expect something like "What is truthy and what falsy in JS?" or "How can I set the class of an element with JS?", questions that are really related to the language?

For example, here on my question, I added the tag "processing" and I also wanted to add "assembly" but I could only have 5 tags. Should I do that? My problem wasn't really related to the coding structure of processing, it was about circle algorithms and I just wrote my code used to generate the circles in processing. I just tagged it because I didn't know what else to tag.

So I don't know if it's a good idea to tag languages in such a situation. Should you? Should there be a way to indicate a question about the coding structure of a language and not just somehow related to that language?

So in other words, should you use a language tag as a way to say "You need lots of knowledge on that language to answer my question" or more like a "There is an example for my algorithm in that language but I guess it doesn't matter if you don't know that language since it's totally obvious what it does"?

14
  • 22
    How about language-agnostic?
    – Wai Ha Lee
    Dec 9, 2020 at 13:22
  • I don't think that get's used too much. At least I never saw it. Most people are probably like me and never thought about that before and just tag the coding language although it doesn't really matter.
    – user14699696
    Dec 9, 2020 at 13:24
  • 4
    Only 0.04% of questions use it (8,000 / 20,000,000), while probably way more questions could need it.
    – user14699696
    Dec 9, 2020 at 13:31
  • 11
    When the question concerns an algorithm, I generally advice the [algorithm] tag, with no code tag. The advantage would be to attract algorithm lovers.
    – Damien
    Dec 9, 2020 at 14:11
  • @Damien, that makes sense, but that also doesn't completely answer my question, since my question is more about when it makes sense to tag a language and not what you can do too to specify that it's not about the language's structure.
    – user14699696
    Dec 9, 2020 at 14:13
  • 2
    If you don't provide a code sample, it it much better to avoid a specific code tag, for at least a simple strategic reason: such a question with a code tag but no code is generally rapidly donwvoted and closed.
    – Damien
    Dec 9, 2020 at 14:16
  • Okay, but when you have some code in some language relating to your algorithm problem, you have a matching code sample, but my question still is if it makes sense to tag it although the algorithm has nothing really to do with the coding language.
    – user14699696
    Dec 9, 2020 at 14:46
  • 2
    If you want it implemented in that language, then I think it makes sense to tag it as such. If you're happy with any language or even pseudo code, I think [language-agnostic] (or no language tag) is still fine. You can present the algorithm as pseudo code as well, if you wish and say "and here it is implemented in X" if you want to showcase its working (JS has the benefit of snippet support) but not require an answer in the same language. Just please don't tag multiple unrelated languages.
    – VLAZ
    Dec 9, 2020 at 14:57
  • So should I add in the case of a JS version of an algorithm that doesn't quite work the JS tag or are those language tags more for questions regarding the coding structure?
    – user14699696
    Dec 9, 2020 at 15:47
  • 7
    Asking a conceptual question is really difficult because certain languages will have built -in functions for achieving things differently. If someone says "Use scala because function xyz accounts for this issue" then would you consider that to be the correct answer? Much like spoken languages, certain concepts or expressions are achieved in certain ways or sometimes not at all. If it's really conceptual then you can try your luck at softwareengineering.stackexchange.com. If it's a gaming-dev centric issue then gamedev.stackexchange.com might be better.
    – MonkeyZeus
    Dec 9, 2020 at 16:06
  • @MonkeyZeus Of course it makes no sense when someone wants to have such a ring algorithm to tell them which processing function to use. But it shouldn't matter if someone tells you pseudo code or code in python if you want to have it in JS.
    – user14699696
    Dec 9, 2020 at 16:34
  • About conceptual tags... those are kind of a mixed bag.
    – Braiam
    Dec 9, 2020 at 17:59
  • "Should you add a language tag when your question is not language specific?" -> to me that reads like "should I lie in the tags?". No, of course not. You don't need to have in-depth knowledge of most languages to be able to read code written using them. I say most, because ho boy are there a few exceptions to that rule...
    – Gimby
    Dec 10, 2020 at 8:43
  • 1
    @Gimby I don't mean randomly adding tags, but when you only have some example code for your ring algorithm, should you add the language it is written in? It most likely doesn't really require, e.g. JS knowledge when it's clear what's a for loop and that drawLine(x, y, x2, y2) draws a line.
    – user14699696
    Dec 10, 2020 at 8:59

3 Answers 3

29

If your question is really not language specific, then omit a language tag and add the tag.

However personally I dislike these questions, as I find 9 times out of 10, they are language specific, or that the question asker would benefit from presenting them as such.

Languages are different, and the more languages you work with, you start to question concepts that you thought were just universal in programming. So again, I would think hard about if the question would be better served under a language tag. The only ones that I usually come across, are Regex questions or algorithm questions.

Another issue is that once you start getting into the agnostic territory, you get dangerously close to getting out of scope for Stack Overflow. Remember, Stack Exchange is pretty big now, so questions here already have danger of overlapping with Super User, Unix & Linux, Ask Ubuntu, Server Fault, Software Engineering and others. Couple of examples specific to your case:

Use your best judgment.

3
  • 1
    Re "so questions here already have danger of overlapping": What's the "danger" you see here? Just because something is on-topic somewhere else, doesn't mean it's inherently off-topic here. Questions need only be judged by their merit on the site they're posted on, shouldn't they? Eg. See questions tagged vim on SO vs. questions on Vi/Vim.SE.
    – zcoop98
    Dec 9, 2020 at 20:47
  • 1
    @zcoop98 sometimes I doesnt matter. You can post a site-ambiguous question and it will be upvoted and answered. Other times it will be slammed closed and downvoted for being off topic. Its best to avoid that situation if possible
    – Zombo
    Dec 9, 2020 at 20:51
  • 4
    I don't like the language-agnostic tag; it's always a bit strange to me. A tag should describe what a question is about, not what it contains. When a question is about an algorithm, then mark it by algorithm: What's the point in adding language-agnostic? I can see that it's useful to explicitly say: "Hey, this question in not specific to Java or C# or whatever.", but what's the overall benefit? I'm getting the same information when there is just no language-tag present.
    – akuzminykh
    Dec 10, 2020 at 9:16
9

I would suggest to do the following:

  • If you either have some draft/example code for the algorithm in a certain language, then use the language tag.
  • If you are asking about specifics regarding how to practically implement an algorithm in a certain language, then use the language tag. But these kind of questions must be sufficiently narrow and specific! And never "write code for me".
  • If you are asking about algorithm theory, then yeah you can use (that nobody follows), but instead you should probably be asking the question at https://cs.stackexchange.com/. That whole site is pretty much dedicated to language agnostic algorithm theory.
3
  • 7
    "that nobody follows" - I see 2.4k watchers?
    – Bergi
    Dec 10, 2020 at 12:08
  • 2
    @Bergi So you are the one who watches the watchers!
    – VLAZ
    Dec 11, 2020 at 6:57
  • 1
    @VLAZ Now I'm feeling watched
    – Bergi
    Dec 11, 2020 at 9:18
-35

All questions on Stack Overflow are language-specific, because all questions should show code detailing what you've attempted so far. (To the people who will screech SHOWING CODE IS NOT A REQUIREMENT at me - you're welcome to your opinions, just like I'm welcome to ignore them.)

Furthermore, tags are used by many people as a way to filter what they see on Stack Overflow - if you're a JavaScript developer, you likely don't want to see questions about Object Pascal. This means that if you tag your question as an appropriate language, it will get many more eyes on it.

For example, has 1.7 million watchers; , which you used on your question, has a grand total of... 12. Using more obscure tags may be more correct, but it sure hurts your chances of getting an answer!

Therefore, you definitely should have tagged your question with .

15
  • 5
    "All questions on Stack Overflow are language-specific", well, if you just want to know how to write a good ring algorithm, it still has something to do with the language you wrote your test scripts in, but it's not a very language-specific question about certain features only that language has. Also, I should have tagged my circle with lines from the center as JS instead of "fill"?! Uh ... well, more people would see it, but it would be just - wrong.
    – user14699696
    Dec 9, 2020 at 17:53
  • 1
    Also, I don't know about you, but when I think of questions about JavaScript, I don't think of problems regarding Bresenham algorithms, I think of things like setting element's style, so I also wonder if people actually want to use the JS tag to find questions where their JS knowledge about XSS' and DOM is needed and not just a question where someone has problems writing an encryption algorithm because it can't convert the encrypted result back and they wrote their not working program in JS.
    – user14699696
    Dec 9, 2020 at 17:58
  • 32
    It is not an opinion-based issue. Not all questions on Stack Overflow are required to show code. This is a fact. Try as you might to make it one, this site is not a help desk or a one-on-one debugging service. Dec 9, 2020 at 18:10
  • What about regular expressions? Dec 10, 2020 at 0:19
  • 3
    There are some problems that are common to a wide variety of languages. For instance, forgetting to use "return" when performing the recursion operation in a recursive function. We don't need a separate canonical duplicate for each language where someone makes this mistake.
    – Barmar
    Dec 10, 2020 at 1:57
  • I agree, @Barmar, those are "not too language-specific" questions to me and I would say it exists in pretty much any language that supports jumping into sub routines, so even assembler!
    – user14699696
    Dec 10, 2020 at 9:07
  • Or do I get you wrong - do you mean tagging my nonexisting question with the ring algorithm with JS because I had some example code although my question is about the concept? That still feels wrong but not as wrong as lying in the tags.
    – user14699696
    Dec 10, 2020 at 16:22
  • 4
    It's not an opinion, a fact. Code in questions isn't required. What if the question is about an IDE? It's a misconception that's becoming more and more worse. A question without code can be more high quality than a question that asks us to debug their 1000 line tic-tac-toe.
    – 10 Rep
    Dec 10, 2020 at 18:06
  • 1
    I like this answer the most. For example this other current hot meta question Can programming questions involving math ever be on topic? lead to a question about calculating the logarithm of a sum without underflow and it doesn't have a language tag. But without specifying a math library/language or set thereof, without any implementation specification, it's not answerable, I think. Dec 11, 2020 at 15:57
  • @Trilarion If I might chime in as the author of those two questions: take a look at the answer posted to the latter question and decide if you still think it's not answerable. Now, that answer uses C code, but virtually every general-purpose language in common use with a math library implements the functions present in C's math library. We're talking about basics here: log, exp, abs, max, plus one or two specialized functions like log1p that are also very widely available. Jan 21, 2021 at 19:51
  • 1
    @DominickPastore "...but virtually every general-purpose language in common use with a math library implements the functions present in C's math library..." Kind of implementation specific to virtually every general-purpose languages then. Adding the C language tag wouldn't hurt either. Unless we say that adding a language tag means that the question is only about that language. The second answer is pure math I think. In this case I'm not sure how helpful the question and answer really is, but I definitely think it should stay. Jan 21, 2021 at 20:01
  • @Trilarion Maybe, but the fact remains: the question is applicable to a wide variety of languages, and the answer could have just as easily used pseudocode instead of C. The only language-specific part is knowing how to import your language's math library and what the particular functions are named, and I think it's fair to assume that the reader knows how to use an API reference. Jan 21, 2021 at 20:58
  • @Trilarion Put another way, it's not language specific because if the question were asked in terms of C, then someone else came along with the same question but in Java, they would still have all the information they need from the C answer. Jan 21, 2021 at 21:01
  • @DominickPastore I thought more about it and there are certainly questions that are specific enough that you would say they are programming questions rather than math or something else, but still apply to many languages, not only a few, so that you would say they are language agnostic kind of. The language-agnostic tag is quite small with only 8k questions (compared to JavaScript or C++ tags) but contains some quite highly voted Q&As. Maybe that's a characteristic. Jan 22, 2021 at 8:14
  • @Trilarion I think that's a fair assessment. Obviously, the vast majority of questions are language-specific, and many questions that aren't language-specific are out of scope for SO. But programming languages do have commonalities, so it's not impossible for a question to apply to several, though it is uncommon. (As an aside, looking at the language-agnostic tag, I think many of the questions there would fit well, possibly better, at CS.SE. For example, stackoverflow.com/questions/2352313/… is much more theory than programming.) Jan 22, 2021 at 16:13

You must log in to answer this question.