3

I submitted a question asking the difference between two content types used in HTTP requests and the when/why to use one over the other. My question was closed as off-topic, as it is allegedly "not about programming or software development."

However, I think that my question matches the description of what StackOverflow considers to be on-topic. Additionally, I have seen many other questions of a very similar nature that were received very well by the community, for example:

This leaves me feeling confused. I am of the opinion that my question indeed relates to programming and that the community has already established that these types of questions are de facto acceptable, but three anonymous individuals seem to disagree.

I just want to a) better learn the community standards, b) improve the way I write questions, and c) find the answers I need while still contributing something of value to the community.

What do you think?

15
  • 1
    Which question are you talking about? Is it What's the difference between 'multipart/form-data' and 'multipart/mixed'?
    – Anerdw
    Commented Sep 14 at 16:29
  • 3
    Sounds like a bad closure to me - maybe there were other issues with the question?
    – kmdreko
    Commented Sep 14 at 16:32
  • Although I have to wonder if that question should remain closed as it is asking a fairly broad question, multiple questions actually. Also, it is asking for opinion, even though it states it desires an "object reason", this is still asking for opinion. Commented Sep 14 at 16:38
  • 1
    @HovercraftFullOfEels having that as the reason for closure certainly make be happier than "not about programming" because I would at least have the opportunity to improve my question... Commented Sep 14 at 16:42
  • 1
    Perhaps a mod could change the close reason, but I don't think that it really matters, unless you want to edit it to get it re-opened, but from where I sit, this may be quite hard to do. Commented Sep 14 at 16:44
  • You should probably ask this on Discussions, but chances are you won't get an answer considering the low traffic there.
    – M--
    Commented Sep 14 at 16:45
  • @kmdreko as it stands, no one has left any comments to accompany the closure/downvotes, so I can't really say. HovercraftFullOfEels points out that the question falls under the too broad/opinion based category (this I can fix), but there's no explanation as to how it is unrelated to programming. Commented Sep 14 at 16:45
  • @HovercraftFullOfEels what is hard? Moderator intervention or edit to re-open? Commented Sep 14 at 17:03
  • 2
    It might be hard to edit it so that it is not overly broad and opinion based as it would require a massive re-write. It may be possible, depending on exactly what question it is that you want answered. Commented Sep 14 at 17:12
  • @HovercraftFullOfEels I have a working proof of concept using multipart/form-data, so don't need help. My objective to expand my knowledge so I can make a more informed decision. That's why the question is, "what is the difference?" and not, "which is better?" Yes, I did edit the question to eliminate the "why might one be used over the other?" because you were correct about that piece being opinion based. Can you please help me understand how the "what is the difference?" piece is too broad? The questions I linked above seem to be of the same nature, and they were well received... Commented Sep 14 at 17:22
  • @CPlus On Meta downvotes can also mean disagreement on questions tagged with discussion. A shorthand for upvoting a corresponding answer. However, it makes interpreting scores more difficult, but since negative score matter less on Meta it's probably okay. Take away message is that negative scores on Meta do not necessarily indicate bad content. Commented Sep 15 at 8:47
  • 1
    @NoDataDumpNoContribution I have never understood the 'downvotes mean disagreement' for anything other than feature requests honestly. How do you disagree with a discussion question that is not an assertion, but just a question?
    – CPlus
    Commented Sep 15 at 15:40
  • 1
    @CPlus You're right. Now I remember that it was only for feature-requests, not for discussions. It would be unclear what it means for open discussions. But you know people, they find an assertion. For example assume that the poster always wants the best possible outcome for him/herself and you have an assertion with which one can disagree. But maybe it's also something else. Sorry. Commented Sep 15 at 15:54
  • Question deleted by OP, could you add a Screenshot for <10k-Users...? // (It's a bit annoying to have to ask for nearly every Qt on 'Meta' asking for feedback/"What do you think?" about a specific Qt to provide a Screenshot as most OP's end up deleting their Qt, grrr...)
    – chivracq
    Commented Sep 15 at 16:31
  • 1
    @CPlus the only honest description of voting on questions on meta is that it is completely random. And thus, don't get too hung up on it. Meta questions should be judged by how they are answered. This one is fine except that the topic of close reasons comes up quite frequently. If you really want that a), b) and c) you listed to be true, you have quite a lot of reading that can be done.
    – Gimby
    Commented Sep 17 at 15:07

