# MWEs and their wrongly assumed place in the question

Purpose: To improve the user experience of the visitors of TeX.SX (who most likely provide the majority of the traffic), in exchange for the slight detriment of that of the questioners and answerers.

It is a common practice in this community to request MWEs in questions without it. My personal observation is that they are usually taken as the actual question rather than just an example. I think this severely hurts the usefulness of the community as a resource.

Many questions here do not have an answer. The "answers" in them provide solutions targeting only the particular instance in the example, sometimes going completely against the question body and title.

Questioners can use the checkmark to designate which "response" resolved their troubles, not to choose which "answer" answers the question the best. This can create the illusion of answered questions, although in reality they are resolved problems of the individuals, which isn't what the StackExchange communities, and Q&A in general is about.

## Exhibit A

Coloring a node after its creation

A couple of things are very detrimental for the user experience with this Q&A:

1. The answer is incomprehensible to human eye.
MWE of the questioner is 48 lines. Accepted answer? 62 lines of code, no text.
The question clearly specifies that the coloring should be done "after creation", even in title. Required me to have a diff to find out that answer actually completely ignores that request.

The questioner is not to blame for their lengthy WE either. A true MWE to that question would be the following, silly as it is:

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\tikz{\node [draw] {A};}
\end{document}


However, any questioner, due to such abuses of MWE, is forced to provide their entire code without simplifications. Otherwise, they risk receiving workarounds as an answer to the MWE that do not apply even to their own real case!

Moreover, what if the questioner is just curious about something? Well, the they cannot assume that answerers will answer the question in the body. So they have to either make harsh warnings, or provide a bizarrely convoluted MWE so that the answerers are unable to outmaneuver the question with a workaround that applies only to MWE, and are forced to either answer the question, or don't.

These are all backed by the exhibit, and facilitated by the MWEs, and them being socially enforced.

## Exhibit B

Array indexing does not work for the node label

This one shows how MWEs can harm the generality of Q&A's:

1. The answer is only for a specific case of the question.
A question with the same body and title now has to be asked, only with a different MWE that instead provides a text/math array to use as the node label. See that question here.

This one is much more mild, as the answer at least actually answers the question. It still does it in a vision narrowed down by the MWE, focusing on arrays with numeric content. This yields an answer simply isn't complete, as the question body does not make such a specification.

Without a MWE, it would be easier for answerer to think about text/math node contents. Perhaps they would even think about those first.

## Exhibit C

Start aligning from another equals sign after some line of equation

This is a pro MWE example. It was not possible for the answerer to give a generally applicable answer. Thus, they openly stated that their "solution" is just a "trick". It presents an example quirks with the solution, and speculates that there might be others.

Of course, it's all posed, as it is a self-answered question. I was just presenting my own workaround that wasn't perfect.

Unfortunately, MWE's aren't usually respected like examples as in this case. If they were all like this, they would be perfectly harmless points to start for the answerers. I do not object against the idea of MWE. I think it's a great idea, misused.

MWEs are taken as if almost the main question, with the rest as secondary to it. This attitude towards MWEs make the questions very individualized, and damages the Q&A's applicableness.

I think every StackExchange community should take Q&A reusability as a performance metric. I think the misuse of MWEs is harmful to TeX.SX's performance.

There isn't just one solution to this. Here are some ideas:

• Discouraging answers that put the example at the center.
• fail to address the question title/body (e.g. Exhibit A), or
• fail to address the question title/body for another MWE (e.g. Exhibit B).

A functionality to let the answerer prevent their "answer" from being marked as answer could also be nice, for people that want to provide an individualized workaround for the questioner, while admitting that theirs is "not an answer to the question asked".

