67

I have seen a many popular questions on Stack Exchange which are asking for explanations for very simple things like what does the yield keyword do and does Python have a ternary conditional operator.

In fact, if you look at a list of the highest voted Python questions, you may see a trend that very 'simple' questions (ones that could be found in a book) tend to be voted more highly because it is the simple questions that people often search for most frequently.

Many of those questions appear to not "show their work", which is said to be not allowed in the tour section of this website.

Taken from the tour section

I think they are great questions and add value to this site, but I am confused as to when you need to show your work. Many of these questions could be answered if they would have looked in a book; but it is useful that they were asked because we can Google for the answer instead.

As a low rep user, I feel that I must make a considerable effort to prove that I've 'done my work' to avoid being chastized. However, sometimes trying to prove that I have done work results in:

  • The question loses clarity and brevity
  • Attention is given to the work done rather than the actual question
  • Less people are willing to read your question
  • Answerers skimming through the question and fail to understand the question

I believe the brevity of the questions in the list attribute to the popularity.

Therefore, I am confused with how to frame a good question; although I believe that using brevity is very desirable. When is it OK to ask simple questions without showing my work? Is reputation a factor?

27
  • 6
    Related, if not dupe:How much research effort is expected of Stack Overflow users? Commented Sep 7, 2016 at 20:19
  • 21
    If you look at that list of questions, most of them are from '08, which was prior to many of the rules we have now taking effect. Commented Sep 7, 2016 at 20:20
  • 8
    In addition to being in any intro book, these types of questions are also virtually always also easily discoverable with a simple web search, so no, this isn't improving the searchability of those terms. In the vast majority of cases, it's doing nothing, at most, it's stealing traffic that would otherwise have gone to another site with this information (often the canonical documentation) and directing it here, where the same information would be found.
    – Servy
    Commented Sep 7, 2016 at 20:21
  • 1
    @MikeMcCaughan People regularly overstate the differences in the rules. Most all of the same rules existed back then. Certainly all of the relevant site guidelines for the purposes of this question have existed since day one, as they're founding principles of the site.
    – Servy
    Commented Sep 7, 2016 at 20:22
  • 4
    @Servy They are pretty simple questions, but the amount of views and votes they've received indicate that they are valuable. People will search for them and hitting a reputable page quickly makes the world more efficient. There's also the benefit of seeing multiple answers. I'm an engineering student and when I'm not satisfied with the textbook answer, I look online. Perhaps there are better diagrams, perspectives, or approaches to an explanation. I really believe that these answers contribute something, not detract. I think you might not like it because you're a much more advanced user.
    – Klik
    Commented Sep 7, 2016 at 20:54
  • 15
    @Klik the amount of views and votes they've received indicate that they are valuable That is a false premise. That a lot of people have seen something doesn't mean that that thing is more valuable than something that has less views. Simply see my previous comment. That SO is getting views for it doesn't mean that information literally doesn't exist anywhere else in the entire internet, merely that SO has more Google Juice on those specific topics (or just even enough to get a small percent of the traffic).
    – Servy
    Commented Sep 7, 2016 at 21:00
  • 2
    Be sure to spend all your money on lottery tickets. You can't lose, there is always a winner. Commented Sep 7, 2016 at 21:02
  • 1
    @HansPassant The difference being buying lottery tickets is really only harmful to the buyer, whereas this behavior has negative externalities.
    – Servy
    Commented Sep 7, 2016 at 21:11
  • 6
    @Servy I'm shocked that I just got Rick Rolled (touche). It is difficult to qualify the value. On one hand, it's absolutely true, the answers could be found in a book; on the other, having "Google Juice" isn't a bad thing. Many SO questions are the reason that people can easily find answers (except when the question title does not match the actual question). Young generations are accustomed to using Google for everything, but many more people are becoming programmers and contributing because of how easily available information is. Simple questions are not bad
    – Klik
    Commented Sep 7, 2016 at 21:20
  • 5
    @Klik Once again, I refer you to my first comment. This type of information is virtually always already readily accessible online. It's not like the only places to find information about what operators are in a language are in a book or on SO. This type of information is accessible in lots of places on the web, again, most notably, official language documentation.
    – Servy
    Commented Sep 7, 2016 at 21:23
  • 3
    I don't think this is a duplicate of that question @AlexeiLevenkov ; that question is asking "why did this piss-poor question get a few upvotes anyway?", while this is asking "why did this question get a phenomenal amount of upvotes even though there is very low effort?" ... It's related, but don't think it's exactly the same question. Commented Sep 7, 2016 at 23:53
  • 2
    @Carpetsmoker you can view it that way too... I really think they are very close so (and I did not want to copy-paste my answer here :) ). Essentially "does usefulness equals quality" is core of both questions. Commented Sep 8, 2016 at 0:03
  • 2
    Now wait a minute. Perhaps I have misstated my question, but what I'm trying to get at is when is it OK to ask a simple question without providing evidence that you did your homework. I'm not concerned with the fact that they got a lot of up votes. I just use the upvotes as a metric for what is "good form", since this site uses vote count in its metric to determine the contribution of an individual. So, for me, I thought they might have been exemplary questions.
    – Klik
    Commented Sep 8, 2016 at 0:10
  • 2
    @Servy I agree with Klik, the reason that this information is now readily accessible is often because these simple questions exist on SO. Official language documentation is difficult to search when you do not know what keywords or phrases you should be using to answer the question you have. In short, official documentation might be easily accessible, but this does not mean that the information it contains is easily accessible, especially for beginners with simple questions. Commented Sep 8, 2016 at 16:32
  • 2
    well, no. again, simple questions that aren't duplicates are perfectly fine on this site. The lack of research is also a perfectly valid reason to downvote said questions. However, if enough people find the question useful and upvote for that reason, the upvotes will over time counteract the negatives due to lack of research. Simple questions are often useful to more people because there are generally more new devs looking for that kind of question compared to "my code doesn't work" questions.
    – Kevin B
    Commented Sep 9, 2016 at 21:10

