I want to ask a question about url slugs, specifically if there is a reason why spaces are avoided in slugs. Is this a valid question here or on any SE site?
-
28I personally would welcome that question, provided you put some examples and research into it, unless it's a duplicate (no idea), though it's probably near the border. Not sure whether Software Engineering would be better...– DeduplicatorCommented Aug 16, 2015 at 18:24
-
29As long as you word it so it's not "why is X bad practice" because this is too subjective. Users have "opinion" on why something is bad practice. You need to hone your question down to something specific, like "Do spaces in URL slugs cause problems for browsers" etc– JamesCommented Aug 16, 2015 at 18:26
-
1A cursory search at Webmasters.SE shows a couple of questions about spaces in URLs, but mostly about SEO and with no good sources in the answers. The tour is pretty useless as far as deciding whether your question would be on-topic there, and they don't seem to have a chat to check in.– Jeffrey BosboomCommented Aug 16, 2015 at 20:17
-
2@JeffreyBosboom I actually found an answer in one of those SEO questions: webmasters.stackexchange.com/questions/32867/….– topherCommented Aug 16, 2015 at 21:11
-
4@James: That seems too strict. A question like "Why are singletons bad practice?" seems perfectly fine to me, and it already exists with nearly 1k upvotes, with just slightly different wording.– user541686Commented Aug 17, 2015 at 2:19
-
2It would help a lot if you would include sources that claim it is "usually avoided". That way it's already verified that it's not just you having a misunderstanding.– Jeroen VannevelCommented Aug 17, 2015 at 3:29
-
stackoverflow.com/questions/497908/…– JDBCommented Aug 17, 2015 at 3:30
-
8@James: asking the OP to hone the question into something specific like "Does X cause problems with Y" misses the point - they don't know what the downsides to using X are. It might not even cross the OP's mind that X would cause problems with Y, which is why they want to post the question.– Dan DascalescuCommented Aug 17, 2015 at 4:54
-
1A lot of the responses I see to Questions like "Why are singletons bad practice?" are opinions. If it is not a fact, it is an opinion, by definition. There are few facts in practice (and fewer who know them properly), and therefore most of what we do is a result of opinion. That is why we call it "Practice".– user4624979Commented Aug 18, 2015 at 13:49
-
@DanDascalescu Fair point, but the OP not knowing what problems might be caused by X does not resolve subjective or too broad for a question asking "why is X bad". They wanted to know "specifically if there is a reason why spaces are avoided in slugs" they must have some scope. Will it break their framework, their class, their browser, all of those - etc. My point was their example was asking something which would likely be too broad/subjective/opinionated etc. My comment was just a simple and basic note or warning.– JamesCommented Aug 22, 2015 at 22:09
5 Answers
I think that this general form of question can almost always be reformulated into,
What are the disadvantages or risks of x?
This wording invites clear, objective answers about what potential problems and pitfalls are involved that would cause a programmer to avoid it. If something is widely considered to be bad, then the common disadvantages/risks should be obvious to someone who has an informed opinion. It also discourages discussion about what way is "better," and instead invites pure information so you can make your own informed choice. I believe a question of that form would be on topic, as long as it meets the other normal criteria.
I will note that this does seem pretty broad in terms of what site these questions could belong on. If you're asking about what problems some specific piece of code is likely to run into (you could fairly easily generate a short snippet for the purpose of example) or you have specific questions about a particular standard or language feature, StackOverflow is probably the best fit. If, however, it's about a more general practice, Programmers would probably be a better place. But I think most questions of the form I suggest can find a place somewhere on the StackExchange network.
-
1Code review is the wrong place. It's either UX.se, programmers.se, or webmasters.se.– PacerierCommented Aug 18, 2015 at 13:37
-
3I agree with your answer, but in practice such a question can be closed as "asking for a list."– aebabisCommented Aug 18, 2015 at 17:00
-
@Pacerier I was envisioning a working implementation of a particular pattern/technology/etc., where the asker is concerned that they might have some security holes or lurking bugs. That sounds like a perfect fit for Code Review. I'll rephrase.– jpmc26Commented Aug 18, 2015 at 18:22
-
1@acbabis That's not a close reason at present. As long as the scope is narrow (one particular practice, one particular library, etc.) enough to be answerable, I don't see the problem.– jpmc26Commented Aug 18, 2015 at 18:25
-
I always thought that list type questions that generate a degree of opinionated answers are out of scope? Commented Aug 19, 2015 at 8:32
-
List-type questions are simply qualified as "too broad". Commented Aug 19, 2015 at 17:22
Exhibit A:
Why are spaces not allowed in URLs
Exhibit B:
Why do some people not like Allman Brace Style?
Can you see the difference? One of them is a constructive, clearly-answerable question, while the other is not, it being merely opinion.
In a perfect world, we would only rely on the question itself to determine constructiveness. In reality, sometimes we have to look at the potential answers to a question to determine if the question itself is constructive.
-
1... and by "sometimes", you mean "for three of the predefined close reasons and two of the custom close reasons" ;) Commented Aug 17, 2015 at 4:22
-
5I'm not especially fond of Exhibit A. Perhaps in this specific case, it could be answered, but the general form often comes down to, "Whoever wrote the code/spec decided that and we don't have an answer why." Or is that your point?– jpmc26Commented Aug 17, 2015 at 4:38
-
1@jpmc26: The answer to Exhibit A can be found here: stackoverflow.com/questions/497908/…– Robert Harvey ModCommented Aug 17, 2015 at 4:49
-
1I'm not really interested in that specific answer... I was taking you at your word that it is answerable. However, many questions of that nature simply don't have an answer beyond picking the brain of whoever made a decision. Is your point that Exhibit A is of that form, but despite that, it can be answered and so is fine, whereas many others would not be fine because they don't have an answer?– jpmc26Commented Aug 17, 2015 at 4:55
-
-
3I did. I'm sorry. I'm dense, and I try not to assume when something isn't dead simple and staring me right in the face. Hence why I asked. I'll take that as a yes, even though I'm still not 100% sure.– jpmc26Commented Aug 17, 2015 at 4:57
-
2Are you suggesting Exhibit B is not answerable? I feel even if it is your preferred bracket placement style, one could come up with a set of disadvantages / reasons as to why people don't like it. The belief that they outweigh the advantages, without evidence or a clear statement of what makes one better over another, would be the opinion, not the disadvantages themselves. Commented Aug 18, 2015 at 12:13
-
1@MichalCharemza: See Parkinson's Law of Triviality.– Robert Harvey ModCommented Aug 18, 2015 at 14:37
-
If you're suggesting I'm focusing on the wrong thing, I have to admit that you may be right... Commented Aug 18, 2015 at 17:31
-
1
I think you'd have some trouble, since Stack Overflow generally prefers specific questions. A vague "why is x usually avoided" would probably require some evidence (statistics) that x is actually usually avoided. In the process of finding that evidence, there's a good chance that you'd end up answering your own question.
Ask a question specific to your situation... don't over-generalize it to the point that it becomes unanswerable.
-
If I did enough research to find the Answer, I would not pose the Question, and someone else with less time or resources or diligence would not have both. I think SE has made a fetish of question-wording and polish and effort. If you don't like a question, just ignore it! Let normal people be normal, which is to say, imperfect. If you only want "professionals" here, then you must make them prove themselves when they register, and have no ability to ask or answer until they do. Which do you want?– user4624979Commented Aug 18, 2015 at 13:34
-
2@nocomprende Stack Overflow is for professional and enthusiast programmers, people who write code because they love it. and You should only ask practical, answerable questions based on actual problems that you face.– JDBCommented Aug 18, 2015 at 14:45
-
1The community recognizes that there are many different skill levels, but the point of the site is to create a repository of questions for future visitors. A question need not be perfectly polished, but the worse shape it's in, the less useful it will be to anybody except the OP, defeating the purpose of this site.– JDBCommented Aug 18, 2015 at 14:48
-
-
I survived as a programmer before the world wide web. Once, due to an error in a printed book (my only resource for the DOS TSR system that I was building to share modems over a Novell network in 1992) I had to go buy another book to realize the problem and correct it. I can do research and solve hard problems. What made me stop programming was the lack of interaction with other people.– user4624979Commented Aug 18, 2015 at 19:37
-
2@nocomprende - SO is a particular site created for a particular purpose. See Joel's talk about it. It's fine if you think that SO is not a complete solution... it's not. But that doesn't mean that SO should change. It means that SO is a tool for some problems and not for others.– JDBCommented Aug 18, 2015 at 20:31
-
1@nocomprende: If you did enough research to find the Answer, then if you feel the Question is important enough you could pose it and self-answer it. Then everyone else with less time or resources or diligence would have both. And you'd personally get the benefit of having your Question & Answer documented online for your own future reference. And who knows, you might score a few more points. :)– PM 2RingCommented Aug 19, 2015 at 7:57
I depends on what x
is in context of the question. Sometimes there is factual evidence onto why x
should be avoided. But other times, it might be opinion-based.
So, it really depends on what x
, the topic at hand, might be.
-
I would go further: It depends on the answers. I think in general questions such as these must be left for a while to see if they attract any good ones.– RobinsonCommented Aug 19, 2015 at 7:17
-
I agree, if there is no real answer, then it shouldn't be asked.– user3117575Commented Aug 19, 2015 at 7:19
It seems reasonable to me. Asking "Why is X avoided" is basically shorthand for "Why do most programmers think that X is bad", which is not subjective. There are generally a couple of clear reasons for most common practices like that.
If the question was "Is X bad", then it becomes subjective, and there could be a wide range of views on the subject.
-
5I think the hard part would be establishing that "most" programmers avoid a certain practice.– JDBCommented Aug 17, 2015 at 3:29
-
1Technically speaking, you don't need to. It's no less reasonable to ask why some programmers avoid a certain practice. Commented Aug 17, 2015 at 5:51
-
2"Most" could become a distraction and source of argument. There's no reason to include that word. Asking a specific question about your circumstance would generally avoid such needless banter. Of course, we are speaking about generalities. There's no hard and fast rule. YMMV.– JDBCommented Aug 17, 2015 at 11:40
-
2Everything is subjective. Or, as Robert M. Pirsig said in Zen and the Art of Motorcycle Maintenance, "Everything is an analogy." Programming did not arrive carved in a stone tablet: we invented it.– user4624979Commented Aug 18, 2015 at 13:36