32

I have a question as to which of two approaches to use. If I were to ask the question in a "which is the best practice" manner, would that be considered off-topic as "too opinion based"?

My guess is that it probably would, however I really find it hard to find resources where current "best practices" are outlined. It always seems similar to the "Exception handling" discussion in any book: This topic is too broad for this book, so we won't cover it. But no book is ever written on how to actual deal with it.

Does anyone else see this as being a possibility for a new tag?

10
  • 1
    That would be a bona-fide meta-tag, and those are hunted down and exterminated for good reason: They don't actually add value, resp. invite bad quality / off-topic content. Commented Jul 17, 2014 at 13:16
  • 5
    If your question is specific enough and shows sufficient prior research, it may find a good home on Programmers.
    – yannis
    Commented Jul 17, 2014 at 13:18
  • 1
    If you have an existing solution, an alternative might be to take it to Code Review: codereview.stackexchange.com
    – Nick Udell
    Commented Jul 17, 2014 at 13:19
  • @Yannis Thank you. That's a site I haven't been to in the network yet. The only other that was coming to mind was Code Review, but I knew it'd be even more off topic than at SO.
    – krillgar
    Commented Jul 17, 2014 at 13:19
  • 5
    If you ask for a "best practice" for the sake of knowing the "best practice", it's opinion-based by definition. If however, you want to know the best approach to a problem you're having, it depends. Give a few examples and approaches to your problem and it's all right to ask which one is best. If you just want to improve code in general, you can always check Code Review.
    – MarioDS
    Commented Jul 17, 2014 at 13:21
  • @MDeSchaepmeester That was my thought as well. Right now, I'm in between projects, so I don't have a specific example. I had the way I was taught in the books as I learned, and a different way that I was introduced to here on SO. I've had minor issues with both, and while I had some down time (and was thinking of it), I was thinking I could get some other OPINIONS. (There's that pesky word that answers my question again.) ;)
    – krillgar
    Commented Jul 17, 2014 at 13:23
  • @krillgar well indeed, the Q/A nature of SO does not favour opinions. You can always go to a good forum if getting to know a variety of different solutions is your primary intent.
    – MarioDS
    Commented Jul 17, 2014 at 13:26
  • Agreed. However, as is the nature of SO, having my inquiry answered in chat wouldn't help others who might have the same question.
    – krillgar
    Commented Jul 17, 2014 at 13:27
  • 2
    If you're simply asking, "Here's two code snippets, which is better, GO!" then it's both opinion based and broad. If you ask specific targeted questions about the problem that you have or about the code in question, such that the answers to those questions are objective facts about those code snippets and to which the answers have a well defined and reasonable scope, then the questions can fit on SO.
    – Servy
    Commented Jul 17, 2014 at 14:03
  • 3
    The definitive word.
    – Robert Harvey Mod
    Commented Jul 17, 2014 at 23:14

1 Answer 1

36

This subject is not for everybody immediately clear on Stack Overflow, so I'd like to write a few words from experience.

Once I've just asked what you propose in your question:

https://stackoverflow.com/questions/24279377/best-practices-for-forming-javascript-library

So have a look what's happened:

  • Some people found the question good, so it got upvoted.
  • More people (with more experience) marked the question as opinion based. RobG friendly invited me to rephrase the question so that it would be more concrete, with more context and so on.
  • Some people gave answers that, by luck, were great for me.
  • Then the question got closed.

That time, I gave it some thoughts but I didn't find a way to really improve the question.

Today, I understand that this question doesn't belong to Stack Overflow (as Yannis commented), but it belongs to the Programmers forum. There, you find all that tell-me-your-experience-questions, which is a wonderful enrichment for everybody who is under the real pressure of productive software development, where the results do count and the tactical errors can bring you in serious troubles.

Today, I think I can draw a better boundary and hence I could write a new question that would be accepted. Here is the boundary:

REJECTED:

"What are best practices to refactor some methods into a library?"

ACCEPTED:

"I'm trying to refactor some methods into a library like this:
   ...code... 
 Now can't get rid of that error: 
   ...error... 
 I debugged and found that the XY in fact has the YZ as it should, so I'm puzzled. 
 Does somebody see what's wrong here?"

But, as you can see, the new question is not of the same depth. It doesn't belong to SO.

In order to ask questions with more dimensions that need some experience, I'm enrolling to the programmers forum soon.


Having all this said, I'd like to suggest that people that comment questions in SO as off-topic write some short but concrete hints where the question belongs to. It took me some time to discover that there are many forums on Stack Exchange and to see that there are even several technical and/or scientific forums.

So instead of writing a comment like this:

"This is off topic. Doesn't belong here. - TheDummyName"

better write:

"This belongs to (Link to forum). Go and ask there. - TheDummyName"

Like this, some people willing to learn would adapt faster.


Finally, yes, I agree with you. If you browse through literature for programmers, you'll find much literature for easy subjects, that can be handled with a few lines, and you'll find much less about many-layer, multidimensional complex matter that has no thumb rules but needs tactical thinking to make the right decisions. I'm seeing the same. So if you make some great experience, if you find out something, consider writing an article :-) I cannot count how much I have learnt by articles and texts that are contributions of other people, I feel grateful sometimes. For this reason alone, I'd like to participate and enrich the amount of knowledge somehow.


Hope that helps :-)

3
  • 2
    The slight difficulty with suggesting a more relevant SE site is that sometimes questions are muddy, they can be missing information, poorly formed and off topic. In that case, sending a bad question to another site is ill advised, so it's necessary to try figure out exactly what the asker wants if you're going to recommend them a new site. Commented Jul 6, 2015 at 11:37
  • This might affect questions whom avg is downvote. Are smart anti-tags possible to SO?
    – Grim
    Commented Jul 18, 2019 at 17:39
  • 6
    Are you pointing to a specific Programmers forum or was that ment in general?
    – C4d
    Commented Jan 29, 2020 at 15:03

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