6 Answers 6

77

Assuming a questions meets the basic criteria to be considered on-topic (is about programming, not opinion based or too broad, etc.), then the basic formula for a good question is something like this:

score = effort + complexity + interestingness

If interestingness is very high but effort is low then that might be perfectly okay. Perhaps we can best explain this with some examples:

  • “When I run this code I get 1, 2, 3 as output, but I expect 4, 5, 6” − this is a "please help me debug this code" and is the majority of the site's questions; it is often low interestingness. Most of the time no one other than the OP finds the answers particularly interesting, and often the questions are also low in complexity. So to make a it a good question it needs effort.

    Example: just load the front page.

  • “When I run this code from a library I get this unexplained error: [..]” − this may seem the same as the above, but it actually has higher interestingness because in many cases other people also find the answer useful. Also complexity is typically higher as it involves debugging some library. So effort can be lower.

    Example: No module named pkg_resources

  • “What is this feature that I don't understand” − this is where the "what does yield do" fits in. Note the requirements: it needs to have either complexity or interestingness (or both), so "what does if do in Python?" is not a good question, since it's low in both. But you can go for years programming Python and never learn about yield; it's a feature fairly unique to Python (or was until very recently, it had spread to more languages now) with some interesting and complex uses.

    (Another) example: What is a metaclass in Python?

  • “Why do I get this strange and inconsistent behaviour?” − these are perhaps some of the site's best questions, as they teach almost everyone something new about the language or a library. They have high interestingness, sometimes also high complexity, so can have low effort. These are the sort of questions people can spend hours on answering, simply because the answerer wants to know the answer!

    Example: Why is [] faster than list()?


These are just a few examples, and not every questions fits in one of these categories. This model is also somewhat simplified, but I feel it holds up in the vast majority of the cases.

