DEV Community

Cover image for How to get answers on StackOverflow

How to get answers on StackOverflow

MiguelMJ on February 06, 2022

Talking about Questions And Answers in software development is talking about stackoverflow.com (SO from now on). There's a bad experience shared am...
Collapse
 
codenameone profile image
Shai Almog

Well said!

A lot of developers have a problem with stack overflow deleting questions. Editing or generally closing a question which you think is valid. This is because many moderators have a bit of OCD and tend to "over clean" the site.

This is what makes the site so great for searching for answers. But asking sometimes feels like you're being attacked. So a couple of my own tips:

  • Don't tag randomly - You mentioned this but I'd like to add another aspect to that. Moderators are attached to specific tags. If you place a tag that might be confusing a moderator might misunderstand your question and close it. E.g. I handle the codenameone tag. We use a flavor of Java. Lots of times people add the java tag and moderators just close the question incorrectly

  • Don't take it personally - use the comments section to ask why a specific action was taken. Edit your question and try to fix it and comment back to the moderator so they won't miss the edit. Understand that the motivation of the moderators is to prevent SO from becoming a noisy/messy site. Work towards that

  • Use rewards and spread the word - If you answer enough and have good questions you get points. You can hand out some of those points as a reward to get better answers. I have a lot of points and hand out rewards when I ask questions (unfortunately mine are usually too tough/obscure). You also must use social media to spread the word on your question.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

This is because many moderators have a bit of OCD and tend to "over clean" the site.

There's also a flip-side to this: Dev.to takes the opposite approach, and as a result it's common to see articles that are 1:1 copies of older ones in terms of content, but rephrased by another user.

This works well for a site that puts little emphasis on browsability of older content and instead focuses more on current content and discussions, but would be terrible UX for a site that essentially acts as a massive archive of solutions for common problems.

It's easy to see this obsession with avoiding duplication as excessive from the perspective of asking a question, but it really is a major ingredient in SO's recipe for success.

Collapse
 
codenameone profile image
Shai Almog

Sorry if I wasn't clear. I meant that OCD can rub people the wrong way. However, I do consider them the reason the site works so well...

Collapse
 
miguelmj profile image
MiguelMJ

Thanks for you comment, Shai! It's good to also have the experience of a tag moderator here.

Collapse
 
andypiper profile image
Andy Piper • Edited

This is a really good summary explaining how best to ask questions on Stack. You’re right - do the research, show what you’ve tried and how you are stuck, and you will get a lot more empathy and interest in your issue. Nicely written!

Also: avoid posting images and screenshots of an error or of your code - it cannot be copied and is not easily accessible for those with screen readers.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

avoid posting images and screenshots of an error or of your code - it cannot be copied and is not easily accessible for those with screen readers.

I think a lot of beginners vastly underestimate how often people trying to help them actually start out copying their code into an editor and running parts of it to figure out what exactly happens, or even just to make sure they aren't giving a wrong answer themselves.

Experienced developers don't have magic debugging eyes either. People are bad at running code, but computers are really good at it.

Collapse
 
miguelmj profile image
MiguelMJ

Great additional tip. Thank you, Andy!

Collapse
 
thumbone profile image
Bernd Wechner

You are much kinder than I! When you write:

"Do a minimum of research first"

I sense you're very gently chiding the folk who need to sent a link to lmgtfy, while I take a much harder, but not less polite (IMHO) stance on the matter. I refuse to ask a question there or on any forum until I have researched it as deeply as I possibly can, or am faced with such a step learning curve that I figure a pointer might save he many hours of reading and study.

In fact, what I find is I only post half of the questions I write! Why? Because as often as not, in asking a question properly, in covering the clues you have, the research you have done, and what it is you're stuck on, suddenly, the nswer istrikes me ... or I find it, while I'm revisting links and writing it up my efforts.

So I would much sooner write something like:

"Research your problem well, beforehand"

The word "minimum" doesn't sit well with me. The minimum is generally 0 ;-).

Collapse
 
miguelmj profile image
MiguelMJ • Edited