• The answer is neither forcing a MWE, nor “abolishing” them. Three examples, from questions I asked (because they were easy to find ;-) - this one doesn't have a MWE, nor would it benefit from one; - this one has a MWE, but would change very little if it didn't have one; and - this one would be impossible to understand/answer without the MWE. It all depends on the question, but some cannot possibly be answered without one, so MWEs definitely cannot be abolished. – Phelype Oleinik Jul 4 at 1:05
• Well, then you need define a line that separates example from main subject. Let me try to convince you with an example. This question could not possibly be answered with just the description and the picture: tex.stackexchange.com/q/513020/134574 – Phelype Oleinik Jul 4 at 3:32
• Yes a MWE can make a question more specific. There is a difference if you ask "how to change the look of sections in general" and "how to do it in the memoir class". But that is why I'm asking for MWE in such cases: I have neither the will nor the time to write a long article about how to change the look of sections in general and so will not answer a too general question. Imho the broader audience benefits from a number of answers to specific questions more than from a too general question without answer. – Ulrike Fischer Jul 4 at 10:34
• Telling people to specify their problem with a MWE is very educational. People learn much more about LaTeX if they are forced to describe it with a minimal example, as they have to reflect about their needs, check the commands, clean up their preamble. I'm not giving out fish, I'm only not teaching people how to fish in general but restrict my teaching to special cases like how to fish a trout in a lake with a net. – Ulrike Fischer Jul 4 at 12:17
• If I look for a global answer, I search the manuals. If I don't understand a pecul iar issue, I may end asking and TeX S.E. and I will need a MWE to get answers. So I disagree with your suggestion, but did not downvoted it nor upvoted it. I would have upvoted it regarding that it meets the standards of asking a question, but in Meta AFAIU, upvote/downvote might be also a mark of approval/disagreement, and I disagree with your proposal. – sztruks Jul 4 at 17:35
• The people asking questions here are not some bots whose task is to create jewel questions for future generations. They are real persons with real problems, quite often with restricted LaTeX skills and struggling with time lines for their thesis or other work. It is not fair towards such people to sneer at their questions only because they don't fit to your standards. If asking for a MWE helps them and improves their LaTeX skills it is a success. – Ulrike Fischer Jul 17 at 8:09
• One think that I think is different on TeX-sx from some of the other sites is a ling background of Usenet from a reasonable number of contributors. That means there is a desire to get the individual asking the question moving forward: general answers are good, but if the OP can't solve their specific problem, where do they go to get help? – Joseph Wright Jul 17 at 11:51
• I notice that in your edit, examples A and B are both TikZ-based. There's a long-standing tension about 'drawing' questions (general solutions to using TikZ don't necessarily get a drawing done, but for many people there's a feeling that drawing questions are 'do it for me'). Could you point to some non-TikZ/non-drawing examples? – Joseph Wright Jul 17 at 11:53
• There's a broader question that's not specific to MWEs: to what extend should questions be about general concepts, and to what extent are they about solving issues individuals are having. There are lots of questions that address the former, but users can't always use them to handle the latter: I don't have an answer to where the balance lies, but I can see that there is a conflict in terms of 'purity'. – Joseph Wright Jul 17 at 11:56
• In my experience there can be up to three questions in one question: (1) The question in the title, (2) the question in the body and (3) the question in the MWE. In unfortunate circumstances the three may differ. (Especially the question in the title is usually much less nuanced, because it has to be short.) I'd say that in your example A the title question (taken at face value) is just different from what is asked in the body and the MWE. In this particular case I'd claim that the answer did answer the question in the body. – moewe Jul 18 at 13:20
• Ah, I didn't (want to) claim that the three questions in example A are incoherent, it's just that the title question can be interpreted differently than the more nuanced question in the body. I don't quite agree that one must always try to reconcile all three possible questions. The question in the title is always at risk of being oversimplified because it needs to be short. Why should I write an unnecessarily complex answer just to satisfy a perceived requirement in the title question, when a much simpler answer answers the more nuanced body question more pointedly? ... – moewe Jul 20 at 14:50
• ... Many (most?) people come here to get their concrete problems resolved. Why should they get an overly complicated solution when something more straightforward is possible? If a more complex solution to broader problem is of interest to you and you feel it is not being addressed, then just ask a new question. – moewe Jul 20 at 14:54
• If you make the site harder to use for questioners and answerers, you will get fewer and/or poorer questions and answers. That does not give visitors a better "user experience" - but it might make it a quicker "user experience" to decide that visiting the site was a waste of time. There is no point in having questions that, because of lack of detail, are like the ones which sometimes appear on another SE stack: "Suddenly my car won't start. What is wrong with it?" – alephzero Jul 23 at 16:46
• I would argue that a MWE makes a question and solution more applicable. If some example has ~10 different packages, and I am using 7 of those packages, does the example apply to me or not? Should I make sure that my answers work for all possible contingencies? How in the world should that happen? It's rare that getting to a MWE turns out to have trimmed something essential, and even if it does, I'll have learned something in the process (and get two useful questions instead of one). – Teepeemm Jul 23 at 22:46

While it is definitely true that minimal examples are sometimes asked for reflexively, and it's possible to make questions that shouldn't require them, (see automatic check for MWE for some prior discussion) I don't think that discouraging MWEs is at all the way to address the problem you are raising. Here are some counterpoints to think about (some are the same points raised by Ulrike Fischer in her comments):

1. Questioners generally want to solve specific problems. But much of the time it's hard to tell what they are trying do without a MWE. And removing the need for a MWE doesn't make the specific problem go away and the question more general. Also, things like document class can matter a lot, even for general questions: how to change section titles is a general question, but doing it in the standard classes vs. memoir vs KOMA requires distinct solutions. Similar points can be made for font questions and bibliography questions, among others.