1 Answer 1

10

I submitted a question asking the difference between two content types used in HTTP requests and the when/why to use one over the other. My question was closed as off-topic, as it is allegedly "not about programming or software development."

That's because the person who makes this choice is administrating a server, not writing code. When you write code that makes an HTTP request, you follow the choice that was made by the server.

You say in the question:

I am creating a REST API and I need to submit some metadata data along with a PDF file in a single POST request.

But if you are creating the API, you are not making the request - instead, you are configuring the server to return a response to that request (and choosing the MIME type that will be associated with that request).

This could be an on-topic question if it were about actually writing code to generate the response and specify a MIME type in that response. But a question asking what which MIME type you should use, would most likely be closed as primarily opinion-based. And understanding the intended purpose of each, has nothing to do with the actual mechanics of applying one or the other - it is, again, understanding a concept in networking, not in programming.

In general, design and architecture questions are a poor fit for Stack Overflow. (When they're objective and topical enough, they're usually not properly focused.) For questions that aren't an obvious fit for a more specialized site (such as Super User, Server Fault or PLDI SE), consider Software Enginering SE.

Aside from that, "what is the difference" questions are usually misguided on Stack Exchange sites in general. I don't think that applies in your specific case, but it's important to watch out for the problem of accidentally asking two questions in one. Often these questions embed a false assumption that the two things are related in some meaningful way at all; or are too vague about that relationship. There could be multiple differences, or there might not be any sane way to compare the two things. "What is the difference between X and Y?" often can't be answered any better than separately answering "What is X?" and "What is Y?"; those are two separate questions, and "what is" is generally not going to be specific enough for either question. If you mean "what is the practical effect of specifying MIME type X for the client?", then you should be explicit about that - but there's still not a lot that can be said about this unless you specify a client.

Additionally, I have seen many other questions of a very similar nature that were received very well by the community

We commonly get this objection. Most of the questions you're highlighting are quite old. Stack Overflow has narrowed in focus historically along with the creation of more specialized sites, as well as a general discovery on Meta of a consensus about how Stack Exchange sites are intended to operate. But also, the community's rules and regulations are applied mainly on a volunteer basis, and by consensus, so perfect agreement can't be expected.

But also, some of the questions you've highlighted simply aren't as similar as you think. For example, What determines whether a file should be application/octet-stream vs text/plain? is actually about the heuristics used by the libmagic system library - which can also be used through the file executable included with typical Linux distributions, but also through the python-magic Python binding. The question shows code using Python to access this library, and is asking about other ways to check whether something "is a text file" (admittedly not very well-defined), so it's clearly a programming question.

3
  • Thank you for the in-depth answer. I did not clarify this in my question, but I am writing both the servlets and the their clients. I've already determined that the response will be application/json, but the request MIME type is what I am debating. I agree with the points you've made and they've given me a better understanding of why my question was closed. Maybe the best course of action is to delete my question and spend a few hours reading through the RFCs. Commented Sep 14 at 19:53
  • 1
    Since you're in control of the server side, there's no reason you need to choose a MIME type for the request - because you can simply write server code which ignores it. The reason we care about MIME types on responses is because other people can write clients for our servers, and might find the information useful. If you're creating a server protocol and expect others to implement it, you'll probably want to make an RFC directed at the target community of implementers. Commented Sep 14 at 23:10
  • 4
    "Most of the questions you're highlighting are quite old." Several from 2016, 17 and 19. Maybe it's because I'm also a bit older, but I wouldn't say that these questions are so old. Definitely not from the beginning of SO when anything was possible. Commented Sep 15 at 9:00

You must log in to answer this question.

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