Yes, you are right. When I say minimum actually I mean: "type something in a search engine". I swear there are people who don't do it. And the reason I wouldn't even expect much more than that is because a lot of beginners don't even know how to properly research their own problems... and "How to do your own research" could perfectly be another whole post. So if I get someone to just copy-paste an error message in a search bar, hey it's something.

Edit: I actually changed that section name xD That "the minimum is generally zero" stuck in my head.

Collapse
 
thumbone profile image
Bernd Wechner • Edited

Yeah, you should try watching like Arduino forums and such on different platforms. I cringe at the number of posts by noobs across the globe that are litterally "What's wrong?" and a photo of their screen. Blows my mind it really does. Still I'm not sure what blows my mind more, the incredible audacity fo the question or the people climbing over each other to answer ... I just sit back and watch. If I'm feeling a little cheeky I reply to these with "What's wrong? You posted a screenshot."

One of my favourite aphorisms is in fact: You know how they told you all through your schooling that there's no such thing as a stupid question? They lied.

In fact science itself is more about asking the right questions the right way than it is about answers as are otehr human endeavours (math, philosophy and law for example). I mean literally across all levels of inquiry. So often today online in diverse fora we can watch huge debates roaring be it on health, religion, politics, science, whatever, and because there are so few, if any, particpation requirements or barriers, people of all ages and skill levels are in the fray and almost always talking right past one another so clearly banding about ill defined, ill understood and or diversely interpreted terms and claims. And always it takes someone to stop and ask a good question ...

And in IT, the way to ask a question well is somethingt hat should be taught indeed.

You can see the frustration the broader community has around this in fact when you post an issue on github nowadays. A repo of any size or popularity generally pops up with a template right away and you spend the next 5-10 minutes finding all the info they insist you provide or they'll ignore and close your issue. You see it how on SO itself, at two tiers, first when you type the question, and then when you submit it, it shows a pile of (presumeably AI matched) existing questions asking if it's already been asked.

We see barrier rising against the endles stide of ... stupid questions ;-).

They are as old as the hills, so old in IT in fact that the Support Desk trope of course is: Is it plugged in? Have you restarted it?

I look forward to seeing if you write an article on it (it would ironically, take a little research to do well, and could in a sweet irony, be delivered as, a question).

Thread Thread
 
miguelmj profile image
MiguelMJ • Edited

It's actually as deep as you portray it. In abstract terms, a question is the realization of a problem or a deficiency. Properly asking a question (even to yourself) is half of any problem-solving process (learning included) at any scale of life, from the most personal level to any professional or scientific field, to the most high level politics and philosophy. Problem solving is asking + answering. I don't know where, but I remember reading something like "A good stated problem already has half the solution".

I believe that, for that reason, the quality of the questions asked in any space is a good measurement of how much that space could help a community (or a society) grow, so the best spaces must have high standards for their questions. No wonder why popular repos use strict templates. About stupid questions... maybe there not stupid questions per se, but stupid, inconvenient, incomplete or improper formulations in certain contexts, of course.

If asking is already the very half of the process, I don't think it's an exaggeration to say that learning to ask actually learning to learn... with all the powerful implications of that. No doubt it should be taught in IT, it should be taught in elementary school!

I'd love to write more extensively about these topics but in the end this is a tech site and english is not my native language, so I stick to this kind of posts. However, it's great to have comments like yours. Thank you!

Btw I'll keep your last idea for another article, I like it hahahaha

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

There's a few things I'd like to add based some mistakes I've seen rather often in SO questions:

Your question is not a duplicate of the proposed question

Something I'd like to add to this scenario is that any user that has already looked into a problem before asking, will have found these false duplicates and should ask their question in such a way that sets it apart from these.

In the case that the question is the same, but the solution doesn't work for them, this should also be clear if they list what they have already tried to fix the problem, ideally including a link to the other solution and maybe a quick comment on why this doesn't work.


Another thing I see all too often is users simply dumping their entire code into SO along with an error, which means even if their problem is unrelated to their specific use-case, anybody reading the code will still have to figure out what parts of the code really contribute to the problem and what is just domain logic that works.

Always reduce your problem to a simple case that can be reproduced without any dependencies and understood without extensive domain logic.


And last but not least, XY problems are extremely common on stack-overflow.

