How to Have a Better Stack Overflow Experience
Published: 2021-03-28 08:29:03

## 3\. Look at the comments first

[Original on Živković Miloš](https://medium.com/geekculture/how-to-have-a-better-stack-overflow-experience-3683d892cbec)


Developers search Stack Overflow daily. In multiple tabs, of course.

When we encounter related answers, we get hyped. Click the relevant links to find out more. The link is dead. Time wasted.

We try answer’s code snippet. Only to find out it is deprecated, or non-working.

_What can we do to prevent these situations?_

# 1\. Lookout for obsolete answers

I recently did an upgrade of Hybris and stumbled into an issue. Started looking at our closed source, answers.sap.com. Found myself looking into obsolete documentation and obsolete answer.

The problem of this kind reproduces on StackOverflow. Looking into ever-changing frameworks for answers is hard.

Look at comments, comments describe the answer better.

> 75% of comments, can reveal if the answer is obsolete².

Most obsolete answers are around NodeJS, AJAX, Android, and ObjectiveC². I would argue a lot of answers, for new frameworks are obsolete.

Look if the answer applies to your environment. “Works for Angular 6”, and you’re face problems in higher versions.

# 2\. What can you ask on StackOverflow?

Most of the questions live in a few categories³.

* Non-working code
* Unknown implementation
* How to implement algorithm (not related to the domain)
* Suggestions for new technology

Don’t ask domain-specific questions. You will rarely get an answer. Nobody will go in-depth for nothing.

Use Q&amp;A sites, to find answers for task-specific issues.

You have problems [asserting exceptions in the JUnit test](https://stackoverflow.com/questions/156503/how-do-you-assert-that-a-certain-exception-is-thrown-in-junit-4-tests). You’ll get a valid answer since the question is task-specific.

Ask about the core issues, issue with JDK, what is supported in the new version of NodeJS. These [environmental questions](https://stackoverflow.com/questions/4382178/android-sdk-installation-doesnt-find-jdk)often get valuable answers.

# 3\. Look at the comments first

> 75.6% of tagged comments are informative¹.

Most users write comments in [addition](https://stackoverflow.com/questions/37578876/how-to-feed-cifar10-trained-model-with-my-own-image-and-get-label-as-output/37579847#comment72132287_37579847). I’ve recently added my way of solving the issue, as an addition.

We like confirmation comments. You see a lot of them._“It works”_, or_“working for me on x.x version”_. You could use those as a confirmation of a possible fix.

There’s the other way, with rejecting comments. This doesn’t work or doesn’t suit the question well. You can use those to avoid the answer.

You could see comments in the form of [updates](https://stackoverflow.com/questions/38309165/how-to-consume-a-asp-net-core-webapi-in-a-c-sharp-uwp-application/38327653#comment65851467_38327653). The solution changes because of new software versions. You shouldn’t miss those. They make or break the actual answer.

# Conclusion

What should you take away from this article?

Look at obsolete answers. Read more comments.

Learn what you can ask, and then ask. Don’t ask domain-specific questions. Ask in a more generic way if possible.

# Resources

\[1\] Zhang, Haoxiang &amp; Wang, Shaowei &amp; Chen, Tse-Hsun Peter &amp; Hassan, Ahmed E.. (2019). Reading Answers on Stack Overflow: Not Enough!. IEEE Transactions on Software Engineering. PP. 1–1\. 10.1109/TSE.2019.2954319.

\[2\] Zhang, Haoxiang. (2020). On the Maintenance of Crowdsourced Knowledge on Stack Overflow.

\[3\] M. Allamanis and C. Sutton, “Why, when, and what: Analyzing Stack Overflow questions by topic, type, and code,” 2013 10th Working Conference on Mining Software Repositories (MSR), San Francisco, CA, USA, 2013, pp. 53–56, doi: 10.1109/MSR.2013.6624004.

Photo by[Helena Lopes](https://www.pexels.com/@wildlittlethingsphoto?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)from[Pexels](https://www.pexels.com/photo/photograph-of-men-having-conversation-seating-on-chair-1015568/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)