11
  • 3
    I like how you articulated this. There is a lot of merit in your answer; the higher rep users definitely appreciate interesting answers and it is probably the high rep users that do more of the downvoting (just a hypothesis). Though, do you think that the reputation of the asker influences the ultimate score?
    – Klik
    Commented Sep 7, 2016 at 23:45
  • 2
    @Klik Thanks. It seems to me that high-rep users downvote more by definition because they're more active on the site, so they simply vote more, full stop. Especially if you're also active in the review queues and seeing the worst of it. I don't think reputation of the asker matters, but I'm not watching over people's shoulders as they vote so it's difficult to be sure (also see my, and other people's, answers here). Commented Sep 7, 2016 at 23:57
  • 2
    I disagree that being "interesting" should have any bearing on the formula. People have broad interests and are interested in a great many different things. One of the biggest problems I see here on Stack Overflow (definitely in the top three or four) is that really useless questions, showing no real research and having no useful constraints, get up-voted anyway. It's impossible to know for sure why they got up-votes, but in many of these cases it seems nearly guaranteed that the votes are for "interesting", even though the question will never get any useful answer, or will get way too many. Commented Sep 8, 2016 at 6:37
  • @PeterDuniho so what's the problem then? If there is no useful answer, then the question is likely flawed in some way or another unrelated to its "interestingness" or lack thereof (it's too specific, too poorly explained, etc). If there are "too many" answers, I don't see who that harms?
    – Nick Coad
    Commented Sep 8, 2016 at 7:24
  • @PeterDuniho Do you have an example of that sort of question? Commented Sep 8, 2016 at 8:23
  • 1
    @Carpetsmoker: they appear almost every day, even with my minimal and cursory interaction with the site. For example: stackoverflow.com/questions/39381306/…. Not only did three people up-vote this question, the answer, which is little more than a reiteration of the documentation that the OP should have looked at to start with, got eight up-votes. These types of questions are just cluttering up the site, making it all that much harder to find questions and answers not adequately addressed by the documentation. Commented Sep 8, 2016 at 22:21
  • @Carpetsmoker: ...the question certainly isn't useful nor shows any evidence of research, so all I can surmise is that a bunch of people thought it was "interesting" and up-voted on that basis. Commented Sep 8, 2016 at 22:23
  • 1
    I wouldn't say yield is 'unique to Python until very recently' ... from what I can find it appeared in the 70s and Python introduced it in 2003, a whopping two years before C#. Not sure when Ruby introduced it but it's also been over a decade ago.
    – Joren
    Commented Sep 9, 2016 at 9:42
  • 1
    You should add weight factors to those 3 variables.
    – user
    Commented Sep 9, 2016 at 9:59
  • 1
    @PeterDuniho I don't disagree that question is crap, it is low on all the factors on the right-hand side of my equation. But this question isn't about "why do crap questions get upvotes anyway?" or "why do simple answers get so many upvotes", it's about "can a question with low effort still be a good question?" That's the question I tried to answer. Commented Sep 9, 2016 at 10:07
  • @Fermiparadox I considered doing that actually, but it's not a scientific equation, it just demonstrates a basic idea. Commented Sep 9, 2016 at 10:09
22

It's okay to ask simple questions like these if they haven't been asked before. And that's pretty rare, especially in a wide-spread language. Almost all of these questions are from the very early age of Stack Overflow (asked by users which didn't have much reputation back then, so that certainly isn't a factor), but you'll be able to find a couple of them for newer languages (e.g. Swift: 1, 2, 3).

Otherwise, your questions should always be as simple as possible, but I agree with you it is very hard to create a good one- or two-liner question.