This is generally a sign that a person has attempted to solve their (original) problem and has gotten stuck somewhere in the process of what they believe is a good solution.

But this often leads to absurd questions resulting of absurd solutions to easy problems.

One question I've seen a few times now is (without any further context): I have some variables thing_1, thing_2, etc. and a number num. How can I use a variable like thing_num?

In this very simple case, it is easy to spot the real problem: The user is probably a beginner tinkering with some code and doesn't know what arrays are.

But it's not always this obvious, and in most cases, an experienced developer trying to help will only have a vague impression that what the user is trying to achieve is very awkward and probably not what they really need. This will result in a long back and forth to find out what the user actually wants to achieve, wasting everyone's time.

A good question should always provide enough context that anybody trying to help can also easily figure out what the goal is and why a certain approach was taken.

The age-old joke about stack overflow is that instead of answering questions, the question itself is often questioned. "How do I A?" "You don't. Just do B instead".

While this can be frustrating to someone that already knows they need A specifically and could explain why B won't work for them, it's also important to understand that this sort of attitude develops over a long time of being confronted with countless instances of people asking for A when, in reality, they need B, because their actual problem is C and A is just how they think they can achieve C.


So in conclusion: Explain both what your problem is, and what it isn't. Be proactive in addressing similar questions that don't apply to you, and if your overall approach seems sketchy, point out why you really do need to solve it in that specific way.

Collapse
 
miguelmj profile image
MiguelMJ

That double frame approach is actually very useful. However, being able to describe what you are trying to do and how it differentiates from other things requires an understanding of you own problem that one might unfortunately just lack. In any case, I agree with you: be proactive and address similar questions to tell what you don't find in them.

The age-old joke about stack overflow is that instead of answering questions, the question itself is often questioned. "How do I A?" "You don't. Just do B instead".

In this point I must say that this is a bad habit of some SO answering users. Most often than not, the user asking is trying to learn about A, not about B. Not all good practices are good for learning. A classic example being a question about C++ arrays being answered with "don't use arrays, use a vector object".

Not only this is not useful, but it might be harmful. It is good to learn about arrays (following the example), because even vectors use them underneath. So when I see a question about A, I try to answer it within the A context and then in a second section of your answer explain why B is a better practice and how it also solves the problem.

There are cases where the XY problem is much more clear and don't involve good or bad practices but very poor approaches, like the one you told. However, some users also assume that something XY problem very fast, in the moment they don't fully understand the context question, that not necessarily is a bad approach.

Thanks for your comment, DarkWiiPlayer!

Collapse
 
captainyossarian profile image
yossarian

The rule of thumb: Provide a reproducible example. Make sure your provided examples reflects your problem. Sometimes, when PO gets their answer they start to claiming that answer is ok in context of provided example but their original example is much more complicated. As a result it does not help and they need to update their question an provide more edge cases.

Collapse
 
miguelmj profile image
MiguelMJ

True! Sometimes a person not knowing exactly how to communicate what they need is because not even they have it clear.

Collapse
 
dagnelies profile image
Arnaud Dagnelies • Edited

IMHO stackoverflow feels like a spamming of dumb questions since ages. I somehow wonder if people answer them at all. I personally think the root of the problem is a screwed reputation system.

Basically, just asking lots of questions earns lots of reputation, especially if they are basic. On the other hand, answers are less rewarding, and especially more so if it's a deep technical and difficult topic.

In other words, reputation does not represent expertise and favors basic questions flooding. It was irritating back then, and still is.

I think if "posting" questions would cost you reputation, even minimally, and earn nothing, the questions would both flood less and increase in quality. It would also be much more encouraging to answer and reputation would be meaningful again.

Collapse
 
miguelmj profile image
MiguelMJ

I don't get the feeling that bad questions are there to obtain reputation, but I might be wrong.

Setting a reputation cost to questions is an interesting approach and I wonder if they've ever considered... although I would understand how they want to avoid that measure in a Q&A site. I feel that in some tags that would be harmful (like very new or very niche technologies) but very useful in others (massively used languages and tools like javascript and git, for example).

Thanks for your comment, Arnaud!