-2

This question already has an answer here:

In my programming journey, I have been able to solve problems by writing spaghetti code and copying and pasting it through out my solution, as long as it works.

So not so long ago, I reached a stage where I was more interested in solving problems in accordance with best coding practice, creating maintainable code rather than a quick fix.

However, in my search for help I have also noticed negative reactions to best practice questions (downvoting). Yes, I do agree these questions fall into the XY problem spectrum.

However, I don't understand how one is expected to improve his skills and coding ability by not receiving such help?

Why are best practice questions not welcome on Stack Overflow?

marked as duplicate by gnat, Nathan Tuggy, Ward, PolyGeo, ale Mar 12 '16 at 21:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    @Mat - meh. This question is applicable to all Stack Exchange sites. – Oded Mar 12 '16 at 14:01
  • 2
    You're basically saying that since those questions are helpful, they should be allowed on SE sites. We either have to be a place for all of (good) questions and do a bad job serving each, or be a place for a special subset of questions. We chose the latter, and "best practices" are just not in that subset. – M.A.R. Mar 12 '16 at 16:28
  • Quora will accept such questions. Sample: How do you learn/practice to write clean code? – Peter Mortensen Mar 13 '16 at 13:56
  • @PeterMortensen, thank you very much for the link. Exactly the kind of answer, that adds value to the "best practice" dilemma and helps to understand how one can improve his or her coding abilities. – JustLearning Mar 13 '16 at 20:48
7

Why are best practice questions not welcome on SO?

Because, as you said: "I do agree these questions fall into the XY problem spectrum".

how one is expected to improve his skills and coding ability by not receiving such help?

Elsewhere. Stack Overflow is not the place for them. You have colleagues, you can find a mentor. Perhaps other sites that are not Stack Exchange sites that do cater for such questions.

Note that "best practice" is not well defined - not without a context. What is a best practice in one scenario can be a very bad practice in another. This ambiguity makes such questions prone to interpretation and thus - even less suitable for Stack Overflow and other Stack Exchange sites.

  • 2
    +1 for bald "elsewhere". Like many a barman has told me, "You don't have to go home, but you can't stay here". In a sense, I think this is a symptom of SE being a victim of its own success: it's so visible now that people think of it as the first stop on their hunt ("SE is the place to ask any question, and if they can't answer it, they're responsible for telling me who can"), but it should be the second ("Oh, I've found a good question for SE, let me ask there"). – Dan Bron Mar 12 '16 at 16:18
  • @DanBron, I agree and disgreee with you. I believe SO, is indeed invaluable in providing a medium where you can seek answers to questions, i also believe that asking a question without trying to attempt to solve it first, is not the right way to go and does not add value to SO. However, asking a question after you have tried and failed consecutively and then seeking help on SO (because one may not have the privilege of a mentor or a colleague to ask) should not be considered as a crime on SO and should rather be encouraged, not so? – JustLearning Mar 14 '16 at 9:55
  • @Oded. I think you are absolutely right about best practice is not well defined and only applies within a certain context. So do you mean to say, if the context is indeed provided by the user and the user is seeking help (e,g. i have problem X, this is my solution Y. Do you think Y can be improved?), the question will not help others in similar situations, therefore it must never be asked on SO. – JustLearning Mar 14 '16 at 10:02
  • @ShareYourKnowledge - that's correct. We used to have a close reason "too localized", which was supposed to mean "won't help many people" (but was misused and therefore retired). – Oded Mar 14 '16 at 10:04
7

Because 'the best' is a very subjective question. These kind of questions tend to gain a lot of subjective answers with a lot of discussion on the opinions behind it.

We are not a discussion forum, we have questions and answers.

For more 'whiteboard' like questions, there is Programmers.SE. Still, subjective questions are off-topic there, but they can help you on the journey of making good software design decisions.

  • Thank you @Patrick Hofman. I will definitely give it a try – JustLearning Mar 14 '16 at 10:08

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