85

We've been getting a rash of questions asking, essentially, what a programmer should name methods or properties. One such was a request for a word that meant both "add" and "remove" because the programmer wanted to have a method that could add or remove an element.

Does this really fall under ELU? The English language doesn't really govern what people can or do call class members and the like. This sort of thing seems more about naming conventions, and in that case I think Programmers.SE would be the more logical choice.

Thoughts?

29
  • 9
    The thing is, Programmers does not (or no longer does) welcome bikeshed questions, either. See Mark Trapp's comment here, for example: "bikeshedding class names is not welcome on Programmers.SE". (Mark is a mod there.) So the question boils down to, are they welcome on our site?
    – RegDwigнt
    May 5, 2011 at 16:02
  • 5
    @RegDwight: Well, I'm fine with your reduction. I don't think they belong here.
    – Robusto
    May 5, 2011 at 16:06
  • 10
    I don't have anything better than the two answers, and I concur: this stuff does not belong here. May 6, 2011 at 23:46
  • 16
    For those who were as baffled by this use of bikeshed as I was, by the way: explanation. Roughly, bikeshedding = obsessing argumentatively over trivial details just because you can.
    – PLL
    May 7, 2011 at 21:12
  • 15
    I don't understand the title of this question at all. So much so that I wasted my time asking a question that got merged into this one. And wasted Jeff Atwood's time actually performing the merge. The daft thing is I've noticed this question several times. The actual matter being discussed would never have occured to me from the title alone. May 8, 2011 at 22:28
  • 6
    Putting aside my rant against a pointlessly (not very) amusing question title, I think that 'internal' identifiers in program code are way off-topic for EL&U. I don't particularly object to requests for help identifying suitable 'display' text, but I'd rather not see too many of them. May 8, 2011 at 22:32
  • 6
    @Robusto: To which I would add the caveat that the title of this particular question seems exceptionally bad to me. I notice some moderators seem to have time to make minor stylistic changes to other question titles in the interests of site consistency. So why does no-one think it's worth revising this one so it at least nods in the direction of its topic? May 9, 2011 at 1:23
  • 14
    @FumbleFingers: I don't think anyone else misunderstood the title or felt confusion or distress from it. If they did, a reading of the first sentence was sufficient to put them on the right track. I actually think the quirky title attracted more readership and hence more attention to the topic than a pedestrian title would have.
    – Robusto
    May 9, 2011 at 3:34
  • 7
    @FumbleFingers: the title does, in fact, indicate the subject of the question: it's a play on the two meanings of python, only the second of which -- the one that's planning to eat Robusto's dog -- is on-topic for this site.
    – Marthaª
    May 9, 2011 at 22:34
  • 12
    are the arguments over the title a form of bikeshedding? hahaha May 10, 2011 at 0:26
  • 6
    @FumbleFingers: I opened the question mostly because of the title. As the question was posted on this site I assumed there was a very slim chance it was about the Python programming language (which, by the way, gets its name from Monty Python) and I proceeded to see what it was about. And, come on, it doesn't look to me so far fetched that the fact that a python could eat Robusto's dog was just a pun. That said, a pun is the lowest form of humor, unless you thought of it yourself so... (still I find this humorous).
    – nico
    May 11, 2011 at 5:00
  • 6
    @nico: I think I'm not very good at conveying tone in my online posts, but let me assure you I'm not sitting here spitting blood and stamping my foot in rage. I have great respect for Robusto, who regularly makes informative and authoritative posts with a deft combination of wit and consideration. I didn't like this title, not really because I didn't get the joke originally, but because it didn't convey (to me, at least) what the Question was really about. So I never even read the question itself, despite it being of great potential interest to me. May 11, 2011 at 13:32
  • 5
    I agree with Fumble about the jocular question title. I just don't believe most people will understand the title until they've read the question. That's fine for a blog entry or whatever but as a SE question it is inviting duplication. meta.english.stackexchange.com/questions/549/…
    – z7sg Ѫ
    May 16, 2011 at 7:49
  • 3
    @z7sg: Thank goodness there's at least one other person who understands my misgivings. Even better - actually agrees with them! It's no big deal as yet, but it certainly would be if we all started wording our questions in this style. So nip it in the bud, I say! May 18, 2011 at 18:36
  • 5
    @Fumble: you're not the only one who doesn't get the title. It's totally unclear to me to, and it's annoying. Sure I can get the topic of this post from its first line, but if I have to do that for every post, then scanning a list of posts is impossible. That's the purpose of a title: to summarize the topic. A title that obfuscates the topic of a post is a bad title. (I didn't find it funny either. Even though I'm a python programmer.)
    – LarsH
    May 25, 2011 at 4:26

3 Answers 3

52

I don't mind questions of the form "What words work in this context?" "Is there a word that can be used for both add and remove (i.e. from a set)?" seems perfectly fine. What bugs me is that they don't mention programming until after answers come back that don't work in a programming context. Then an edit goes through and everyone gets to update their answers.

Not only that, a programming-only context is uninteresting and it irks the programmer in me when someone starts asking for a method name that breaks convention; at this point the name is irrelevant. You are probably doing it wrong.

