29

Sometimes I need to name a database table or a class or just a variable, but I'm unable to find a descriptive name which can be easily understood by others. Obviously, a more general or a well-known term fits better with what I have in my mind.

Is it OK to ask for a word-choice (as in English Language & Usage) to get other's opinion?

20
  • 19
    Why not just ask in English.SE? You can always "programmify" the name later. Commented Nov 21, 2014 at 1:34
  • There is naming, which may work here. But this is also sometimes a bad idea.
    – Pokechu22
    Commented Nov 21, 2014 at 1:34
  • 9
    @BradleyDotNET English SE won't work well for real technical terms, as choosing decent variable or function names. I'm afraid doing that, really needs some decades of experience (and I'm still doing it wrong in many cases, it just got to pop up even later over the years, where I've been missing to make the terms unambiguous). Commented Nov 21, 2014 at 1:38
  • @πάνταῥεῖ I have often seen programmers answering questions there however, in the "hot network questions" list.
    – simonzack
    Commented Nov 21, 2014 at 1:39
  • 2
    @BradleyDotNET English.SE has a fairly high level of expectations on questions. Before people post simple word choice questions there, they may want to make sure that they meet the site guidelines. I guess that's true for all SE sites, it's always a good idea to study the culture and understand the expectations before posting questions. Commented Nov 21, 2014 at 1:40
  • 2
    @Pokechu22 A tag like naming covers questions about naming constraints, for instance, which are not opinion-based. So the existence of the tag ain't saying much about whether asking for a word choice would fly.
    – Louis
    Commented Nov 21, 2014 at 1:45
  • 6
    Aside from almost inherently being opinion based, another problem with these types of questions is that they would rarely be beneficial to others. The goal of SO is to build a repository of questions and answers that are beneficial to people with the same question later. I think it's very unlikely that somebody would have the same naming question, and be able to find yours with a search. Commented Nov 21, 2014 at 1:54
  • 3
    @RetoKoradi SO has plenty of questions which won't help anyone else, just look at all the javascript and html questions.
    – simonzack
    Commented Nov 21, 2014 at 1:58
  • A tiny question like that could also be asked on chat Commented Nov 21, 2014 at 2:00
  • 1
    @simonzack Very true. But that's still the goal. It's certainly not achieved by all questions. Commented Nov 21, 2014 at 2:00
  • 2
  • 2
    This may be on-topic for code review because it is about "a specific best practice in working code".
    – Radiodef
    Commented Nov 22, 2014 at 21:27
  • 3
    @BradleyDotNET English.SE expressly discourages this type of question. "Please don't ask any questions about [...] Naming, including naming programming variables/classes." Commented Nov 24, 2014 at 0:02
  • 1
    @IainElder It depends on if its a word-choice question (on-topic) or a naming question (off-topic). No doubt a fine line to walk. Commented Nov 24, 2014 at 1:05
  • 1
    @smci I wouldn't even know where to start for citations :). That said; I see a clear distinction between "What term do you use for different types of objects being accessed through the same base type?" (A: Polymorphism) and "What should I name my class that manages devices?" (A: Very opinion based). Obviously there are less clear cut cases than those two, and the line is somewhere in the middle (though probably closer to the first one). Commented Feb 16, 2018 at 18:22

6 Answers 6

53

I can't see how a question like this would not end up being closed as "opinion-based". While some choices would elicit unanimous agreement as being terrible (e.g. asdfasdf), the set of acceptable choices is generally too large. So everybody could submit their preferred choice and there would be little that would make one answer better than the other.

I would not put much weight into the existence of the tags and when it comes to deciding whether a new question asking about how to name a programming construct (variable, class, etc.) would fare today. Why?

  1. Some questions that fit under these tags are not about choosing names at all. For instance, someone could ask a question regarding something they do not understand about the Hungarian notation, or about how Python's PEP8 specifies a naming convention for this or that. Such questions are likely to not be opinion-based.

  2. Some of the questions under these tags are old. A 2008 question about choosing names that has gained many upvotes and has not (yet) been closed is not good evidence that the same question if posted now would not be very quickly closed and downvoted.

2
  • 22
    @PeterMortensen Unless it's the Alaska State Defense Force's table of approved average square difference functions.
    – Jason C
    Commented Nov 23, 2014 at 20:59
  • @PeterMortensen very clever there!
    – axwcode
    Commented Nov 23, 2014 at 21:36
16

"... to get other's opinion?"

As you say it, that's probably going to be closed as 'opinion based' question.


To be clear: I didn't mean that Meta Question here, but the hypothetical question mentioned in the OP of course!

1
  • 3
    Sometimes downvoting behavior is strange here :-P ... @Louis explains it better though. Commented Nov 21, 2014 at 1:52
8

The other answers here address the appropriateness on SO well, I think.

I just want to point out that another good, less "risky", (and sometimes quicker) option is to just ask on one of the many available chat rooms. You can see links to them on the right side of this very page. For example:

  • SO Tavern room is frozen
  • SO Java
  • SO PHP
  • SO C++
  • Programmers Whiteboard
  • MSE Tavern (not quite the topic, but we really don't know what the topic actually is, and we're usually friendly)
  • Any of the other sites' chats (you can easily access the chat rooms of any site from the nav drop-down on the left side of the status bar; it's right next to "blog" and "log out").
3
  • 2
    "you can easily access the chat rooms..." until there's another design change
    – SeinopSys
    Commented Nov 23, 2014 at 20:38
  • @DJDavid98 Ha, well, that's also a good use-case for browser bookmarks.
    – Jason C
    Commented Nov 23, 2014 at 20:46
  • 1
    Just take care not to annoy the regulars, or you'll get plonked fast. Commented Nov 24, 2014 at 1:07
-1

As others have pointed out, the very essence of such questions is that they are opinion-based, which makes them a bad fit for SO.

However, I would assume they are very much on topic for codereview.SE: While their on-topic page does not explicitly list "naming", one can consider that to be a part of (or at least closely related to) "Best practices and design pattern usage" and "feedback about any or all facets of the code".

1
-3

This can on one hand, be opinion based. On the other hand, we do have the tag naming-conventions with some questions being closed and others not. So it may also depend on the context.

Some questions, like this one, turn out to not be so ambiguous after all.

2
  • 2
    A good deal of them are closed. And there may be some in the lot that are not actually about choosing a name but about how such-and-such naming convention is supposed to work.
    – Louis
    Commented Nov 21, 2014 at 1:39
  • Adding that particular sample makes an interesting aspect, but I doubt such could be generalized. Commented Nov 21, 2014 at 1:48
-3

On Software Engineering SE, there are several tags for this type of Question. Among others: naming and coding-standards. There are many questions regarding naming conventions that are permitted. You should note however, the questions are a bit more 'high level' and not nessecarily language specific.
Anyways, I found what I was looking for.

1
  • Why is this voted down? I was looking whether I could post such a question here and upon seeing that its not ok, a link to a place where its possible would have been very helpful, so I shared it... - Afterall, when I answered, this was still part of the question...
    – Lucas
    Commented Apr 3, 2019 at 8:24

You must log in to answer this question.

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