2. Even general questions can benefit from a MWE. What makes them general is not the lack MWE, but the specific question asked along with the MWE.

3. Questions without examples can easily lead to XY problems. MWEs go a long way to clarify issues so that bad solutions don't get encouraged.

4. Answerers are volunteers who give up their time and expertise to answer questions. Providing MWEs as starting code saves time and encourages answers.

5. The "generalization" problem works in both directions. Depending on your level of expertise, applying a general solution to your specific problem may or may not be difficult. This relates back to point 1. Conversely, applying the method used in a specific problem to a more general one may or may not be difficult.

6. The site doesn't operate on rules, generally, but on conventions that people follow. So talk of "abolishing" anything is really not terribly productive.

## Some other alternatives

I agree with the main point that answers to very specific questions may be of limited use to others, but there are ways in which answers can be made more general.

1. If you answer a specific problem, think about whether there is a more general version of the code that would be useful to others and include that in your answer.

2. If you think that there is a general question that would help others, ask it yourself, but as with point 2 it's still helpful to have an example to work with.

3. Do what you think is best to help the site, in your own behaviour but don't try to legislate behaviour of others.

• 1) Class can be mentioned in question/tag if relevant, much like mentioning the prog. lang. in an SO question. 2) I fully agree, but answerers do tend to target just the MWE, although it's just an example. See the first link in the question. 3) XY problems aren't inherently bad. One can rightfully wonder why their particular attempt has gone wrong, to learn about the technicalities. A forced (yes, they are) MWE lets the answerer avoid Y, provide another solution to X, although the questioner just wants to know about Y. 4) Respect. 5) True, but less likely. 6) Conventions are "unwritten laws". – Utkan Gezer Jul 4 at 21:53
• One comment from Ulrike that you didn't mention in this answer is about the educational value of MWEs, which I think is very important (complementary to the equally valid points that you already raise in the answer). – Marijn Jul 5 at 11:03
• @Marijn Yes, I agree. My answer wasn't intended to summarize Ulirike's comments; I wrote it before reading all the comments and realized there was some overlap. – Alan Munn Jul 5 at 15:20
• Please see: tex.stackexchange.com/questions/230660/… The question clearly asks for how to fill a node after its creation. The answer? I'm just speechless... Your recommendations are great, but the community is seemingly abusing MWEs to avoid answering the questions, and instead to provide solutions case-by-case. The result? Questions without answers. – Utkan Gezer Jul 16 at 18:43
• @UtkanGezer But please don't accuse users of bad intentions for which you have no evidence. – Alan Munn Jul 16 at 22:05
• @AlanMunn That question does not have an answer for sure. That person's troubles, yeah, seems to have been resolved. Are StackExchange communities personal resolution centers, or for Q&A's that are for everybody? I think it's the latter. – Utkan Gezer Jul 16 at 22:14
• @UtkanGezer The answer to that question is "both". And writing a question that is both general and explicit enough to get an answer is not trivial. As I said in my answer and my comment, if you want to improve the site by making questions that you think have general value, then you should definitely do that. But they are still likely to require some example code for people to work with. – Alan Munn Jul 16 at 22:17
• @AlanMunn Take this toy example. I ask "2 + 2 = ?" on Math.SX, someone answers me with a proof of that the answer being positive. I accept it. Does this make that question answered? – Utkan Gezer Jul 16 at 22:19
• @AlanMunn That question's title explicitly states that it wants the coloring after the node gets created. Tex.SX should at least have a policy to change the title's of such incidences. It is inconsistent and misleading. I want to improve the site, but on a meta level. This is not a problem to be tackled by one. MWEs are socially enforced here. – Utkan Gezer Jul 16 at 22:26
• One more comment: among Mico, me and the people who commented we have more than 800k reputation. Minimally this means we collectively have a lot of experience with the site, and we know how difficult and frustrating it can be to answer questions without MWEs. That experience is also what is motivating our position on MWEs (and certainly I don't insist on them all the time). – Alan Munn Jul 16 at 22:26
• @AlanMunn It is very hard to respect your reputation blindly, given that I have seen an answer that is code-only, and completely going against the question title from someone with 566k reputation. Clearly, some things aren't in direct correlation with reputation. – Utkan Gezer Jul 16 at 22:29
• @UtkanGezer My comment wasn't intended to ask you to respect our reputation, it was merely to provide context of why we might hold the views we do. – Alan Munn Jul 16 at 22:45
• @AlanMunn I revamped the question with a major edit. I am just trying to point out a rot in your community from a perspective that might be too far from you now, as you are clearly in too deep. Every time I get troubles in Latex, I end up here, and am filled with frustration and disappointment. I never have felt similar with SO (first visit '13), nor in any other SX site. My first visit to TeX.SX was in '14, and this experience has been with me here since not much after that. – Utkan Gezer Jul 17 at 0:12

Your main claim appears to be,

a MWE forces [queries] to be way too specific.

As @AlanMunn and others have already noted, MWEs are not essential for all queries. However, for a great many queries, they are indeed essential.

• A disturbingly large number of queries starts out vague and unfocused. Postings such as "Ummm, I had some code that was working until last week, but now it no longer does. Why?" are sadly not unusual on TeX.SE. [Maybe you haven't seen many of them because they tend to get deleted if they aren't improved.] Obviously, these OPs need to be encouraged to provide some more, usable information. However, just telling the OPs that they need to provide "more information" often does no good at all. On the other hand, telling them that they need to provide an MWE (and, of course, giving them a pointer as to what "MWE" means) is often all it takes to get them to provide just the information that's required to solve their problems. Of course, sometimes it's only when a semblance of an MWE is produced that one comes to realize that the OP's vague question has no discernible connection to TeX, LaTeX, and friends to begin with. However, without the MWE, it might take a whole lot longer to figure that one out. [Such postings also tend to get deleted!]

• Some queries happen to be of a fairly general nature; e.g., How do I create unnumbered sectioning headers? Most queries are much more specific, though. Without knowledge of the document class that's in use, the main packages that are loaded, and the actual LaTeX or BibTeX code that's causing grief, one simply would never get to the stage of performing an accurate diagnosis of the situation, let along getting to the stage of offering a solution.

• Quite often, there are conflicts between packages. Unless the OP states exactly which packages are loaded, one will hardly ever be able to come up with a correct guess of what's causing the problems. For instance, the real problem in eqref - showonlyrefs was caused by a fundamental conflict between the mathtools package (specifically, one of that package's options) and the cleveref package. Absent the MWE, the OP's valiant attempt at a description as to what might be going would have never allowed me (or others...) to figure out what the nature of the issue was.

• At other times, problems are caused by the OP not using the latest vintages of packages and/or external helper programs. (You'd be surprised to find out how many folks are still using TeXLive2014 in mid-2020 -- and express surprise and even dismay when they're informed that there have been software updates in the meantime.) Unless one can establish which vintages of which packages and programs are in use -- easily done once the OP has provided an MWE -- one will never come up with the correct diagnosis in cases of vintage incompatibilities.

To sum up: If the objective is to keep TeX.SE useful for a great many users, abolishing MWEs would be the wrong way to go.

• Your word "disturbing" reminded me of the comments on my first question on TeX.SX. Check its edit, and tell me if it was necessary. 2 people posting 6 comments of absolutely nothing. Threatening, condescending, and vacuously authoritative... Don't tell me about what's disturbing... Tell me whether that bullying was necessary. – Utkan Gezer Jul 16 at 23:59
• @UtkanGezer - Would you prefer it if I had used the adjective "distressingly" instead of "disturbingly"? (Aside: The fact that so many queries posted to TeX.SE are of rather low quality, in the sense that they don't provide any useful information regarding the nature of the problems the OPs are looking to solve, is both distressing and disturbing to me.) Your posting makes a few valid points; that's why I bothered posting an answer. Quite often, when a posting is unclear or unfocused, there are indeed better means than asking for an MWE to get at what's vexing the OP. (to be continued...) – Mico Jul 17 at 5:31
• @UtkanGezer - (continued from preceding comment) That said, I continue to believe that without MWEs, many other queries have absolutely no chance at all of being answered meaningfully. I also disagree with the view that the mere posting of an MWE somehow narrows down the range of potential answers. Indeed, in my experience, queries which (a) contain a well-designed MWE and (b) state clearly what the OP is trying to achieve frequently tend to attract multiple answers. BTW, I didn't cast one of the (currently) four downvotes on your posting; indeed, I provided an upvote. – Mico Jul 17 at 5:43
• @UtkanGezer - A final comment: Your posting comes across as you claiming that narrowly-defined MWEs cause the answers' scope to be too narrow as well. IMNSHO, though, it's not the MWE per se but the lack of accompanying information about the bigger formatting issues that causes an answer to be (too) narrow. Providing an MWE should not be interpreted by OPs as a license not to bother with providing other relevant information. FWIW, I am terrible at mind-reading; if the OP doesn't provide the "big picture", chances that I'll come up with it on my own are nil. I tend to avoid such postings... – Mico Jul 17 at 6:14