Therefore, my opinion is that programming specific contexts are out of the scope of this site and should be closed as Too Narrow. If you word the question with an open context you don't get to complain about the valid English words not fitting into your program. As a programmer, you can figure that out on your own. We are here to discuss English.

10
  • 5
    It bugs you that they don't (initially) mention programming, but it also bugs you when they do mention programming?
    – Charles
    May 6, 2011 at 5:53
  • 7
    @Charles: Yes. In both cases they mention programming; in one case they rudely wait until after people have answered. If they never mentioned it at all it would be better.
    – MrHen
    May 6, 2011 at 13:05
  • 7
    I would prefer, in general, to have people mention their application since it might be relevant to the answers. To use your example: "Is there a word that can be used for both add and remove (from a set)? I looked up ... in a thesaurus and found ... but none seemed quite right. Sidenote: I'm hoping to use this as a class name in my C++ program."
    – Charles
    May 6, 2011 at 13:37
  • 3
    @Charles: Sure. I guess I don't necessarily have a problem including a mention to the context but if question only cares about programming then I consider it too narrow. I consider naming methods akin to naming books; naming children; naming companies. We aren't here to name things for people.
    – MrHen
    May 6, 2011 at 14:08
  • I think we essentially agree. "(normal question)? My goal is to use this as a name or tagline for my __ company." would be OK, assuming (normal question) is what it says, but "What is a good name for my __ company" or "What should I call my child" would be bad. Similarly for programming-related questions.
    – Charles
    May 6, 2011 at 14:39
  • 4
    @Charles: Agreed, with the caveat that the answers are not expected to provide only programming eligible answers. The context helps hone the options into something interesting but it shouldn't become a restriction that prevents the question from being applicable to other people.
    – MrHen
    May 6, 2011 at 14:43
  • 4
    Absolutely. "Here's my question. So you know, I care only about the fooian answers, but all answers are acceptable." I've done that before (with non-programming questions) when I thought that asking for a fooian baz would be too narrow to expect answers, though surely someone could find a baz. That way if someone does know of a fooian baz they will mention it and I'll accept, but if all of the baz answers are non-fooian I'll just accept the best of them as usual.
    – Charles
    May 6, 2011 at 14:54
  • 3
    I was going to write up an answer clarifying my comment about bikeshedding class names, but this is exactly the point I would make. In a programmer-only context, the question is uninteresting: who cares what you name your symbols? Because of this, any question on Programmers.SE about naming would invariably lead to bike-shedding. But if someone's asking about why X English word is used in Y context, that seems like a valid EL&U question even if the intent is to name a symbol.
    – user2512
    May 7, 2011 at 10:10
  • 1
    the aim of something like UML when constructing use case diagrams (UCDs), activity diagrams, class diagrams is that you could theoretically send the UCD to a person who can barely read or understand English and they would be able to program your use cases by asking a better speaker/reader of the language or even consulting the dictionary. That is a VERY PRACTICAL USE of English. Why shouldn't it be discussed here? May 10, 2011 at 0:28
  • 4
    @pageman: Programming theory is not in the scope of EL&U. Deal with it.
    – MrHen
    May 10, 2011 at 1:02
16

I would think that those questions are off-topic for EL&U simply because the answer can be given just from a programmer point of view, and users on EL&U are not supposed to be all programmers (although some of them could be programmers at some level).

To make clear what I mean, I will make two examples.

  • What name should I use for my function, instead of IsNotArray()?
    Supposing the programming language has such function, a programmer could simply reply with You just need an IsArray() function; if you need to check if a variable is not an array, then you use !IsArray(). Anyone who doesn't know anything about programming languages would not answer in that way, but that would be probably be the best answer that such question could get.

  • In my PHP script I added a function; should I call it str_shuffle() or str_permutation()?
    Anyone who is not a programmer would probably say that it makes no difference, or would choose one and give reasons; anyone who knows PHP will say that str_shuffle() is a predefined function in PHP, so there would be problems when using a user function called str_shuffle().

The second example makes evident that the answer for such questions depends from the programming context; even if that question would be asked on Stack Overflow, anyone who answers would need to know for which programming language the question is being asked. On EL&U, that would be an irrelevant detail (a linguist, for example, is not supposed to know anything about programming), and reporting that the question is about a Java method, or a PHP function would not help to give the correct answer, as whoever answers is supposed to answer based on English usage of a word, or a group of words.

Also, a compiler doesn't require function/method/class names to follow English grammar or usage; a compiler is happy even if the function is called x3efdsdf(), or MangiaIlPanino().
What those questions are really asking is Which function name would help other developers to remember the purpose of a function? To that question, only a developer is able to give a correct answer.

2
  • 1
    I don't think it has to be given from a programmer's point of view. If someone has a limited vocabulary and explain their situation properly, words will come. I have a an example of my own: english.stackexchange.com/questions/23680/…. I don't think that you have to be a programmer to answer to these simple questions.
    – whirlwin
    May 7, 2011 at 20:58
  • 1
    @Whirlwin Since you are not asking for a function name, the question is different. If you are asking to decide which name you should give to a function, then what I reported is still valid; if the suggested name is not valid in the programming language you are using, that is not related with English grammar and usage.
    – apaderno
    May 7, 2011 at 21:04
-1

It may be helpful to use the guidelines here for homework questions, as applicable.

You must log in to answer this question.

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