7
  • What about questions where it is hard to show your work? For example, should you list the Google searches you've done? Well that just looks ugly and it clutters the question in a negative way.
    – Klik
    Commented Sep 7, 2016 at 20:41
  • 1
    @Klik 90% of all questions on Stack Overflow which lack research will be closed as a duplicate of another one. Don't include Google searches; just show what you tried and why it failed.
    – Glorfindel
    Commented Sep 7, 2016 at 20:43
  • 2
    @Klik if you really can't find any information on the problem - list of search terms you've used would be reasonable demonstration of effort. At very least it will help others to give answer targeting at holes in understanding rather than trying to generally cover topic. Commented Sep 7, 2016 at 21:33
  • @Klik Including search terms in your question (if they aren't already used) also makes it more likely that the next person to search for those terms will find the question. I agree they're messy, but they can usually be collected at the very bottom of the question without getting in the way too much. Commented Sep 7, 2016 at 23:34
  • @JeffreyBosboom Yes, I agree, but I wish there was a way to keep the question cleaner to avoid dissuading potential helpers. It would be nice to have a separate section to put work done if it may detract from the clarity of the question. The number of search terms used can be quite plentiful.
    – Klik
    Commented Sep 7, 2016 at 23:41
  • 1
    "What about questions where it is hard to show your work?" -- I guess that depends on what you mean by "work". But, way too often we see questions with no evidence that the author tried anything. I expect to see code in these questions. As for searches, you don't need to show all your search results. Just explain the top relevant results from your searches and why those didn't address your concern. If your search came up empty, explain how you searched so readers can understand why you were unable to find the information you sought. Commented Sep 8, 2016 at 6:40
  • @Klik it seems like in the case where you might not be able to find information on something after a bunch of Google searches, then you may not know what you need to search for and you could actually modify your question to be less about the specific problem, and instead change it to be a more general "What is the technique called where you do X?" or similar.
    – Nick Coad
    Commented Sep 8, 2016 at 7:28
-1

I disapprove of overly simple questions, such as "what does the yield keyword in Python", for which the poster has definitely not done the work of reading a Python tutorial / official docs / googling it etc.

However, questions such as

What does the "yield" keyword do in Python?

actually do show work, and while they can be answered more generally, the are actually more specific; that one could have been named "What does the Python yield keyword do in my specific context".

Still, sometimes this kind of questions can feel like "reputation-whoring" (not those linked to by OP, but there are definitely some of them out there with high vote counts.)

1
  • I don't think that the question you've noted shows any work. He has just posted the code for the function and the caller function of something he wants to understand. IMO work would be taking that code and playing with to to see how things change. Noting articles that he has read, or even searches that he has conducted. He has simply asked, "what does this mean?" without making a significant effort. I'm not bashing it because I think it is a useful question. Do you really think that the OP of that post showed any work?
    – Klik
    Commented Sep 10, 2016 at 18:49
-1

Is it OK to ask simple questions without showing your work?

Yes.

Unasked question:

Is it OK to leave a comment asking someone to show their work?

No.

It's pushy and noisy.

If they thought they needed to show it, they would have. If they needed to show it, but were too stupid to realize that, or too lazy to do it, then downvote, and/or closevote if you can figure out what reason to use, opinions differ, sometimes "too broad" works.

1
  • 1
    I agree with this answer the most--it is noisy to show work that is not directly relevant to the question. However, sometimes I see questions where potential answerers are noticeably unhappy unless they are convinced the asker has spent hours trying to figure out the answer on their own. This encourages people to include irrelevant information that clouds up the question and makes it less useful. Of course, without this kind of culture, perhaps people would be more likely to ask questions without spending much time looking for an answer first.
    – Klik
    Commented Sep 10, 2016 at 19:10
-1

A few quotes from the question:

very 'simple' questions (ones that could be found in a book) tend to be voted more highly because it is the simple questions that people often search for most frequently

...

I think they are great questions and add value to this site

Emphasize was yours.

So how can very simple questions without showing any research be great questions? That is probably the most fundamental question here.

The truth is, they aren't great questions. They are but the first step in every documentation. People upvote them but that doesn't mean they are great. Here democracy basically fails (in conveying a meaningful message beyond being popular).

I am confused as to when you need to show your work.

Always. Nothing more to say.

If you see a question not showing (re)search you may downvote it.

Afterthought: I hope that StackOverflow Documentation can make these highly popular but very basic questions superfluous. If Documentation achieves this it is probably already kind of a success.

0
-1

I have to agree with @Servy:

In addition to being in any intro book, these types of questions are also virtually always also easily discoverable with a simple web search, so no, this isn't improving the searchability of those terms. In the vast majority of cases, it's doing nothing, at most, it's stealing traffic that would otherwise have gone to another site with this information (often the canonical documentation) and directing it here, where the same information would be found. – Servy Sep 7 at 20:21

If you can't even show that you've looked in the official documentation, the question doesn't belong here on SO. If you're going to ask a question here, you must show some effort.

1
  • I acknowledge that some askers put more effort than others, but many of them ask simple questions because they cannot find what they are looking for. These subjects involve a lot of keywords,syntax, and jargon that many experts take for granted. Perhaps users have gotten by making small hobby projects, but don't know that do...until loop exists. In fact, I think their questions have value that experts cannot provide and that is that their questions are formulated in the mindset of a beginner; other beginners will fall upon these questions due to a similar way of thinking in their searches.
    – Klik
    Commented Sep 10, 2016 at 22:12

You must log in to answer this question.

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